I have very confusing problem,
If I make a change in anywhere, At the "Global.getInt" part (last line), there is an error
"Call requires API level 17 (current min is 4): android.provider.Settings.Global#getInt"
after making Project-> Clean, red error disappearing itself. But this error comes very often Why?
public void buton2(View view) throws SettingNotFoundException{
boolean isNonPlayAppAllowed = false;
{
if (Build.VERSION.SDK_INT < 5) {
isNonPlayAppAllowed = Settings.System.getInt(getContentResolver(), Settings.System.INSTALL_NON_MARKET_APPS) == 1;
}
else if (Build.VERSION.SDK_INT < 17) {
isNonPlayAppAllowed = Settings.Secure.getInt(getContentResolver(), Settings.Secure.INSTALL_NON_MARKET_APPS) == 1;
} else {
isNonPlayAppAllowed = Settings.Global.getInt(getContentResolver(), Settings.Global.INSTALL_NON_MARKET_APPS) == 1;
}
Thanks!