I have a service with startForeground(requestCode, notification);
and have it set so that setOngoing(true)
so the user cannot remove notification. How long does this notification stay alive for? Will it stay alive forever (until user restarts phone)?
I have noticed that if I start the service and let the phone sit idle for a few hours that the notification is still present but becomes unresponsive to the button click service methods. Is this the case because I do not have a partial wake lock?
This notification is for controlling android settings like brightness setting which is why I need the notification running always.
Would it be better to use a normal notification with setOngoing(true) and then start a service which would call a method for each button that is clicked?