About the setting of the push's corner mark

Source: Internet
Author: User

1. The following is the Aurora document written above, many students did not have a good view (below I think is the angle of the relevant settings)

* @abstract Set the corner mark (to the server)

*

* @param value New. Overwrites the value saved on the server (this user)

*

* @discussion This interface does not change the applied local corner label value.

* Local still need to call the Uiapplication:setapplicationiconbadgenumber function to set the foot tag.

*

* This interface is used in conjunction with the server-side corner marking function provided by Jpush.

* This function solves the problem is, when the server side pushes the APNs, does not know the client originally already existed the angle mark is how many, specifies a fixed number is not quite reasonable.

*

* Jpush server-side PIN feature provides:

*

*-The actual badge of the current client (the current user) is set to the server side by this API;

*-When invoking the server-side API when sending APNs (usually this call is bulk-directed to a large number of users),

* Use the semantics of "+1" to express the need to bring a new badge value based on the actual badge value of the target user (saved) + a notification;

*/

+ (BOOL) Setbadge: (Nsinteger) value; (Tell Aurora our app to push the next corner base)

+ (BOOL) Setbadge: (nsinteger) value;

/*!

* @abstract Reset the foot mark (0)

*

* @discussion equivalent to [setbadge:0] effect.

* Refer to [Jpushservice Setbadge:] Instructions to understand its role.

*/

+ (void) Resetbadge;

I think it's important, too.

/*!

* @abstract Log off

*

* @discussion A description of the log level, refer to [Jpushservice Setdebugmode]

*

* Although the log is closed, but still will print Warning, Error log. These two log levels, when the program is running normally, should not be printed out.

*

* Recommended in the release version, call this interface, turn off the log printing.

*/

+ (void) Setlogoff; (Remember to turn off the Aurora print log function when publishing)

2. General small Company's app will be lazy to set the way of the angle mark

is a click on the app to enter the time, the return to the Notification box notification of the total emptying of the main three steps

It's usually in this method.

1.[application setapplicationbadgenunber:0];(empty the app's corner mark)

2.[application Cancellocalnotifcations];(empty the notification bar for all notifications)

3.[jpushservice Resetbadge];(to notify the aurora of the server corner mark empty)

3. If the company is a big point, we have to analyze the changing process of the angle mark.

This is my rough analysis of the analysis process of the angle mark

Of course, this is just to give you an analysis of the idea (different app or according to their company's product ideas), if it is messy, you may want to draw a flowchart like me

The general point of consideration is:

1: Program in the foreground when the app's corner mark should be consistent with the Aurora

2. If it is the program's message two-level interface (generally the interface when the message is quite the same as the read state), if this time a message, to determine whether the interface under this classification (if it is equivalent to the push message has been read, if not the type of classification below, Still go to increase the angle mark)

3. When entering the background, judging the classification of the message is not all read state, if not on the angle of 1, notify the Aurora-1 notification background This category-1 can (of course, their own classification of the number of unread counter or the Gaga that minus)

The difficulty with this implementation is to determine if it is below the two level list of categories

It is the equivalent of viewing this message that a company with less manpower is advised to click a detail interface in the category directly.

Also consider is the aurora in the background sometimes will hang off, our app must have a corner of the automatic repair mechanism, do not affect the user's experience

About the front desk background and click the notification bar directly into the situation

Click on the notification bar to enter the state of inactive.

The front desk and backstage are very good judge

It draws on the view of a certain elder brother (thanks to the great God for sharing)

About the setting of the push's corner mark

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.