我想如果我打开我的应用程序必须显示最后更新的时间.. [英] I Want If I Open My Application The Last Updated Time have to Be Displayed ..

查看:74
本文介绍了我想如果我打开我的应用程序必须显示最后更新的时间..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai friends。,Am Anandraj ..我是android的新手我创建了一个应用程序。如果我打开我的应用程序必须显示最后更新时间..在Android中有任何编码或如何在我的应用程序中显示上次更新时间..



请立即帮我.........

Hai friends., Am Anandraj .. am new to android i created one application. in that If i open my application the last update time have to be displayed ..Is there any codings for that in android or how to displayed last updated time in my application..

Please help me immediately.........

推荐答案

PackageManager pm = context.getPackageManager();
ApplicationInfo appInfo = pm.getApplicationInfo("app.package.name", 0);
String appFile = appInfo.sourceDir;
long time = new File(appFile).lastModified();



未经测试,但应该有效。 ;)



-KR


Not tested, But should work. ;)

-KR


这篇关于我想如果我打开我的应用程序必须显示最后更新的时间..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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