I am using FCM token for push notification. How can I open a specific activity while incoming call receives. For example I want to open IncomingActivity which contains "Accept" and "Decline" button. How can I open when message receives (not onclick)
I tried the following but not working
override fun onMessageReceived(remoteMessage: RemoteMessage) {
super.onMessageReceived(remoteMessage)
Log.i(TAG, remoteMessage.data.toString())
val intent = Intent(this, VideoIncomingActivity::class.java)
startActivity(intent)
}