freshplanet / ANE-Push-Notification

Air Native Extension (iOS and Android) for Push Notification
Apache License 2.0
205 stars 104 forks source link

unregistered when receiving GCM Message in the case of API level 15 or less #49

Closed coppepam closed 7 years ago

coppepam commented 10 years ago

Hi.

I sent GCM message from my server. it working fine in Android 4.3. But, in the case of Android 4.0.3, console display "Unregistered successfully".

please help me... help... please.....

        <manifest android:installLocation="auto">
            <uses-permission android:name="android.permission.INTERNET"/>
            <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
            <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
            <uses-permission android:name="android.permission.GET_ACCOUNTS" />
            <uses-permission android:name="android.permission.WAKE_LOCK" />
            <uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
            <permission android:name="push.test.permission.C2D_MESSAGE" android:protectionLevel="signature" />
            <uses-permission android:name="push.test.permission.C2D_MESSAGE" />
            <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
            <application android:enabled="true" android:debuggable="true">
                <activity android:name="com.freshplanet.nativeExtensions.NotificationActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
                <receiver android:name="com.freshplanet.nativeExtensions.C2DMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
                   <intent-filter>
                       <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
                       <category android:name="push.test" />
                   </intent-filter>
                   <intent-filter>
                       <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                       <category android:name="push.test" />
                   </intent-filter>
               </receiver>
               <service android:name="com.freshplanet.nativeExtensions.LocalNotificationService"/>
               <receiver android:name="com.freshplanet.nativeExtensions.LocalBroadcastReceiver" android:process=":remote"></receiver>
                <activity android:excludeFromRecents="false">
                    <intent-filter>
                        <action android:name="android.intent.action.MAIN"/>
                        <category android:name="android.intent.category.LAUNCHER"/>
                    </intent-filter>
                </activity>
            </application>
        </manifest>
chinomol commented 10 years ago

Same problem, any solution?

coppepam commented 10 years ago

Hi. chinomol.

I didn't resolve the problem. I use different ane now.

enpela commented 9 years ago

I also had been plagued by the same phenomenon.

For I examine the "Unregistered successfully", I've added a "trace("【onStatus】" + e.code + "\n" + e.level);" to the "onStatus(e:StatusEvent)" of the "PushNotification.as". When to "e.level", there was a character of "air.APP_ID".

So, I add a "air." to APP_ID for manifest, my problem was resolved.

coppepam commented 9 years ago

Hi. enpela.

Thank you for advising. I don't use this ane now. But, the manifest file in my project is written as same as your advice now. So, maybe your advice is correct.

Thank you! (sorry. I am not good at English.)