• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps My app restarts when a new process is created

So, I am making an app with a toggleable button, when the toggle is set to true, I need the phone to keep running in the background with the settings and code to run, that all works, except if I load a new process like listen to a song, or open a new app, then go back into my app, the button is disabled and the onCreate function is called.
 
You're going to have to post your code, onCreate() typically should only be called if you're doing something like finish(), although your activity lifecycle could end for other reasons.

Impossible to know without code.
 
Back
Top Bottom