Reputation: 1194
I'm studying GCM (Google Cloud Messaging, old deprecated name is C2DM). I use different devices . operations run well , even if app is closed . but on nexus tablet, an error occurs when app is closed. if app is in progress , my GCM codes works on all devices that I try . Now : I looked for these problem and I found there was an error manifests of others . If my manifest is wrong , why do ohter devices except nexus tablet, execute my codes properly ? Could I think that my manifest is wrong?
this is my manifests :
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android.borda.C2DM"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<permission android:name="android.borda.C2DM.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="android.borda.C2DM.permission.C2D_MESSAGE" />
<!-- App receives GCM messages. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- GCM connects to Google Services. -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name="com.google.android.gcm.GCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="android.borda.C2DM" />
</intent-filter>
</receiver>
<service android:name=".GCMIntentService" />
</application>
</manifest>
Upvotes: 2
Views: 3094