Code example for PackageManager.NameNotFoundException

Methods: printStackTrace

0
							GlobalContext.getActivity(). 
							getPackageName(), 0); 
			version = pInfo.versionName;
		} catch (NameNotFoundException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} 
		return version;
	} 
	 
	public static long getCurrentGMTTimeInMIlls(){ 
		//Current location time inMillis - timeZoneOffset = GMT time inMillis 
		Calendar calendar = Calendar.getInstance();
		long unixTime = calendar.getTimeInMillis();
		long unixTimeGMT = unixTime - TimeZone.getDefault().getRawOffset();
		return unixTimeGMT;
	} 
	 
//	public static long getUnixTimeInMills(){ 
//		return System.currentTimeMillis(); 
//	}