Push.SetSenderID(string) 已经过时了,我可以删除它吗?

Can I Remove Push.SetSenderID(string) Now That It's Obsolete?

删除已标记为 obsolete 的调用 Microsoft.AppCenter.Push.Push.SetSenderId 的代码行是否安全?

我更新了 Microsoft.AppCenter.Push,将 Xamarin.Android 目标框架增加到 8.1,更新了 AndroidManifest.xml,添加了 google-services.json 并按照以下步骤更新了 proguard 配置: https://docs.microsoft.com/appcenter/sdk/push/migration/xamarin-android

但是下面的警告不清楚我是否可以安全删除Microsoft.AppCenter.Push.Push.SetSenderId:

'Push.SetSenderId(string)' is obsolete: 'For all the Android developers using App Center, there is a change coming where Firebase SDK is required to use Push Notifications. For Android P, its scheduled at the release date for the latest OS version. For all other versions of Android, it will be required after April 2019. Please follow the migration guide at https://aka.ms/acfbxa.' (CS0618)

是的,您可以在完成 recommended steps:

后安全地删除 Microsoft.AppCenter.Push.Push.SetSenderId
  • 将 Xamarin.Android 目标框架增加到 8.1
  • 更新AndroidManifest.xml
  • 从 Firebase 添加 google-services.json

完成推荐步骤后,Microsoft.AppCenter.Push.Push.SetSenderId将不再执行SDK中的任何代码(本质上是空操作)。