我在 Android 设备(Len. P70,Android.v 5.1)isSupported 错误。清单 xml 应该没问题。iOS 设备工作正常。最新推送通知 ANE 已下载(###### 2016.03.28 更新)
知道为什么吗?
这很可能是配置问题。该isSupported
标志检查您的应用程序的配置,并在您有所需的添加时返回 true。
确保您已添加其他 ANE,并且您拥有这些的最新版本:
此外,您已更新清单以包含所有新增内容(这些与 v2 不同),替换APPLICATION_PACKAGE
为您的应用程序包,例如air.com.distriqt.test
:
<manifest android:installLocation="auto">
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="23"/>
<uses-permission android:name="android.permission.INTERNET"/>
<!-- GCM PERMISSIONS -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- Only this application can receive the messages and registration result -->
<permission android:name="APPLICATION_PACKAGE.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="APPLICATION_PACKAGE.permission.C2D_MESSAGE" />
<application>
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="APPLICATION_PACKAGE" />
</intent-filter>
</receiver>
<service
android:name="com.distriqt.extension.pushnotifications.gcm.GcmListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<service
android:name="com.distriqt.extension.pushnotifications.gcm.InstanceIDListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<service android:name="com.distriqt.extension.pushnotifications.gcm.RegistrationIntentService" android:exported="false" />
<activity android:name="com.distriqt.extension.pushnotifications.PushNotificationsActivity">
<intent-filter>
<action android:name="APPLICATION_PACKAGE.NOTIFICATION_DEFAULT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- NOTIFICATIONS -->
<receiver android:name="com.distriqt.extension.pushnotifications.notifications.receivers.NotificationReceiver">
<intent-filter>
<action android:name="APPLICATION_PACKAGE.NOTIFICATION_SELECTED" />
<action android:name="APPLICATION_PACKAGE.NOTIFICATION_DELETED" />
<action android:name="APPLICATION_PACKAGE.NOTIFICATION_ACTION" />
<data android:scheme="dtpn" />
</intent-filter>
</receiver>
</application>
</manifest>
查看入门指南以获取详细信息:http ://airnativeextensions.com/extension/com.distriqt.PushNotifications#get-started