如何获取Android应用程序使用了亚行的shell的PID? [英] How to get pid of android application with out using adb shell?

查看:104
本文介绍了如何获取Android应用程序使用了亚行的shell的PID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能Android应用程序的PID,使用亚行shell.is有任何API得到PID了。 任何帮助将AP preciated

how can i get android application pid with out using adb shell.is there any api to get pid . any help will be appreciated

推荐答案

由于每个应用程序都有其自己的进程ID,可以通过

As every application has its own process id, one can get it by

int id= android.os.Process.myPid();

这篇关于如何获取Android应用程序使用了亚行的shell的PID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆