Reputation: 21
I am trying to write a service that can listen for volume key presses but I have read somewhere that services are not supposed to react to user actions. Does that apply to foreground services as well??
Thanks!
Upvotes: 0
Views: 548
Reputation:
Foreground services are normal services, the only difference is that those are less-likely/not killed when the system is low on memory, because the user is actively aware of them (e.g. downloading a file with a progress indicator as a notification). It's only a higher priority memory wise if you will.
So yes, that applies to those as well.
Upvotes: 1