Code example for PackageManager

Methods: getApplicationInfo

0
	String retrieveApkPath() {
		String apkFilePath = null;
		ApplicationInfo appInfo = null;
		PackageManager packMgmr = getPackageManager();
		try { 
			appInfo = packMgmr.getApplicationInfo(getPackageName(), 0);
		} catch (NameNotFoundException e) {
			e.printStackTrace();
			throw new RuntimeException("Unable to locate assets, aborting...");
		} 
		apkFilePath = appInfo.sourceDir;
		return (apkFilePath);
	} 
 
	private void setValuesToSharedMemory() { 
		final String languageCode = Locale.getDefault().getLanguage();
		GS2DJNI.createConstSharedData("ethanon.system.language", languageCode);
	} 
 
	private boolean verifyExternalStorageState() { 
		boolean externalStorageAvailable = false;