Display the Android application.apk creation date in Application -


i developing android application, want display version of .apk , date can able display app version of application using packageinfo , want display date when app created or .apk creation date.

method checks date of last modification of classes.dex, means last time when app's code built:

 try{  applicationinfo ai = getpackagemanager().getapplicationinfo(getpackagename(), 0);  zipfile zf = new zipfile(ai.sourcedir);  zipentry ze = zf.getentry("classes.dex");  long time = ze.gettime();  string s = simpledateformat.getinstance().format(new java.util.date(time));   }catch(exception e){  } 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -