Remember a user feedback that the app cannot receive push issues in the background

        After our large-scale promotion, many users in the user base today reported that the Android phone app cannot receive push messages from the app when it is in the background, and can only receive push messages when the app is in the foreground. But ios phones can receive push messages normally.

        When you get the problem, first think of trying to locate it from the following conveniences:

1. Whether the notification permission configuration of the user's mobile phone app is correct;
2. Actually trigger the push, and then check whether the Android mobile app can receive the message in the foreground and background;
3. Could it be that the push background of some scenarios has not been issued;

1. App notification permission configuration

        Paste the app message notification permission configuration of Xiaomi and oppo here:

2. The app is in the background to receive messages 

        It is verified that our app is in the background and can receive push messages.

3. Business operation, whether to send push in the background

        Execute business operations, the push is sent normally, and the Android app can also receive the push message.

4. Think

        After trying the above three methods, none of the user's problems can be reproduced. It's numb, I really don't know why the user can't receive the push. Continue to diverge thinking:

1. Could it be due to network reasons that the receipt cannot be received?
2. Will the app stay in the background for too long, and the push cannot be received for some unclear reasons?
3. Others

 5. Solutions

        Later, I learned from the development students of other teams in the company that because of the Android system, the app exits the foreground, returns to the background for more than 1 minute or is in the lock screen state, and cannot receive push messages. After actual verification, it is indeed the case.

        To solve this problem, we can only let our app access the manufacturer's push .

        

Guess you like

Origin blog.csdn.net/liuqinhou/article/details/130891448