I've a security requirement to alert users if google's "verify app" is disabled on app launch. The problem is that I dont know any way to check whether "verify app" is disabled or not.
I tried to use the code below, but it's always returning 1.
int verifierInt = -1;
if (Build.VERSION.SDK_INT >= 17) {
verifierInt = Settings.Global.getInt(context.getContentResolver(), "package_verifier_enable", -1);
} else if (Build.VERSION.SDK_INT >= 14) {
verifierInt = Settings.Secure.getInt(context.getContentResolver(), "verifier_enable", -1);
} else {
// No package verification option before API Level 14
}
boolean isVerifyAppEnabled = verifierInt == 1;
Also, as a requirement, want user to be navigated to the "verifiy app" settings if this feature is disabled.