【问题标题】:distriqt pushnotifications isSupported return false ( version = 3 )distriqt pushnotifications isSupported 返回 false ( version = 3 )
【发布时间】:2016-03-31 11:05:34
【问题描述】:

我在 Android 设备 (Len. P70, Android.v 5.1) isSupported false. 清单 xml 应该没问题。 iOS 设备工作正常。 最新 pushnotifications ANE 已下载(###### 2016.03.28 更新)

知道为什么吗?

【问题讨论】:

    标签: air ane distriqt


    【解决方案1】:

    这很可能是配置问题。 isSupported 标志检查您的应用程序的配置,并在您有所需的添加时返回 true。

    确保您已添加其他 ANE,并且您拥有这些的最新版本:

    • 核心
    • GooglePlay 服务
    • Android 支持

    您还更新了清单以包含所有新增内容(这些与 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

    【讨论】:

    • Core (2016.04.01) GooglePlayServices (更新到 v8487000) AndroidSupport (2015.11.18) GooglePlayServices (2016.03.28) AIR 21 但也尝试使用 19 (与 GooglePlayServices 中的编号相同)APPLICATION_PACKAGE - 根据我的应用程序 ID 清单的其余部分保持不变 IntelliJ IDEA 2016.1.1 但同时编译。 UNEXPECTED TOP-LEVEL ERROR: java.lang.OutOfMemoryError: Java heap space at com.android.dx.ssa.Dominators.&lt;init&gt;(Dominators.java:74) at com.android.dx.ssa.Dominators.make(Dominators.java:88) ...
    • 一旦我不包含 com.distriqt.AndroidSupportcom.distriqt.GooglePlayServices 编译就可以了。当然在这种情况下是支持失败
    • 你应该尝试增加intellij的可用内存:stackoverflow.com/questions/13578062/…
    猜你喜欢
    • 1970-01-01
    • 2017-03-19
    • 2018-01-03
    • 1970-01-01
    • 2013-06-07
    • 2019-01-09
    • 2018-01-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多