Every time on token refresh is called when the application is launched

a94_89Chauhana94_89Chauhan USMember ✭✭
edited June 2018 in General

on token refresh call only when

App deletes Instance ID
App is restored on a new device
User uninstalls/reinstall the app
User clears app data

but On token refresh every time call when the app is Launched.

how can we one time call token refresh event when the app is installed?

any solution of that problem?

**My code is **

MyFirebaseIIDService :

[Service]

[IntentFilter(new[] { "com.google.firebase.INSTANCE_ID_EVENT" })]

public class MyFirebaseIIDService : FirebaseInstanceIdService 
{
    const string TAG = "MyFirebaseIIDService";

    public override void OnTokenRefresh()
    {
       var refreshedToken = FirebaseInstanceId.Instance.Token;
       Log.Debug(TAG, "Refreshed token: " + refreshedToken);
        SendRegistrationToServer(refreshedToken);            
    }
}

AndriodMainfest.Xaml:












</receiver>

Sign In or Register to comment.