Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

FirebaseInstanceId.Instance.Token is depricated and returns null in Xamarin.Android using Xamarin.Firebase.Messaging

FirebaseInstanceId.Instance.Token is deprecated in favour of GetInstanceId<InstanceIdResult>(),

enter image description here

So GetInstanceId< InstanceIdResult >() is the recommended way,

This is how you can consume it,

var instanceIdResult = await FirebaseInstanceId.Instance.GetInstanceId().AsAsync<IInstanceIdResult>();
var token = instanceIdResult.Token;

Tags:

Xamarin

Xamarin.Android

Xamarin.Forms

Firebase Cloud Messaging

Related

Menu is not opening a correct index div Could not create service of type FileAccessTimeJournal using GradleUserHomeScopeServices.createFileAccessTimeJournal() error in gradle Generate compiler warning if const char* array initialization comma is missing What is the being called here: return _() Blocked because of a disallowed MIME type (“text/html”) : Angular 8 deployed on tomcat 9.0.30 fails to serve the assets How do I make an infinite empty loop that won't be optimized away? Composer warning "Package zendframework/zend-code is abandoned" split string only by the first occurrence of a delimiter Hide navigation bar without losing swipe back gesture in SwiftUI Get the nearest distance with two geodataframe in pandas Defining Functions within Function in Julia Can the A20 line still be masked off on Haswell and successors?

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy