Apns: understanding of APP digital badge, apnsapp digital badge

Source: Internet
Author: User

Apns: understanding of APP digital badge, apnsapp digital badge

Some brothers in the Group spoke about the problem two days ago. During remote push, the boss asked the APP desktop icon to display red unread numbers (numerical badge) in the upper right corner to be accurate, the number of unread notifications is displayed. However, when a brother in the background sends a push notification, each time the badge is 1, then, the mobile terminal will accumulate the unread number and display it on the APP; in addition, the backend is very stubborn to think that the number of accumulated unread messages is processed on the Mobile End .....

This is embarrassing. It is really painful to meet stubborn teammates when communication fails!

 

Here I will talk about the verification process and understanding of this badge when I am working on the push function, and give some reference to those who encounter similar situations.

Just take a screenshot. Here is an example.

 

When the APP is in the background, this is easy to say, because when the push notification arrives, it can be monitored, you can obtain the badge numbers in the push information and accumulate them.

However, when the APP exits the background, it may not be able to listen to the notification and read the notification information to set the badge!

 

The format of the background push message is in the format provided by Apple, which is roughly as follows:

{    "aps" : {        "alert" : {            "title" : "Game Request",            "body" : "Bob wants to play poker",            "action-loc-key" : "PLAY"        },        "badge" : 5    },    "acme1" : "bar",    "acme2" : [ "bang",  "whiz" ]}

The "aps" format is fixed. "acme1" and "acme2" are custom data. "Badge" is the badge number of the app.

 

Therefore, it is easy to confirm whether the red badge of the APP desktop (unread message number) is controlled by the background or by the mobile terminal.

Let the app do not change the badge on its own, or exit the app completely, and then start pushing in the background. Assume that the pushed message badge is a number, the badge of the app also displays numbers,

This is enough to prove that the red badge of the app is controlled by the background push!

 

Of course, to precisely display the badge of an app, a powerful background is required: to track and report unread messages read by each member in the app,

Next time, you need to collect statistics on unread messages for each member, and set precise badge numbers in the pushed messages. The app can accurately display unread message numbers.

Let's look at apps such as QQ. Their badge numbers are very accurate, and the background is powerful, which is incomparable.

 

However, for our general APP, do you want to make the badge accurate? Is it necessary? You even use third-party push sdks such as Aurora and personal push. You also want to display the badge accurately. You can see aurora and the group push method,

No precise badge setting is provided at all, indicating that it is difficult or costly for third-party companies who want to implement accurate badge settings!

 

Generally, the badge numbers of most apps mean nothing. I have tested Baidu maps, jianshu, Sina financial, and so on, no precise display is made for the badge display of the app. Therefore, if we are using a common app, it means to display the badge numbers, mainly to remind users that you have unread messages! If you really want to accurately display the badge, you have to talk to the back-end brothers so that they are ready to work on it!

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.