quickstart-android
quickstart-android copied to clipboard
FCM can't run well in Android Kitkat and JellyBean (not sure about ICS)
My environment
- Android device: Various Device (emulator, some old android device that i borrow from friend i forgot to write down their device name, its come from lenovo)
- Android OS version: Jelly Beans and Kitkat
- Google Play Services version: already try to the most updated
- Firebase/Play Services SDK version: the most updated (4.2.0 for services, 16.0.6 for firebase core, 17.3.4 for firebase messaging)
My problem description:
I trigger a push notification in onMessageReceived, and the problem is the push notification on Android Kitkat and Below. When im trying to debug the phone, an error appear as "E/FirebaseInstanceId: Token retrieval failed: PHONE_REGISTRATION_ERROR". This is not happend in other os and device, they all run without problem.
Steps to reproduce:
- I think the description already clear
Observed Results:
- the onMessageReceived doesn't triggered/run when there is a new message incoming and when i try to debug in Android Studio the
E/FirebaseInstanceId: Token retrieval failed: PHONE_REGISTRATION_ERROR
appear.
Expected Results:
- For FCM running in Android kitkat and below
Relevant Code:
Sorry, i doesn't know how to show the code, since its a privacy from my workplace. Maybe if you tell me which part of the code is important then i can try to show it.
oops, sorry i forgot to add the label , thanks for adding it @samtstern
I still can't found the solution, i am waiting for your help and guide @samtstern @kroikie . Thanks.
Hi @dvlwj, FCM is supported from Android 4.0 and later.
To clarify you have added the MESSAGING_EVENT
service to your AndroidManifest.xml
file?
@kroikie hi, sorry late respond, working on other project.
yes i already declare and added it in the manifest.
Same problem. If I debug the app with my own device (Android 9), the token is generated correctly. However, If I use an Android Studio virtual machine with Android 4.3, I get the log error message: E/FirebaseInstanceId: Token retrieval failed: PHONE_REGISTRATION_ERROR
I also get a lots the same errors predominantly from Asus and Huawei devices.
I'm facing the same behaviour for android api < 19. Does anybody found a answer for this issue?
Hi all, @gh-jvr , @cosic , @denmusic1992
Yes, until now I also can't find the solution for this. Last time, my team decided to make a declaration that our App can't support fully for KitKat and JellyBean.
Its will be good if we can got answer/solution from @kroikie now.
hey any body knows the solution? firebase token is getting null in jellybean 4.2.2