0

我想知道如何检查用户在 Android 手机(终端)中执行的最后一个应用程序。我正在使用ps命令进行检查,但没有显示时间戳。我想得到的是用户执行的最后一个应用程序的 PID。

有什么建议吗?

此致

4

2 回答 2

1

I would just use

adb logcat 

and check for the last user application which was executed (the pid is in the brackets). I doubt there's an more reliable way to retrieve this information as there might a lot of background process (own pid, own user) involved or running without connection to the last user process.

于 2011-03-10T10:46:28.400 回答
0

您还应该注意,要获取此类信息,您可能必须拥有一部有根电话

于 2011-03-10T11:12:42.690 回答