Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Handling device Token with “Plugin.FirebasePushNotification”

$
0
0

I installed the plugin written in the title. I'm a little bit confused about the devices token. I'm using this code in MainActivity class for android:

FirebasePushNotificationManager.Initialize(this, true);
CrossFirebasePushNotification.Current.OnTokenRefresh += (s, p) =>
{
System.Diagnostics.Debug.WriteLine($"TOKEN : {p.Token}");
StaticClass.NotificationsToken = p.Token;
};
so I get the token and save it in my static class. But when I set the resettoken to false to run the application normally on the device like this :

FirebasePushNotificationManager.Initialize(this, false);
How do I Get the device token? And is there something that could be called in PCL to save the token for both iOS and Android? Thanks in advance


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>