6

I am downloading a non-market android app. If the "Unknown sources" option is not enabled, I show the user a dialog box containing a "Setting button". when this button is clicked, it opens the settings intent and allows the user to check the "Unknown sources" option.

Intent intent = new Intent(Settings.ACTION_APPLICATION_SETTINGS);   

But in some devices, the "Unknown sources" options is in Security Settings and not Application Settings. How to deal with such cases?

4 Answers 4

7

But in some devices, the "Unknown sources" options is in Security Settings and not Application Settings. How to deal with such cases?

Device manufacturers are welcome to change the organization of items in Settings, and there is little we can do about it. You are welcome to crowd-source a database of devices and where the locations of key settings (like "Unknown sources") reside, then use that database to help drive your app's behavior, defaulting to ACTION_MANAGE_APPLICATIONS_SETTINGS for those that are not in the database. Beyond that, though, there is little we can do.

1
  • Could anyone create the database? Jan 16, 2013 at 23:26
0

try this

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

This is how you access system preferences for Unknown sources on
AOSP/CyanogenMod/Android Factory Images(Nexus devices):

 private void launchSecuritySettings() {

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

You can disable downloads from specific software sources but as today there is no unknown sources option so once you allow it it is forever.

the security option doesnt exist there is security andl ocation and it isnt there' The application source is the above, not there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.