/**
* Gets the state of Airplane Mode.
*
* @param context
* @return true if enabled.
*/
private static boolean isAirplaneModeOn(Context context) {
return Settings.System.getInt(context.getContentResolver(),
Settings.Global.AIRPLANE_MODE_ON, 0) != 0;
}
More Related Contents:
- How to implement a button that gets all checkbox’s state and adds the value of checked item into arraylist?
- Value of type java.lang.String cannot be converted to JSONArray
- How to iterate through SparseArray?
- Can one class extend two classes?
- Convert Uri to String and String to Uri
- Why does super.onDestroy() in java Android goes on top in destructors? [duplicate]
- UNIQUE constraint failed: sqlite database : android
- Importing Facebook library in Android Studio: Could not find property ‘ANDROID_BUILD_SDK_VERSION’
- HttpURLConnection setConnectTimeout() has no effect
- What’s the best way to check if a String contains a URL in Java/Android?
- Random element from string array [closed]
- Proper way to handle action bar up button?
- How To Test If Cursor Is Empty in a SQLiteDatabase Query
- Using accelerometer, gyroscope and compass to calculate device’s movement in 3D world
- BroadcastReceiver not receiving download complete action
- Android: java.lang.NullPointerException: Attempt to invoke virtual method ‘java.lang.String java.lang.Object.toString()’ on a null object reference
- Error inflating class android.support.design.widget.TabLayout
- Read data from SQLite where column name contains spaces
- How to send a String array as basic name value pair as HTTPPOST?
- How Can I Access an SSL Connection Through Android?
- Regex to remove spaces between numbers only
- How to reference a File in raw folder in Android
- Android : Socket – java.net.SocketException: sendto failed: EPIPE (Broken pipe)
- Default Navigation Drawer View to ExpandableListView
- Class must either be declared abstract or implement abstract method error
- Why proguard processes AndroidManifest.xml
- Gradle – download dependencies, lock versions and update dependencies manually
- Android: Navigation-Drawer on all activities
- Android Studio Error “Unsupported class file major version 61”
- Recover file in Android Studio?