title: How to programmatically enable and disable Flight mode on Android 4.2?
body: <p>Is there a way to disable or enable Flight Mode on Android 4.2?</p>
  
  <p>I use this code that works only for previous Android versions:</p>
  
  <pre><code>android.provider.Settings.System.putInt(
      c.getContentResolver(),   
      android.provider.Settings.System.AIRPLANE_MODE_ON, enable ? 0 : 1
  );
  </code></pre>