Reve SaaS usages firebase messaging for receiving call and message when not registered with server.
To receive call and message you must integrate fire base messaging to your app.
For that case there can be 2 case :
- You need firebase messaging for your core application.
- You actually do not need firebase messaging for your core application but need it for Reve Saas.
In both case you need to integrate the firebase service in your app according to the official documentation.
After you set up the firebase messaging in your app, you handle the following cases.
1. You need firebase messaging for your core application:
Reve Saas has its own Firebase messaging service in the package. So, if you need firebase messaging in your core app, you have created a Service
in your app that extends FirebaseMessagingService
.
To get fire base to work in Reve SaaS, you just extend ReveFirebaseMessagingService
instead of FirebaseMessagingService
in your app.
Sample code:
public class AppFirebaseMessagingService extends ReveFirebaseMessagingService {
@Override
public void onNewToken(String refreshedToken) {
super.onNewToken(refreshedToken);
//your code below
}
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
//your code below
}
}
2. You actually do not need firebase messaging for your core application but need it for Reve SaaS
In that case, you do NOT need to do the following:
- Declare firebase dependency in gradle file
- Declare any firebase service in your app
But, you must NOT FORGET to declare google service plugin at the end gradle file.
apply plugin: 'com.google.gms.google-services'