Since the sdk version 4.2 it seems like it\'s no longer possible to modify airplane-mode on devices since google has moved this setting to Settings.Global which is read-only
I know you explicitly ask for a solution without rooting, but if you have a rooted device there is at least the (kind of) official solution to move your app into folder /system/app
. Then it is possible to write into Settings.Global
:
Settings.Global.putInt(context.getContentResolver(), Global.AIRPLANE_MODE_ON, mode ? 1 : 0);
Have a look of how to toggle airplane mode for 4.2
and how to move your app into /system/app
here. I use this for my toggle widget Mini Status (source code link).