简体   繁体   中英

Firebase console - problem receiving test push FCM notification in android device

I am sending push notification using firebase console and i am getting "0% of potential users are eligible for this campaign: 0". and push notification is not displaying in mobile..If anyone got same experience and solve issue then please suggest me how can i solve this issue. I followed all the thing..that i added json file that i got from firebase.

Please check for the following:

  • Have you configured your android package name correctly.
  • Did you place the google-services.json file in android/src folder.
  • Make sure you have done all steps present in this link (If you using android studio i suggest going with option 2)
  • Get user token to send firebase messageFollow the steps

After all these if you still can't receive push notifications try setting channelid in advanced messaging options

Referhttps://firebase.google.com/docs/cloud-messaging/android/client link step by step and you will be good to go for your push notification using fcm and if you already implemented the basic things then compare your code with the sample code step by step mentions on the link. you must find out the error. let me know if it resolves your issue.

Go to Build --> clean project -->Rebuild project

(Build is at top in android studio)

Why it was not working - You must have had deleted google-services.json file and re-added it.

  1. Make sure you have only one firebase project configured for this app (if no then delete one you dont plan to use)
  2. Go to firebase setiings -> Left top angle -> settings icon -> Project settings -> scroll to bottom, then make sure to add SHA certificate fingerprints Type . How to get it
  3. Then (still on this page) press See SDK instructions button. And place google-services.json file in your project.
  4. If all this steps passed for you and you still getting this error then just wait a little bit, for me it take 2 days, before it started working.

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