简体   繁体   中英

GCM Push Notification only works with Debug apk

I have gotten reports that my app does not send or receive notifications from users. When I run the app from Android Studio and send a notification to one of my devices that also has a debug version of the apk, I noticed it works fine. Both devices can receive and send notifications as expected. However when I try to run the same test with versions of the app from the Play Store, no notifications are sent or received. I have debugged this and found out that if I am trying to send a notification to a phone that has the Play Store version from a phone that has a debug version, the data sends but the phone with the debug version of the app does not receive the notification. Why is this and how do I fix?

The version on Play Store and your debug version are signed with different keys (as you cannot upload an app signed with a debug key to Play Store), and probably this is the case. You have to pass your public release key fingerprint to google so that they can recognize your app and transfer messages.

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