Forum Xamarin.Android

FCM Notifications

AndxtorresAndxtorres MXMember ✭✭

Hi everyone,

Im using FCM Notifications and im able to get the Token only on DEBUG mode by running

[Service] [IntentFilter(new[] { "" })] public class MyFirebaseIIDService : FirebaseInstanceIdService { const string TAG = "MyFirebaseIIDService"; public override void OnTokenRefresh() { var refreshedToken = FirebaseInstanceId.Instance.Token; CrossSecureStorage.Current.SetValue("DeviceToken", refreshedToken); } }

If I run the app in Release mode, the on OnTokenRefresh() method is not called, can anyone help me?



  • TriviumEsolutionsTriviumEsolutions INUniversity

    I too facing same issue


    OnTokenRefresh() is called only when:
    App deletes Instance ID
    App is restored on a new device User
    uninstalls/reinstall the app
    User clears app data

Sign In or Register to comment.