9.0
Windows 10
Visual Studio 2017
71.1502.0-preview2
Updated from 70.1710.0-preview2 to 71.1502.0-preview2
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
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