I am currently trying to make an android app that never ends(restarting when freeze/stopped/swiped/killed etc..) for a certain use.
So I am using background service with onTaskRemoved() to restart service when swiped out of recent app list. Also START_STICKY to keep it running background.
My app responds to my voice well(it shows toast) when there are not many new apps running on top of it. But when some time flies or there are 3~4 running apps on top of it, it just freezes(Does not respond to my voice).
Is there a way to make my app either always be running on top of other apps(like always on top of recent app list that shows up when pressed home button few seconds) or just simply restart the app if frozen?
Please help me out. I know it may sound weird trying to create an app that never ends, but if you help me out it will be a great help for my project.
Thank you :)