xamarin-docs icon indicating copy to clipboard operation
xamarin-docs copied to clipboard

FirebaseInstanceIdService is deprecated

Open Happypig375 opened this issue 3 years ago • 5 comments

FirebaseInstanceIdService is deprecated

https://docs.microsoft.com/en-us/xamarin/android/data-cloud/google-messaging/remote-notifications-with-fcm?tabs=macos#implement-the-firebase-instance-id-service

Firebase.Iid.FirebaseInstanceIdService is deprecated, and according to https://stackoverflow.com/a/51129304/5429648, this is replaced with the overridable instance method Firebase.Messaging.FirebaseMessagingService.OnNewToken.

Happypig375 avatar Apr 11 '21 14:04 Happypig375

What is expressly needed is an example of the replacement of the associated manifest elements, especially the Receiver. I have been able to successfully obtain a token, send a message to Azure Notification Hubs which is reported in the Outcome as queued, but I am not receiving the message using OnMessageReceived.

alaskanrogue avatar May 21 '21 09:05 alaskanrogue

In the previous version of the manifest, the following two sections contained the referenced classes. What are their replacements.

Section 1 <service android:name="com.google.firebase.iid.FirebaseInstanceIdService" android:exported="true"> <intent-filter android:priority="-500"> <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/> </intent-filter> </service>

alaskanrogue avatar May 28 '21 01:05 alaskanrogue

Section 2

<!--Firebase Receiver --> <receiver android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" android:exported="false"/> <receiver android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" android:exported="true" /> <intent-filter> <action android:name="com.google.android.c2dm.intent.RECEIVE"/> <action android:name="com.google.android.c2dm.intent.REGISTRATION"/> <category android:name="$com.identitycheckpoint.sentry"/> </intent-filter> </receiver>

alaskanrogue avatar May 28 '21 01:05 alaskanrogue

@davidortinau @davidbritch Was the documentation needed ever created or found?

alaskanrogue avatar Jul 29 '21 17:07 alaskanrogue

+1

echolumaque avatar Jul 21 '22 16:07 echolumaque