get Airplane Mode State - Android android.provider

Android examples for android.provider:Settings

Description

get Airplane Mode State

Demo Code

import android.content.Context;
import android.provider.Settings;

public class Main {

  public static int getAirplaneModeState(Context context) {
    return Settings.System.getInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 0);
  }/* w w  w .j a  va2 s.c o m*/

}

Related Tutorials