Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 886
user1471575 Avatar asked Jul 25 '12 11:07

user1471575


1 Answers

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.

like image 65
CommonsWare Avatar answered Sep 24 '22 09:09

CommonsWare