xamarin-docs
xamarin-docs copied to clipboard
FirebaseInstanceIdService is deprecated
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
.
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.
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>
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>
@davidortinau @davidbritch Was the documentation needed ever created or found?
+1