public static @Nullable Boolean checkGreenifyVersion(final Context context) {
		try { @SuppressWarnings("deprecation")
			final PackageInfo greenify_info = context.getPackageManager().getPackageInfo(GREENIFY_PKG, PackageManager.GET_UNINSTALLED_PACKAGES);
			return greenify_info.versionCode >= MIN_GREENIFY_VERSION;
		} catch (final PackageManager.NameNotFoundException e) {
			return null;
		}
	}
Client helper for Greenify APIs

Created by Oasis on 2016/10/14.
mobile/src/main/java/com/oasisfeng/island/greenify/GreenifyClient.java