android.os.Process.killProcess(android.os.Process.myPid());Em quarta-feira, 22 de junho de 2016 17:18:03 UTC-3, gorio escreveu:
Boa tarde,Alguém saberia me dizer se consigo parar uma aplicação (pelo nome do pacote ou pid) ?Já tentei algumas coisas, mas não consegui parar..try {
ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE );
Log.e("GORIO", p.getPackageName() + " : " + p.pid);
android.os.Process.killProcess(p.pid);
android.os.Process.sendSignal(p.pid, android.os.Process.SIGNAL_KILL );
manager.killBackgroundProcesses(p. getPackageName());
} catch (Exception e) {
e.printStackTrace();
}Obrigado
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.






0 comentários:
Postar um comentário