有什么方法来确定编程的Android应用程序是安装在哪个时间?我看不出在PackageInfo什么,等等。
Is there any way to determine programmatically the time at which an Android application was installed? I don't see anything in PackageInfo, etc.
- EDIT-- 为了澄清,一个应用程序被安装在十时在一段时间后,时间Y,应用B被安装。有什么办法附录二可以知道在安装应用程序中的什么时候?链接http://stackoverflow.com/questions/2831333/how-to-get-app-install-time-from-android/2920310#2920310表明阅读修改时间对应用程序的源代码目录就足够了。这真的是正确的吗?为什么?
--EDIT-- To clarify, App A is installed at Time X. At some later time, Time Y, App B is installed. Is there any way App B can know when App A was installed? The link http://stackoverflow.com/questions/2831333/how-to-get-app-install-time-from-android/2920310#2920310 indicates that reading the modify time on the source dir of the App is sufficient. Is this really correct? Why?
在安装/更新一个未受保护的应用程序,它的apk文件被写入 /data/app/package.name.apk
,混淆的引用为 sourceDir
(从my回答)重置时间戳到当前。就是这样。
When you install/update a non-protected app, it's apk file gets written to /data/app/package.name.apk
, confusingly referenced as sourceDir
(from my answer) resetting the timestamp to the current one. That's it.