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
  • 565,676
  • 79
  • 828
  • 807
Karo
  • 273
  • 4
  • 16

1 Answers1

2

Use JobIntentService instead IntentService.


See also:

Tim Diekmann
  • 7,755
  • 11
  • 41
  • 69
Abdulmoiz Esmail
  • 425
  • 4
  • 15