Отправка push-уведомлений isSupported возвращает false (версия = 3)
У меня на устройстве Android (Len. P70, Android.v 5.1) поддерживается false. Манифест XML должен быть в порядке. iOS устройство работает нормально. Последние pushnotifications ANE загружены (###### 2016.03.28 Обновлено)
Есть идеи почему?
1 ответ
Скорее всего, это проблема конфигурации. isSupported
flag проверяет конфигурацию вашего приложения и возвращает true, когда у вас есть необходимые дополнения.
Убедитесь, что вы добавили дополнительные ANE и что у вас есть последняя версия этих:
- ядро
- GooglePlayServices
- AndroidSupport
Кроме того, вы обновили манифест, включив в него все новые дополнения (они отличаются от 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