Code example for ZipEntry

Methods: getTime

0
	public long getCompileDateTime() throws NameNotFoundException, IOException { 
		ApplicationInfo ai = getPackageManager().getApplicationInfo(
				getPackageName(), 0);
		ZipFile zf = new ZipFile(ai.sourceDir);
		ZipEntry ze = zf.getEntry("classes.dex");
		long time = ze.getTime();
		return time;
	} 
 
	/*** 
	 * Saves an (integer) preference to the global prefs var. 
	 *  
	 * @param preferenceName 
	 *            the name of the preference 
	 * @param value 
	 *            the (new) value of the preference 
	 */ 
	protected void savePreference(String preferenceName, int value) {
		Editor e = prefs.edit();
		e.putInt(preferenceName, value);
		e.commit();