Issue
So, my app will receive FCM push notification when I run the app in debug or release mode for Android or in my iOS app, no issue at all. but after publishing my app on the Google Play App Store, then suddenly my Android app will not receive FCM push notification.
I suspect this is related to Google Play App Signing, because I also have an issue with Google Sign In. I can solve the Google Sign In issue after copying the SHA-1 certificate fingerprint from the Google Play Console (App Integrity) to my Firebase Console
I have also added the SHA-1 release and debug to the firebase console.
but unfortunately I still have problem with Firebase Cloud Messaging, the message is just not appear on my notification tray.
am I missing something? please help :)
Solution
I finally can solve this problem.
in my case, this problem will occur if you publish your app using Google Play App Signing and you use API key restriction for your Android App in your Google Cloud Platform (GCP).
I would fail to get the FCM ID from the device, that's why our own backend could not send push notification to the Android device because FCM ID was not sent to our backend
here is the solution for this case
- Open your Google Play Console, you have to copy the SHA-1 certificate fingerprint from, you can find it on the left bar, please find Setup --> App Integrity
- open credentials section on the GCP console, and select your Android key. you can access it on here: https://console.cloud.google.com/apis/credentials
in my case the error that cause this problem was:
java.io.IOException: FIS_AUTH_ERROR
so if my solution doesn't work, you may need to follow this answer
I hope this helps
Answered By - Alexa289
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.