Airplane Mode on off
Since JellyBean 4.2
We can only Read the AirplaneMode
Here ist the Link
Android 4.2 APIs | Android Developers
We need Edit the manifest
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
We can Write with this
// To Write
Settings.Global.putString(getContentResolver(), "airplane_mode_on", "1");
// To Read
String result = Settings.Global.getString(getContentResolver(), Settings.Global.AIRPLANE_MODE_ON);
My Question.
How ist he Code for Write (i am a Beginner)
Settings.Global.putString(getContentResolver(), "airplane_mode_on", "1");
can i have some help?