|
SilverFish
Участник
Сказали спасибо: +14/-6
Offline
Сообщений: 784
|
|
Закрыть процесс в андроиде
« : 12 Май 2014, 16:41:35 »
|
|
Как закрыть из своей программы, запущенное стороннее приложение на Андроиде? Допустим запущен MX андроид медиа плеер. Как из своей программы можно его закрыть?
В справке по java:
android.os.Process.killProcess (int pid)
public static final void killProcess (int pid)
Added in API level 1
Kill the process with the given PID. Note that, though this API allows us to request to kill any process based on its PID, the kernel will still impose standard restrictions on which PIDs you are actually able to kill. Typically this means only the process running the caller's packages/application and any additional processes created by that app; packages sharing a common UID will also be able to kill each other's processes.
Как получить PID для MX плеера и как в С++ Builder будет выглядит код: android.os.Process.killProcess (int pid)?
Спасибо.
|