How do i get a background app to front over my current app
for example
my application << forground watzapp << background
how do i get watzapp in front ?
private ActivityManager am = (ActivityManager) this.getSystemService(ACTIVITY_SERVICE);
am.restartPackage("com.whatsapp");
i have searched but currently non was working anybody can share working code i will add to button click please.
I have a rooted device and i have been searching to kill or force stop other background apps non are working so i have come up with an idea that might work which is
call victim app to front find pid then kill it then go back into your app again.
on button click set 10 second delay call victim app to front kill app by pid when timer reaches 0 then your app pops in front
i have seen that when app is in forground you are able to get pid for that app. is this possible