I'm coding an Android application. Now I'm going to a part where the application should kill a process. But I don't know its full name or its PID. I Know the commands:
android.os.Process.killProcess(Pid)
and
android.os.Process.getUidForName("com.android.email")
But my problem is that I don't know the full name of the process.
It's an native code process, so not something like com.something.something
The process is /data/data/com.something.something/mybinary
but it's running with commands like
/data/data/com.something.something/mybinary -a 123 -b 456
because of this I can't use
android.os.Process.getUidForName("/data/data/com.something.something/mybinary")
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…