FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
02/18/16 03:53 AM (8 years ago)

App Crashing when allowing push notifications

Hi guys, having wierd problem with android app, i have managed to sort push on all my android apps, through great advice given here, but with new app, soon as i press the yes to allow push notification in the control panel, the app crashes, im thinking its right before the app asks if you wanna allow push, soon as i turn this off in control panel, the app works great, here what my panel in google play sais in Crashes & ANRS. java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bdsdriving/com.bds.BT_activity_host}: java.lang.IllegalStateException: Application does not define permission com.bdsdriving.permission.C2D_MESSAGE at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2343) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2395) at android.app.ActivityThread.access$600(ActivityThread.java:162) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5371) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalStateException: Application does not define permission com.bdsdriving.permission.C2D_MESSAGE at com.google.android.gcm.GCMRegistrar.checkManifest(GCMRegistrar.java:137) at com.bds.BT_activity_host.configureEnvironment(BT_activity_host.java:295) at com.bds.BT_activity_host.onCreate(BT_activity_host.java:129) at android.app.Activity.performCreate(Activity.java:5201) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1084) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2307) java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bdsdriving/com.bds.BT_activity_host}: java.lang.IllegalStateException: Application does not define permission com.bdsdriving.permission.C2D_MESSAGE at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2695) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769) at android.app.ActivityThread.access$900(ActivityThread.java:177) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1430) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5910) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200) Caused by: java.lang.IllegalStateException: Application does not define permission com.bdsdriving.permission.C2D_MESSAGE at com.google.android.gcm.GCMRegistrar.checkManifest(GCMRegistrar.java:137) at com.bds.BT_activity_host.configureEnvironment(BT_activity_host.java:295) at com.bds.BT_activity_host.onCreate(BT_activity_host.java:129) at android.app.Activity.performCreate(Activity.java:6178) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2648) Im obviously need to change or allow some permissions, these are added in permissions in manifest. com.bds.permission.C2D_MESSAGE (permission com.bds.permission.C2D_MESSAGE (uses permission what am i doing wrong guys. Thanks Sean
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
02/18/16 04:25 AM (8 years ago)
ps this is what logcat is saying 02-18 11:06:24.052: E/AndroidRuntime(8686): FATAL EXCEPTION: main 02-18 11:06:24.052: E/AndroidRuntime(8686): Process: com.bdsdriving, PID: 8686 02-18 11:06:24.052: E/AndroidRuntime(8686): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bdsdriving/com.bds.BT_activity_host}: java.lang.IllegalStateException: Application does not define permission com.bdsdriving.permission.C2D_MESSAGE 02-18 11:06:24.052: E/AndroidRuntime(8686): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2235) 02-18 11:06:24.052: E/AndroidRuntime(8686): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2285) 02-18 11:06:24.052: E/AndroidRuntime(8686): at android.app.ActivityThread.access$800(ActivityThread.java:138) 02-18 11:06:24.052: E/AndroidRuntime(8686): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1236) 02-18 11:06:24.052: E/AndroidRuntime(8686): at android.os.Handler.dispatchMessage(Handler.java:102) 02-18 11:06:24.052: E/AndroidRuntime(8686): at android.os.Looper.loop(Looper.java:149) 02-18 11:06:24.052: E/AndroidRuntime(8686): at android.app.ActivityThread.main(ActivityThread.java:5061) 02-18 11:06:24.052: E/AndroidRuntime(8686): at java.lang.reflect.Method.invokeNative(Native Method) 02-18 11:06:24.052: E/AndroidRuntime(8686): at java.lang.reflect.Method.invoke(Method.java:515) 02-18 11:06:24.052: E/AndroidRuntime(8686): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787) 02-18 11:06:24.052: E/AndroidRuntime(8686): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:603) 02-18 11:06:24.052: E/AndroidRuntime(8686): at dalvik.system.NativeStart.main(Native Method) 02-18 11:06:24.052: E/AndroidRuntime(8686): Caused by: java.lang.IllegalStateException: Application does not define permission com.bdsdriving.permission.C2D_MESSAGE 02-18 11:06:24.052: E/AndroidRuntime(8686): at com.google.android.gcm.GCMRegistrar.checkManifest(GCMRegistrar.java:137) 02-18 11:06:24.052: E/AndroidRuntime(8686): at com.bds.BT_activity_host.configureEnvironment(BT_activity_host.java:295) 02-18 11:06:24.052: E/AndroidRuntime(8686): at com.bds.BT_activity_host.onCreate(BT_activity_host.java:129) 02-18 11:06:24.052: E/AndroidRuntime(8686): at android.app.Activity.performCreate(Activity.java:5231) 02-18 11:06:24.052: E/AndroidRuntime(8686): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 02-18 11:06:24.052: E/AndroidRuntime(8686): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2199) 02-18 11:06:24.052: E/AndroidRuntime(8686): ... 11 more 02-18 11:06:24.052: W/ActivityManager(478): Force finishing activity com.bdsdriving/com.bds.BT_activity_host 02-18 11:06:24.102: E/IMGSRV(151): :0: PVRDRMOpen: TP3, ret = 52 02-18 11:06:24.572: W/ActivityManager(478): Activity pause timeout for ActivityRecord{21db8848 u0 com.bdsdriving/com.bds.BT_activity_host t13 f} 02-18 11:06:24.622: E/IMGSRV(151): :0: PVRDRMOpen: TP3, ret = 42 02-18 11:06:24.822: I/WifiHW(478): CMD: IFNAME=wlan0 SIGNAL_POLL
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
02/18/16 09:17 AM (8 years ago)
Hi guys, Ive managed to figure it out, i thought it was strange that i hadnt come across this error before, so uninstalled everything and started fresh, and no errors with push working fine, Thanks Guys Sean
 
Dennis Meza
Apple Fan
Profile
Posts: 4
Reg: Jul 11, 2016
Toronto
40
like
07/11/16 09:15 PM (8 years ago)
I had this problem with my apps. I did the same to resolve it.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.