Difficulty:: Easy
Mod Status:: Alpha
Apply In:: ADB
Requires Root:: No
Source::
Hi Guys,
I'm wondering if anyone has any information on the Settings.Global API, and in particular, how I might be able to write values to Settings.Global.Stay_On_While_Plugged_In.
Long story short - I built an app on API 16, which was able to write to Settings.System.Stay_On_While_Plugged_In. This was able to successfully override the Exchange security settings which disabled this option from Settings > Developer Options > Stay Awake.
However, in API 17, Google moved this from System to Global, and instead of only requiring WRITE_SETTINGS permissions as I had in API 16, I'll need WRITE_SECURE_SETTINGS. As far as I know, these settings are not possible to write to unless I make my own ROM and embed the app into /system/apps.
Either way, I can't even compile this in Eclipse when trying to ask for the WRITE_SECURE_SETTINGS. Does anyone know how to:
- A ) Bypass the manifest error in Eclipse so I can at least test my application in the emulator.
- B ) Configure Eclipse/the app with the proper signing to utilize the WRITE_SECURE_SETTINGS.
- C ) Know of a generic API that can write to that setting without needing WRITE_SECURE_SETTINGS.






