0

I know this issue has been discussed before; the main issue is related to the app updating from the play store. The implementation is working just fine, but when SDK 27 updates the app, it returns this crash. If I restart the phone, the crashing resolves.

I have an ongoing foreground service and I call startForground in the onStartCommand.

Any idea how to fix this?

I believe the issue is related to the service running and app getting the updates at the same time.

Artemis-a
  • 45
  • 4
  • try to migrate to `JobScheduler` or `JobService` please check [answer here](https://stackoverflow.com/questions/44425584/context-startforegroundservice-did-not-then-call-service-startforeground/53165650#answer-56534432) – Zain Nov 01 '20 at 22:41
  • "I have an ongoing foreground service and I call startForground in the onStartCommand" - call `startForground` in `onCreate` – Mark Nov 02 '20 at 00:01
  • How to do so both in onCreate and onStartCommand with notification, and why this only happens on sdk 27? – Artemis-a Nov 02 '20 at 09:48

0 Answers0