Android Question StopAutomaticForeground And Sticky service

coslad

Well-Known Member
Licensed User
Longtime User
Is StopAutomaticForeground applicable even to Sticky service ?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Sticky services are less useful in newer versions of Android. The OS will not keep them running.

If the task is important then you should use a foreground service.

Is StopAutomaticForeground applicable even to Sticky service ?
Automatic foreground state is only entered when a service is started from a receiver. This is not the case with sticky services, when they start because of their "stickiness". So StopAutomaticForeground will not do anything in that case.
 
Upvote 0
Top