Googleplayservicescomponents: 71.1502.0-preview2 Firebase Messaging missing OnNewToken

Created on 4 Apr 2019  路  6Comments  路  Source: xamarin/GooglePlayServicesComponents

Xamarin.Android Version (eg: 6.0):

9.0

Operating System & Version (eg: Mac OSX 10.11):

Windows 10
Visual Studio 2017

Google Play Services Version (eg: 8.4.0):

71.1502.0-preview2

Describe your Issue:

Updated from 70.1710.0-preview2 to 71.1502.0-preview2

Steps to Reproduce (with link to sample solution if possible):

Create new android app through visual studio. Include the Xamarin.Firebase.Messaging nuget package. Implement a basic class for the FirebaseMessagingService like below.

[Service] [IntentFilter(new[] { "com.google.firebase.MESSAGING_EVENT" })] public class MessagingService : FirebaseMessagingService { public override async void OnNewToken(string token) { } }
The OnNewToken function is missing from the "FirebaseMessagingService " class. Initially updated an existing project from 70.1710.0-preview2 to 71.1502.0-preview2 had the same issue. Tried a fresh project and the issue still occurs. Am i correct in assuming that the version 70.1710.0-preview2 should include the OnNewToken function and the FirebaseInstanceIdService should still be deprecated or is this using an older version of firebase currently?

VS bug #840915

azdo-sync investigating

All 6 comments

Sure is missing, which is quite peculiar as it's not a special method in any sort of way. We'll look into this asap...

Analysis with decompilers has shown that there is no such method (not even obfuscated ones with the same signature).

Google's documentation does not state that this method is deprecated or removed, so it was added with add-node metadata.

Moving this to low priority, before closing.

Google deprecated both FireBaseInstanceIDService
"In favour of overriding onNewToken in FirebaseMessagingService. Once that has been implemented, this service can be safely removed."

Also InstanceID.getToken is deprecated in favour of getInstanceId().

Both methods are missing in the latest 71.1502.0-preview2 package. Do you plan not to add these methods?

Any word on when a new release/preview will be deployed with this fix? This is pretty critical and we're running into crashes with the current release.

The fix is in preview3, but we are having issues with building samples.

Some MacOSX builds are OK, some are not. Windows is failing. (Samples).

I'm working on fixing those issues.

@tony98789 @SharpMobileCode @markmeeus

It should be in preview4 - did grep for it, but no sample.

Closing this one to please my managers.

Reopen it or open new issue.

Cheers

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aoershov picture aoershov  路  5Comments

jahmai picture jahmai  路  10Comments

tomcio1205 picture tomcio1205  路  8Comments

jahmai picture jahmai  路  3Comments

tallkid10 picture tallkid10  路  12Comments