Android can use push transparent transmission to achieve red dots, but it seems that Apple cannot use push to achieve red dots, so it must build its own long connection channel; A simpler solution can actively go to the server to request whether there are new messages when the page is switched. , or polling every few seconds to ensure a certain real-time performance, but this puts a certain burden on the server
android: In some projects, the red dots and push are separated. The backend has already processed them, and the red dots are implemented using interfaces in the project. Receive push messages at the same time
If you need to display a small red dot in real time, a long connection is essential. However, it is not necessary to develop your own heavy workload. You can use three-party Aurora Push or something to achieve it
If the notification bar allows notifications, you can use push notifications directly. If the notification bar notification cannot be displayed, Android can use transparent transmission. Not for ios. Also through the socket method or polling method
Android can use push transparent transmission to achieve red dots, but it seems that Apple cannot use push to achieve red dots, so it must build its own long connection channel;
A simpler solution can actively go to the server to request whether there are new messages when the page is switched. , or polling every few seconds to ensure a certain real-time performance, but this puts a certain burden on the server
android: In some projects, the red dots and push are separated. The backend has already processed them, and the red dots are implemented using interfaces in the project. Receive push messages at the same time
If you need to display a small red dot in real time, a long connection is essential. However, it is not necessary to develop your own heavy workload. You can use three-party Aurora Push or something to achieve it
Just push it and create an event to refresh the red dot
If the notification bar allows notifications, you can use push notifications directly. If the notification bar notification cannot be displayed, Android can use transparent transmission. Not for ios. Also through the socket method or polling method