Skip to content Skip to sidebar Skip to footer

Android: Java.lang.illegalstateexception: No Receiver Allowed To Receive Com.google.android.c2dm.permission.send

Hey guys I am trying to implement GCM to my app. However I keep getting this annoying error for some reason: java.lang.IllegalStateException: No receiver allowed to receive com.goo

Solution 1:

The <receiver> and <service> are inside your <activity> but it should be inside <application>.

Like this:

<application><activityandroid:name=".Home"android:configChanges="keyboard|orientation|navigation|locale"android:label="@string/app_name"android:screenOrientation="portrait" ></activity><receiverandroid:name=".GCMBroadcastReceiver"android:permission="com.google.android.c2dm.permission.SEND" ><intent-filter><!-- Receives the actual messages. --><actionandroid:name="com.google.android.c2dm.intent.RECEIVE" /><!-- Receives the registration id. --><actionandroid:name="com.google.android.c2dm.intent.REGISTRATION" /><categoryandroid:name="com.myapp.user" /></intent-filter></receiver><serviceandroid:name=".GCMIntentService"android:exported="true"/></application>

Post a Comment for "Android: Java.lang.illegalstateexception: No Receiver Allowed To Receive Com.google.android.c2dm.permission.send"