And maybe thats also the case for my problem. Right now I always tested the other way around. Delayed the start of the service after an activity was created ...
k
Kilian
08/29/2023, 3:43 PM
yep i think it starts in the application before the app is considered to be in foreground. But maybe it’s because i use the service context to start the foreground service.
I do Application Start -> Service Start -> Service starts itself and shows notification.
I do this because previously i had Application Start -> Start Service as Foreground -> Show notification in on create of service.
However the app has only 5 seconds to show the notification else it’s force killed by the system and sometimes the delay was too big therefore i changed it.