简体   繁体   中英

FCM push notification receiving in Signed APK but not in debug

FCM push is working fine in Signed APK but when I am using the same server key and JSON in the debug version, the FCM is showing mismatch sender id. I have already added the SHA 1 in the firebase console and also tried with the legacy key but still getting the mismatch sender id error. Package name, google service JSON and the notification everything is the same for both cases but it's working only in the signed APK. How can I solve this issue?

this is my notification JSON

{"collapse_key":"axxxpex","data":{"match_id":7,"sound":"default","title":"test","body":"Goal....","android_channel_id":"channelone"},"to":"f8Yf3AxxxxxxxxxxxxEFXUrcKLxzRfyzfw-J5xxxxxxxxFCC","priority":"high","ttl":"86400s"}

Just use FCM OWNER account to send the notification on debug APK

Try to add signing configs for debug APK, generate SHA 1 for it and add it to firebase console

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