Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. public class MyReceiver extends BroadcastReceiver {
  2.  
  3. @Override
  4. public void onReceive(Context context, Intent intent) {
  5. /* Start the service with the internal poll intent */
  6. Intent outIntent = new Intent(Const.ACTION_INTERNAL_POLL, null, context, MyService.class);
  7. context.startService(outIntent);
  8. }
  9. }
  10.  
  11. 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)}
  12. 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:3194)
  13. 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.app.ActivityThread.-wrap17(Unknown Source:0)
  14. 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672)
  15. 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
  16. 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
  17. 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6494)
  18. 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
  19. 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
  20. 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
  21. 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)}
  22. 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1521)
  23. 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.app.ContextImpl.startService(ContextImpl.java:1477)
  24. 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.content.ContextWrapper.startService(ContextWrapper.java:650)
  25. 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.content.ContextWrapper.startService(ContextWrapper.java:650)
  26. 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at my.app.android.core.MyReceiver.onReceive(MyReceiver.java:40)
  27. 07-19 21:44:56.334 11096 11096 E AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:3187)
  28. 07-19 21:44:56.334 11096 11096 E AndroidRuntime: ... 8 more
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement