Code example for ZipEntry

Methods: getTime

0
			ApplicationInfo applicationInfo = packageManager.getApplicationInfo(packageName, 0);
			ZipFile zipFile = new ZipFile(applicationInfo.sourceDir);
			ZipEntry zipEntry = zipFile.getEntry("classes.dex");
			SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yy HH:mm", Locale.ENGLISH);
			dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
			return dateFormat.format(new java.util.Date(zipEntry.getTime()));
		} catch (Exception e) {
		} 
		return "unknown"; 
	} 
 
	public static String getDeviceBrandProduct() {
		return Build.BRAND + "/" + Build.PRODUCT + "/" + Build.DEVICE;
	} 
 
	// some devices cannot use SoundPool and MediaPlayer simultaneously due to a bug 
	// - currently just Galaxy Tab 10.1 with original SDK version 
	public static boolean hasSoundPoolBug() { 
		ArrayList<String> devices = new ArrayList<String>();
		if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
			devices.add("samsung/GT-P7510/GT-P7510"); // Samsung Galaxy Tab 10.1