我想要 android 2.2 版的第一次安装时间。我已经在 android 2.3 中完成,如何在 android 2.2 中完成这是我的代码
try
{
long installed = context.getPackageManager().getPackageInfo("com.simsys.securex", 0).firstInstallTime;
String DateTimeStamp=getDate(installed, "dd/MM/yyyy hh:mm:ss");
String dateTimeSync="Installed_Date:";
String dateTimeSync2=dateTimeSync.concat(DateTimeStamp);
TextView txtCurrentTime= (TextView)findViewById(R.id.textViewdatetime);
txtCurrentTime.setText(dateTimeSync2);
}
catch (NameNotFoundException e)
{
e.printStackTrace();
}