Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't get Firebase Notifications in Genymotion Emulator

My application not receiving any notifications installed on genymotion emulator. Firebase Token is not generating.

like image 420
SachinS Avatar asked Mar 04 '17 16:03

SachinS


People also ask

Do push notifications work on Android emulator?

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.

Does Push Notification working on emulator?

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.

How do I get Firebase notifications on Android?

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.

How do I get Firebase to push notifications?

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.


1 Answers

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

like image 181
KittoKatto Avatar answered Sep 30 '22 06:09

KittoKatto