search

Home  >  Q&A  >  body text

消息推送 - 最普遍的android通知推送的解决方案是什么样的?

  1. 要实现一个通知推送的功能,但是现在没有任何思路,不知道现在市场上的应用都是使用什么方案来实现信息推送?

  2. 能否详细介绍下这些方案?

巴扎黑巴扎黑2773 days ago663

reply all(6)I'll reply

  • 巴扎黑

    巴扎黑2017-04-17 13:54:14

    1. Don’t count on GMS: google messange server, I am a big country
    2. The commonly used method now is: open a PushService when the application starts, and go to the server to make a long connection (mqtt, xmpp protocol etc.), and then the server pushes the message to PushService through a long connection. PushService generates a notification after receiving the message. You can build a push server yourself, but it is recommended to use a third-party SDK, such as Homing Pigeon, Aurora Push, and Baidu Push, which can meet most needs.
    A problem may arise if you use method 2. It does not guarantee that PushService will always survive, so you need to solve how to ensure that PushService is not killed.

    reply
    0
  • 黄舟

    黄舟2017-04-17 13:54:14

    The 2 mentioned by @Akioss is indeed a commonly used method. For PushService, the alarmmanger can do a scheduled task and send heartbeats to the server regularly. It can also ensure that the pushservice is alive. If it is not there, it can be up.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 13:54:14

    You can try Tencent Pigeon, I used it last year, I don’t know how it is now

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 13:54:14

    I made an app before, using androidpn, but this thing needs to be modified by myself before it can be used. For it, I just used a third party. There are many choices, you can check online

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 13:54:14

    To achieve real-time, you need server push. You can use Aurora Push, which has the best effect

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 13:54:14

    Currently, most solutions for applications on the market are to use third-party push services.

    Our solution is for developers to integrate our Android SDK on the client, and the server can send messages to the Android client through the SDK or using RESTful API.

    In terms of real-time performance, the Android SDK will start a background Service to create and maintain a long connection to the Yunba server, thus ensuring the real-time performance of message push.

    Moreover, when the client is currently offline, we can support the offline message function to ensure that messages are delivered to the client.

    In addition, for Android 5.0 and above platforms, the application will be killed when entering the background, resulting in the problem that users cannot receive App message push. We have also upgraded the existing solution and integrated Huawei and Xiaomi For the manufacturer channel, you can use Yunba push to push models from several manufacturers with one click to ensure the arrival rate.

    reply
    0
  • Cancelreply