3

I tried to make notification in android 8. First there was a problem with defining notification channel. After that I got notification in android pre-Oreo and android Oreo just when application was running. I tried Job Scheduler and JobIntentService and also AsyncTask to make notification in android Oreo when application is not running but every time I got crash with below message.

java.lang.RuntimeException: Unable to start receiver com.google.firebase.iid.FirebaseInstanceIdReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.firebase.MESSAGING_EVENT pkg=... (has extras) }: app is in background uid UidRecord{9078fd9 u0a148 RCVR idle procs:1 seq(0,0,0)}

What should I do for make notification in firebase background?

Frank van Puffelen
  • 418,229
  • 62
  • 649
  • 645
Karo
  • 253
  • 4
  • 16

1 Answers1

2

Use JobIntentService instead IntentService.


See also:

Tim Diekmann
  • 5,740
  • 9
  • 30
  • 53
Abdulmoiz Esmail
  • 415
  • 4
  • 15