Skip to main content

Push Notifications

Push Notifications for Apps with Firebase

  • If your project has not Firebase dependency implemented, you need to declare it inside your app Build.gradle file:
implementation "com.google.firebase:firebase-core:${FIREBASE_CORE_VERSION}"
  • Add the following code in your FirebaseMessagingService class:
class YourFirebaseMessagingService : FirebaseMessagingService()  {

override fun onMessageReceived(remoteMessage: RemoteMessage) {
super.onMessageReceived(remoteMessage)

MDVideoCallFirebaseMessagingService.onMessageReceived(remoteMessage)
}

}
  • If your App update your Firebase Token, you must update to our SDK, you can do this the following way, e.g. in your FirebaseMessagingService class:
public class YourFirebaseMessagingService extends FirebaseMessagingService {
....
override fun onNewToken(token: String) {
super.onNewToken(token)
VideoCallClient.onNewTokenReceived(token)
}
}

Versions 3.0.10+

In versions 3.0.10 or higher, to do the correct flow of the notification push, you must add this line in your MAIN Activity (SplashActivity, MainActivity...)

VideoCallClient.onNotificationDataReceived(intent.extras!!)