android - Permission Denial: receiving Intent -


I have created an air native extension for Android push notifications, but I get an exception like this when I run the app Is:

Permission denied: Get the intent {act = com.google.android.c2dm.intent.REGISTRATION cat = [air.com.test.mobile] (additional)} to air.com.test .mobile Air.com.test.mobile.permission.C2D_MESSAGE is required for debug com.google.android.gsf (uid 10019)

Manifest:

  & lt; android & gt; & Lt; colordepth & gt; 16bit & lt; / Colordepth & gt; & Lt; manifestAdditions & gt; & Lt ;! [CDATA [& lt; Manifest Android: installLocation = "auto" & gt; & Lt; Usage-permission Android: name = "android.permission.INTERNET" /> & Lt; Usage-permission Android: name = "android.permission.DISABLE_KEYGUARD" /> & Lt; Use-permission Android: name = "android.permission.WAKE_LOCK" /> & Lt; Usage-permission Android: name = "android.permission.ACCESS_NETWORK_STATE" /> & Lt; Usage-permission Android: name = "android.permission.VIBRATE" /> & Lt; Usage-permission Android: name = "android.permission.GET_ACCOUNTS" /> & Lt; Permission Android: name = "air.com.test.mobile.permission.C2D_MESSAGE" Android: protectionLevel = "signature" /> & Lt; Usage-permission Android: name = "air.com.test.mobile.permission.C2D_MESSAGE" /> & Lt; Usage-permission Android: name = "com.google.android.c2dm.permission.RECEIVE" /> & Lt; Apps Android: Enabled = "True" Android: Hardware Expected = "Wrong" & gt; & Lt; Receiver Android: name = "com.google.android.gcm.GCMBroadcastReceiver" Android: permission = "com.google.android.c2dm.permission.SEND" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "com.google.android.c2dm.intent.RECEIVE" /> & Lt; Action Android: name = "com.google.android.c2dm.intent.REGISTRATION" /> & Lt; Category android: name = "air.com.test.mobile" /> & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt; & Lt; Service Android: name = "com.adobe.sampleasextension.GCMIntentService" /> & Lt; Activity Android: excludeFromRecents = "false" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt; & Lt; / Application & gt; & Lt; / Reveal & gt; ]] & Gt; & Lt; / ManifestAdditions & gt; & Lt; / Android & gt;  

OK, depending on the error you received , I suggest you add the following to your manifest:

  Android: Android: security policy = "signature" Android: name = "air.com.test.mobile.permission.C2D_MESSAGE" / & Gt; & Lt; Usage-permission Android: name = "air.com.test.mobile.permission.C2D_MESSAGE" /> Edit:  

I have noticed that the error also refers to air.com.test.mobile.debug . Which of these is the main package of your app? You should probably change all the relevant locations in your manifest, from air.com.test.mobile to air.com.test.mobile.debug .

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -