One, iOS push
A push action is generated only if the program is not running in the foreground.
iOS Push process:
Prior to this, the application needs to obtain the certificate (identity) provided by the Apple, and when sending a message to APNs through the server, it will need to verify and verify that it can get the right to send the push message. You can control when the push message is displayed.
|
Because of the closure of iOS, the push function is better than the Android system. |
IOS Push message display (user can set in Settings):
1, reminder, window tips + red bandages. Click Confirm, enter the application process or the window disappears. Apply the icon with a numeric bandage.
2, banner, banner tips + red bandages (IOS5.0 and above version support). Click to enter the application process.
The number of application retention tips is set by the user; a single hint cannot be deleted individually, you can delete the entire application's banner hint, and apply the icon with a numeric bandage.
3, no, red bandages. Apply the icon with a numeric bandage.
PS: When the application is in the foreground running state, there will be no push prompts, but can receive the message, through other ways in the application show.
Second, Android push
Android doesn't have a front-end push.
Android Push Process:
(1), SMS
Use SMS as a way to push messages. Applied to the SMS service, the mobile phone to extract information from the message, with the form of push to show. Rely on operators. No WiFi and 3G network. (Never tried)
(2), long connection
Keep the cell phone connected with the server for a long time, when there is data update, the server transmits data to the mobile phone. Benefits: Timely, simple rules, not enough: power consumption.
|
Similar to the push principle of iOS, but there are insufficient |
(3), polling
You need to control the polling time to ensure that the message reaches all users. Benefits: Low frequency, no power consumption, small impact on users, insufficient: The frequency of polling is too high, consumption of traffic, the rules are complex;
|
Create a-> receive with a time interval greater than one polling time to ensure that all users are pushed |
Android Push message display (user can set in Settings):
1, Banner form. Click to enter the application. You can also perform a delete operation.
From: https://www.douban.com/note/259831074/