Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
278 views
in Technique[技术] by (71.8m points)

Get Application Installed Date on Android

Is there are way to find out the "Date when an application was installed" on an Android Device.

Have searched extensively, but unable to find relevant answer.

Was unable to find anything regarding Date when Application was Installed through PackageManager documentation/Code.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

or this one (API Level 9 upwards!):

long installed = context
    .getPackageManager()
    .getPackageInfo(context.getPackag??eName(), 0)
    .firstInstallTime
;

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...