Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MyReceiver extends BroadcastReceiver {
- @Override
- public void onReceive(Context context, Intent intent) {
- /* Start the service with the internal poll intent */
- Intent outIntent = new Intent(Const.ACTION_INTERNAL_POLL, null, context, MyService.class);
- context.startService(outIntent);
- }
- }
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: java.lang.RuntimeException: Unable to start receiver org.traffxml.roadeagle.android.core.MyReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { act=my.app.POLL cmp=my.app/.android.core.MyReceiver (has extras) }: app is in background uid UidRecord{dfb1a59 u0a169 RCVR idle change:idle|uncached procs:1 seq(0,0,0)}
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:3194)
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.app.ActivityThread.-wrap17(Unknown Source:0)
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672)
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6494)
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { act=my.app.POLL cmp=my.app/.android.core.TraffReceiver (has extras) }: app is in background uid UidRecord{dfb1a59 u0a169 RCVR idle change:idle|uncached procs:1 seq(0,0,0)}
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1521)
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.app.ContextImpl.startService(ContextImpl.java:1477)
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.content.ContextWrapper.startService(ContextWrapper.java:650)
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.content.ContextWrapper.startService(ContextWrapper.java:650)
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at my.app.android.core.MyReceiver.onReceive(MyReceiver.java:40)
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:3187)
- 07-19 21:44:56.334 11096 11096 E AndroidRuntime: ... 8 more
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement