I think he means the way Whatsapp runs forever in the background and not the functionality of Whatsapp.
Yes, you understand my problem.
You would need something like a watchdog/daemon/service that would respawn every x secs/minutes if it notices it's not running? start app on phone bootup etc.
BroadcastReceiver/Intent and permissions to start the app on boot?
What I do to deploy my app who starts on phone boot?
I tried to run my app and I notice that my app works correctly even in background, but my app is quite simple to stop working because it can kills by recent apps. Often my app is accidentally closed from recent apps
Then I search a way to modify/rewrite my app to runs like a service but service not have gui functionality. I need GUI functionality to interact with the users for get some parameters
Thanks.