Push Notifications in Android Platform

后端 未结 20 996
长发绾君心
长发绾君心 2020-11-22 11:07

I am looking to write an app that receives pushed alerts from a server. I found a couple of methods to do this.

  1. SMS - Intercept the incoming SMS and initiate
相关标签:
20条回答
  • 2020-11-22 11:40

    Firebase Cloud Messaging (FCM) is the new version of GCM. FCM is a cross-platform messaging solution that allows you to send messages securely and for free. Inherits GCM's central infrastructure to deliver messages reliably on Android, iOS, Web (javascript), Unity and C ++.

    As of April 10, 2018, Google has disapproved of GCM. The GCM server and client APIs are deprecated and will be removed on April 11, 2019. Google recommends migrating GCM applications to Firebase Cloud Messaging (FCM), which inherits the reliable and scalable GCM infrastructure.

    Resource

    0 讨论(0)
  • 2020-11-22 11:41

    Google's official answer is the Android Cloud to Device Messaging Framework (deprecated) Google Cloud Messaging(deprecated) Firebase Cloud Messaging

    It will work on Android >= 2.2 (on phones that have the Play Store).

    0 讨论(0)
  • 2020-11-22 11:42

    You can use Pusher

    It's a hosted service that makes it super-easy to add real-time data and functionality to web and mobile applications.
    Pusher offers libraries to integrate into all the main runtimes and frameworks.

    PHP, Ruby, Python, Java, .NET, Go and Node on the server
    JavaScript, Objective-C (iOS) and Java (Android) on the client.

    0 讨论(0)
  • 2020-11-22 11:44

    There is a new open-source effort to develop a Java library for push notifications on Android based on the Meteor web server. You can check it out at the Deacon Project Blog, where you'll find links to Meteor and the project's GitHub repository. We need developers, so please spread the word!

    0 讨论(0)
  • 2020-11-22 11:44

    I dont know if this is still useful. I achieved something like this with a java library at http://www.pushlets.com/

    Althoug doing it in a service won't prevent android from shutting it down an killing the listener thread.

    0 讨论(0)
  • 2020-11-22 11:45

    or....

    3) Keep a connection to the server, send keep-alives every few minutes, and the server can push messages instantly. This is how Gmail, Google Talk, etc. works.

    0 讨论(0)
提交回复
热议问题