This sounds ridiculous but I am banging my head for the past 2 days. Deeplink and FirebaseMessagingService are working absolutely perfect when I run the app through Android Studio. Neither deep link nor onNewToken() method is not called when I install the app manually by building the app through Generate APks. Really, I have no idea about this strange issue. Any help would be appreciated.
Asked
Active
Viewed 124 times
1 Answers
2
I think you have only saved debug SHA1 key on Firebase. You also have to save your release SHA1 key on Firebase. Here is link how to create the release SHA1 key

Muhammad chhota
- 1,837
- 2
- 16
- 27

Akash Suresh Dandwate
- 167
- 1
- 8
-
In spite of release sha1 key in firebase console, FirebaseMessagingService's onNewToken() should be called on the first launch – Jaya Prakash Feb 27 '19 at 06:41
-
The onNewToken method will only be called when a new token is generated. – Akash Suresh Dandwate Feb 27 '19 at 06:45
-
to get Token you have to do some thing like this. https://stackoverflow.com/a/41515597/10695093 – Akash Suresh Dandwate Feb 27 '19 at 06:47
-
Yes, but the real problem is it is not called in the release build deep-linking also not working but everything is working when I install through Android Studio with the USB cable. – Jaya Prakash Feb 27 '19 at 06:48
-
how u have generated your release sha1 key – Akash Suresh Dandwate Feb 27 '19 at 06:49
-
I have added SHA1 & SHA256 both keys in the firebase console – Jaya Prakash Feb 27 '19 at 06:55
-
you have to upload only sha1 key I am just saying how you have generated release sha1 key – Akash Suresh Dandwate Feb 27 '19 at 06:56
-
Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/189105/discussion-between-jaya-prakash-and-akash-suresh-dandwate). – Jaya Prakash Feb 27 '19 at 06:57
-
this way you can generate the keys see this post https://stackoverflow.com/a/15727931/10695093 – Akash Suresh Dandwate Feb 27 '19 at 06:58
-
It is working now, after adding SHA1 fingerprint, I have to clean the project – Jaya Prakash Feb 27 '19 at 07:23