Is it possible in Android to kill an app(external app eg. google maps using intent from my app) started using implicit intent ?
-
yes, it is possible ... if app defines such intent explicit – Selvin Mar 24 '15 at 13:31
1 Answers
In the past, there were possible solutions for this. Task Killers for example, mostly used ActivityManager´s restartPackage()
method or android.os.Process.killProcess(process.pid)
.
Since API 8 it is deprecated. It turned to killBackgroundProcesses()
which, like the name said, only kills background processes. Since Android 4 (not sure if it is exactly 4 or 4.xx)ICS, this doesn´t work too. The Android API doesn´t allow to kill another apps, because the system do this work in a more efficient way. It was also a security leak, because if Your app could kill other apps, You can do too much things to take control.
It makes no sense to develop an app, where You can kill another app until Android 4 ICS, older versions will not be used in the future. So I think, don´t waste Your time to find a way, even if You found a way, it will be not possible on newer API in the future.
The only thing You can do is, kill Your own app. Or You need root permissions and/or install Your app as a system app.

- 9,800
- 2
- 36
- 49
-
Here i dont want to close other apps. I just want to close the app i started using intent (e.g google navigation app) from my app. So i should have the access to handle the app i start. Do you have any update on this? – gReEn HoRn Jan 06 '17 at 13:24