My application not receiving any notifications installed on genymotion emulator. Firebase Token is not generating.
To use push notifications, you must install a compatible version of the Google APIs platform. To test your app on the emulator, expand the directory for Android 4.2. 2 (API 17) or a higher version, select Google APIs, and install it. Then create a new AVD with Google APIs as the platform target.
The emulator must enable the Google API for Google Play services. To resolve this issue, the mobile developer must create an emulator that uses Google API as the target OS.
Handling NotificationsGo to the app build gradle file. In the dependencies section, add the Firebase Cloud Messaging dependency and sync the project. Create a new class call PushNotificationService and have it extend the FirebaseMessagingService class. Go to the manifest file and add the service to the app.
Go to Firebase console — →Project Settings — →Cloud Messaging. To send the message select Body — →Raw — →JSON(application/json). You can send Notification Payload , Data Payload and even both using POSTMAN service.
Genymotion by default does not come with Google Play Services installed. Firebase requires Play Services to work.
To install, see https://stackoverflow.com/a/20137324/2234894
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