I use FCM
in my project
It work correct on Sony xperia, Galaxy S6, Motorola and more. But on Galaxy S3 i get java.io.IOException: SERVICE_NOT_AVAILABLE
error
Time of Galaxy S3 is auto and google play is updated
Internet connection is strong and i connected to open internet without proxy
Firebase Cloud Messaging (FCM) is a messaging solution that lets you reliably send messages at no cost to both Android & iOS devices. Using FCM, you can send data payloads (via a message) to a device for a specific application. Each message can transfer a payload of up to 4KB to a client.
This error is caused when the device is unable to register to Firebase. Make sure the internet is working when this code is called. And put the code within try-catch to stop app from crashing.
Edit: Either add an internet connection check before registering the device or fetching token. Or wrap the Fetch token code in try-catch block to prevent app from crashing.
Check following:
1- Internet connection
2- Phone date/time to be correct
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With