Is there any way to access device settings programmatically?
For Example: Settings > Developer Options > USB debugging > True/False
Thanks in advance.
<
Try as:
int adb = Settings.Secure.getInt(context.getContentResolver(),
Settings.Secure.ADB_ENABLED, 0);
// toggle the USB debugging setting
adb = adb == 0 ? 1 : 0;
Settings.Secure.putInt(context.getContentResolver(),
Settings.Secure.ADB_ENABLED, adb);
In AndroidManifest.xml:
and finally look at this example
http://code.google.com/p/secure-settings-widget/source/browse/src/com/lieryan/adbwidget/ADBAppWidgetProvider.java?r=eb23b2d6989ccade05f095806db5888f1ba62737