I want to develop an app which needs to be in memory until user clicks the force stop button in the task manager screen then only its broadcast receivers can trigger by particular event and i can do my works.
I have been searching for this solution a long time. A lot saying that's not possible. But i have seen that face book and class of clans applications always running and kept in memory even clearing all recent applications. Now someone help me how to do that? Thanks in advance!
Update: I used Services Which returns START_STICKY its not a good idea when lower memory devices.. and I used
startForeground(id, notification);
still some devices clears the foreground service if i clear recent items...
watsapp and Facebook like applications using some ideas to do that without foreground notifications...In all of the devices clearing recent items doesnt affect the applications services like facebook and watsapp those applications services always running and I am keep receiving notifications from them!!
All I need is I want my receiver to run until I uninstall my app or go-to task manager and force closes it or android closes it under some low memory circumstances... Until that imy receiver has to go on .. that's it!
Hope you guys understand my pblm!!!