Nothing any picture here but plz tell me the answer...define all permission like write_secure, the System.secure, but not any output plz tell sir
-
https://stackoverflow.com/questions/5533881/toggle-airplane-mode-in-android/24785146 – Damian Dec 30 '17 at 02:39
-
Possible duplicate of [How to set the AIRPLANE\_MODE\_ON to "True" or ON?](https://stackoverflow.com/questions/3249245/how-to-set-the-airplane-mode-on-to-true-or-on) – faintsignal May 28 '18 at 02:05
1 Answers
Short answer: you can't switch airplane mode programmatically if the device is not rooted.
As written in http://developer.android.com/about/versions/android-4.2.html
Some device settings defined by Settings.System are now read-only. If your app attempts to write changes to settings defined in Settings.System that have moved to Settings.Global, the write operation will silently fail when running on Android 4.2 and higher. Even if your value for android:targetSdkVersion and android:minSdkVersion is lower than 17, your app is not able to modify the settings that have moved to Settings.Global when running on Android 4.2 and higher.
This answer was taken from here:
How to programmatically enable and disable Flight mode on Android 4.2?

- 11,360
- 15
- 54
- 77

- 41
- 1
- 3