Code example for ZipFile

Methods: getEntry

		toRet = toRet + pi.versionCode + ":";
		//pi.lastUpdateTime API 9 and higher. grab this straight from the dex 
		ApplicationInfo ai = pi.applicationInfo;
		ZipFile zf;
		try { 
			zf = new ZipFile(ai.sourceDir);
			ZipEntry ze = zf.getEntry("classes.dex");
			long time = (ze.getTime() / 1000);  //time classes.dex was built will remain the same throughout installs (removing last 4 zeros to match appblade)
			toRet = toRet + time;
		} catch (IOException e) {
			//error grabbing build time. append "debug" instead 
			toRet = toRet + "debug";
		return toRet;
	 * A helper method to generate a SHA256 hash of a given file inside a package. 
	 * @param pi The PackageInfo that will provide the source directory in which to look.  
	 * @param filename String name of the file, from within the base source directory, that we want to generate our hash.