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[] { "com.google.firebase.INSTANCE_ID_EVENT" })] 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?

Thanks!

Posts

  • TriviumEsolutionsTriviumEsolutions INUniversity

    I too facing same issue

  • ASHISHKUMAR.8068ASHISHKUMAR.8068 USMember ✭✭

    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.