0

So I've recently updated my Google Play Services NuGet packages, and that has necessitated upgrading the Xamarin.Firebase.Iid package.

Following the guide here, I've added a class like this:

[Service, IntentFilter(new[] { "com.google.firebase.INSTANCE_ID_EVENT" })]
public class MyIidService : FirebaseInstanceIdService
{
    ...
}

Then I added a constructor for debugging purposes. The constructor is no longer being hit after the NuGet upgrade. This means that Firebase notifications no longer work in my app.

Does anyone know what the breaking changes are? I've upgraded from Xamarin.Firebase.Iid (Version 42.1001.0) to Version 42.2021.0.

I've tried removing the app, to make sure I got a new token. This didn't help, not on a physical device or the emulator.

@SushiHangover commented the following on a previous answer: v10.2.1 of the Firebase Android SDK introduced Android O preview changes to cloud messages (callback lifecycle changes, etc...) and that changed a lot of internals in those libraries.

Tim Klingeleers
  • 2,834
  • 14
  • 20
Rob Lyndon
  • 12,089
  • 5
  • 49
  • 74

1 Answers1

0

I won't mark this as accepted, but it is a workaround: this happens in the Debug configuration. Running the app in Release mode outside the debugger fixed the issue.

I have a feeling that the NuGet update was a coincidence. I imagine I uninstalled the app and rebuilt it before running it in Release.

Rob Lyndon
  • 12,089
  • 5
  • 49
  • 74