Using your own FCM
Enjoy the benefits of the Ocamba push service even if you are using FCM push notifications with your FirebaseMessagingService.
For example:
Create FirebaseMessagingService:
@Override public void onMessageReceived(RemoteMessage remoteMessage) { super.onMessageReceived(remoteMessage); OcambaHoood.notification().onMessageReceived(remoteMessage); } @Override public void onNewToken(String token) { super.onNewToken(token); OcambaHoood.notification().pushToken(token); }
Add service to AndroidManifest.xml:
<service android:name=".NotificationReceiver"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT"/> </intent-filter> </service>