Hope all of you aware of this class, used to get notification token whenever firebase notification token got refreshed we get the refreshed token from this class, From follo
In KOTLIN:- If you want to save Token into DB or shared preferences then override onNewToken in FirebaseMessagingService
override fun onNewToken(token: String) {
super.onNewToken(token)
}
Get token at run-time,use
FirebaseInstanceId.getInstance().instanceId
.addOnSuccessListener(this@SplashActivity) { instanceIdResult ->
val mToken = instanceIdResult.token
println("printing fcm token: $mToken")
}