我尝试从'com.onesignal:OneSignal:3.12.2'
升级到'com.onesignal:OneSignal:[4.0.0, 4.99.99]'
,但在com.onesignal:OneSignal:[4.0.0, 4.99.99]
的文档中找不到com.onesignal.GcmBroadcastReceiver
的等效版本
以下是我用于升级的文档:https://documentation.onesignal.com/docs/android-13-push-notification-developer-update-guide
下面的代码是来自com.onesignal:OneSignal:3.12.2
的AndroidManifest.xml
文件的一段代码,我想将其替换为com.onesignal:OneSignal:[4.0.0, 4.99.99]
的等效代码
<receiver
android:name="com.onesignal.GcmBroadcastReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND">
<!-- High priority so OneSignal payloads can be filtered from other GCM receivers if filterOtherGCMReceivers is enabled. -->
<intent-filter android:priority="999">
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
1条答案
按热度按时间31moq8wy1#
com.onesignal.GcmBroadcastReceiver
在OneSignal SDK的4.0.0版本中被com.onesignal.FCMBroadcastReceiver
取代。FCMBroadcastReceiver
只是OneSignal-Android-SDK的实现细节,没有必要将其添加到您自己的AndroidManifest.xml
中,因为SDK已经为您提供了它:https://github.com/OneSignal/OneSignal-Android-SDK/blob/4.8.6/OneSignalSDK/onesignal/src/release/AndroidManifest.xml#L10-L19