Skip to content

Instantly share code, notes, and snippets.

@yasarix
Created November 14, 2014 00:58
Show Gist options
  • Save yasarix/643a68c8c8d49385b646 to your computer and use it in GitHub Desktop.
Save yasarix/643a68c8c8d49385b646 to your computer and use it in GitHub Desktop.
Android Check Unknown Sources
try {
isNonPlayAppAllowed = Settings.Secure.getInt(context.getContentResolver(), Settings.System.INSTALL_NON_MARKET_APPS) == 1;
Log.d(TAG, "Unknown sources check: "+ Boolean.toString(isNonPlayAppAllowed));
} catch (SettingNotFoundException e) {
e.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment