I am developing an application which shows some specific allowed apps.If user tried to launch except these allowed apps i want to block them.
I know that it is possible to get running tasks using ActivityManager.getRunningTasks(..) and checked their package names.But RunningTask information gets only after launching of apps.Because of that when i am trying device back button , launches blocked application which is previously run and I am unable to continue.
How to prevent launching of blocked apps before their launch? Any help - much appreciated.
Thanks in Advance