软件包管理系统问题的android [英] PackageManager issue in android
本文介绍了软件包管理系统问题的android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不能properManner获取日期,我用软件包管理系统
:
I can't get date in properManner, I use PackageManager
:
code例如的
Code example
::List<PackageInfo> applications = getPackageManager().getInstalledPackages(0);
for(PackageInfo info : applications){
// Drawable icon = info.applicationInfo.loadIcon(getBaseContext());
long firstInstalled = info.firstInstallTime;
long lastUpdate = info.lastUpdateTime;
System.out.println("firstInstalled"+firstInstalled);
如果我打印
firstInstalled为 logcat的,然后我得到的结果firstInstalled为1305907770197
我也无法理解这是什么?你能帮助我吗?
if I print
firstInstalled to LOGCAT then I got result "firstInstalled is 1305907770197"
I can't able to understand what is this? can you help me?
推荐答案
低于code使用
Date d = new Date(firstInstalled);
d.getDate();
d.getMonth();
d.getYear();
这篇关于软件包管理系统问题的android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文