Is there a way to force-quit Google App (AKA Google Search
) from my app?
If so, how to do that?
In general, you will need ActivityManager's killBackgroundProcesses():
public static void killOtherPackage(Context ctx) {
if (ctx != null) {
ActivityManager am = (ActivityManager) ctx.getSystemService(ctx.ACTIVITY_SERVICE);
if (am != null)
am.killBackgroundProcesses("com.comp.prodline.specificpack");
}
}
Plus android.permission.KILL_BACKGROUND_PROCESSES in the manifest.
But I doubt that you will succeed killing Google's app.
More on this can be found in this thread.