Android: where to find the "Unknown sources" option on many devices?

I am downloading a nonmarket app for Android. If the "Unknown sources" option is not activated, I show the user a dialog box containing the "Settings" button. when this button is pressed, it opens the intent of the settings and allows the user to check the "Unknown sources" option.

Intent intent = new Intent(Settings.ACTION_APPLICATION_SETTINGS);   

But on some devices, the Unknown Sources settings are in the security settings, not in the application settings. How to deal with such cases?

+5
source share
4 answers

But on some devices, the Unknown Sources settings are in the security settings, not in the application settings. How to deal with such cases?

, . (, " " ), , , ACTION_MANAGE_APPLICATIONS_SETTINGS , . , .

+7

 Intent intentSettings = new Intent();
 intentSettings.setAction(android.provider.Settings.ACTION_MANAGE_APPLICATIONS_SETTINGS);
 startActivity(intentSettings);
0


AOSP/CyanogenMod/Android Factory ( Nexus):

 private void launchSecuritySettings() {

     Intent launchSettingsIntent = new Intent(Settings.ACTION_SECURITY_SETTINGS);
     launchSettingsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
     startActivity(launchSettingsIntent);
     finish();
  }
0

, , , , , .

, , ' , .

0
source

All Articles