安装时间为Android应用程序? [英] Install time for Android application?

查看:163
本文介绍了安装时间为Android应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法来确定编程的Andr​​oid应用程序是安装在哪个时间?我看不出在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被安装。有什么办法附录二可以知道在安装应用程序中的什么时候?链接<一个href="http://stackoverflow.com/questions/2831333/how-to-get-app-install-time-from-android/2920310#2920310">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 (从<一个href="http://stackoverflow.com/questions/2831333/how-to-get-app-install-time-from-android/2832419#2832419">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.

这篇关于安装时间为Android应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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