简体   繁体   中英

Parse push notification android device token not saved in some cases

I am using parse as my app back-end service provider. My app has really important feature of Push notification.

Parse is not saving the device token in some cases. Mostly when user is installing the app from America/Los_Angeles region.

在此输入图像描述

Is this Parse.com sdk integration problem or Google is not sending device token in some region? How can i fix this issue?

I've just ran a quick check on our Parse backend and found that there are also missing device tokens in our database, too.

I think you should not send push notifications based on device token, but based on user on that device.

To do that, first add a new field in Installations table called user . If your app requires explicit login from user, then when user logs in, update the installation with that user's ID. If it is implicit (registers upon installation so App is ready to go as soon as user opens the app), then just associate that user in the same manner on app install.

In the end, you are most likely to want to send your notifications to your user rather than a specific device. This also makes data transferring a lot easier.

This issue was sometimes observed due to failure to get the token from Google. You should check the device token availability, if you don't get it, you should try it again after some time from your app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM