Available Methods
- putExtra ( )
- setAction ( )
- getStringExtra ( )
- addFlags ( )
- setFlags ( )
- ACTION_VIEW
- getAction ( )
- setData ( )
- getIntExtra ( )
- setType ( )
- putExtras ( )
- addCategory ( )
- getData ( )
- setClass ( )
- getParcelableExtra ( )
- getExtras ( )
- setPackage ( )
- setDataAndType ( )
- getBooleanExtra ( )
- hasExtra ( )
- setComponent ( )
- ACTION_SEND
- setClassName ( )
- resolveActivity ( )
- getSerializableExtra ( )
- ACTION_MAIN
- getLongExtra ( )
- prepareToLeaveProcess ( )
- getComponent ( )
- ACTION_GET_CONTENT
- resolveTypeIfNeeded ( )
- ACTION_PICK
- putParcelableArrayListExtra ( )
- ACTION_SENDTO
- getStringArrayListExtra ( )
- createChooser ( )
- getBundleExtra ( )
- getFlags ( )
- ACTION_MEDIA_SCANNER_SCAN_FILE
- getParcelableArrayListExtra ( )
- putStringArrayListExtra ( )
- getByteArrayExtra ( )
- getDataString ( )
- FLAG_ACTIVITY_NEW_TASK
- ACTION_DIAL
- FLAG_GRANT_READ_URI_PERMISSION
- getType ( )
- ACTION_BATTERY_CHANGED
- ACTION_DELETE
- getStringArrayExtra ( )
- ACTION_CALL
- ACTION_OPEN_DOCUMENT
- parseUri ( )
- getPackage ( )
- setExtrasClassLoader ( )
- getCategories ( )
- FLAG_GRANT_WRITE_URI_PERMISSION
- toUri ( )
- getScheme ( )
- getIntArrayExtra ( )
- removeExtra ( )
- ACTION_MEDIA_BUTTON
- ACTION_SCREEN_OFF
- toString ( )
- ACTION_SCREEN_ON
- getDoubleExtra ( )
- ACTION_OPEN_DOCUMENT_TREE
- ACTION_SEND_MULTIPLE
- getFloatExtra ( )
- getClipData ( )
- setAllowFds ( )
- ACTION_DEVICE_STORAGE_LOW
- ACTION_TIMEZONE_CHANGED
- getParcelableArrayExtra ( )
- putIntegerArrayListExtra ( )
- setClipData ( )
- ACTION_SEARCH
- hasCategory ( )
- ACTION_EDIT
- ACTION_CREATE_DOCUMENT
- ACTION_WEB_SEARCH
- resolveActivityInfo ( )
- ACTION_CHOOSER
- FLAG_GRANT_PREFIX_URI_PERMISSION
- ACTION_HEADSET_PLUG
- ACTION_TIME_CHANGED
- getLongArrayExtra ( )
- ACTION_CLOSE_SYSTEM_DIALOGS
- ACTION_SET_WALLPAPER
- ACTION_BOOT_COMPLETED
- getIntegerArrayListExtra ( )
- getCharSequenceExtra ( )
- FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY
- setSourceBounds ( )
- FLAG_DEBUG_LOG_RESOLUTION
- ACTION_PACKAGE_REMOVED
- migrateExtraStreamToClipData ( )
- ACTION_PACKAGE_ADDED
- ACTION_INSERT
- ACTION_INSTALL_PACKAGE
- FLAG_ACTIVITY_NEW_DOCUMENT
- ACTION_USER_PRESENT
- getShortExtra ( )
- ShortcutIconResource ( )
- setSelector ( )
- replaceExtras ( )
- getSelector ( )
- makeRestartActivityTask ( )
- ACTION_UNINSTALL_PACKAGE
- filterEquals ( )
- FLAG_GRANT_PERSISTABLE_URI_PERMISSION
- ACTION_POWER_CONNECTED
- ACTION_BATTERY_OKAY
- EXTRA_DOCK_STATE_LE_DESK
- getDoubleArrayExtra ( )
- ACTION_ATTACH_DATA
- normalizeMimeType ( )
- FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
- getCharSequenceArrayListExtra ( )
- removeCategory ( )
- resolveSystemService ( )
- getSourceBounds ( )
- ACTION_CREATE_SHORTCUT
- makeMainActivity ( )
- getCharExtra ( )
- resolveType ( )
- FilterComparison ( )
- makeMainSelectorActivity ( )
- clone ( )
- FLAG_ACTIVITY_BROUGHT_TO_FRONT
- prepareToEnterProcess ( )
- ACTION_MANAGED_PROFILE_REMOVED
- EXTRA_DOCK_STATE_HE_DESK
- ACTION_MEDIA_MOUNTED
- ACTION_INSERT_OR_EDIT
- CATEGORY_CAR_DOCK
- ACTION_NEW_OUTGOING_CALL
- putCharSequenceArrayListExtra ( )
- ACTION_USER_UNLOCKED
- writeToParcel ( )
- ACTION_APPLICATION_RESTRICTIONS_CHANGED
- ACTION_AIRPLANE_MODE_CHANGED
- ACTION_ASSIST
- ACTION_PACKAGE_DATA_CLEARED
- ACTION_MEDIA_EJECT
- ACTION_POWER_DISCONNECTED
- ACTION_APP_ERROR
- getBooleanArrayExtra ( )
- ACTION_PACKAGE_REPLACED
- ACTION_WALLPAPER_CHANGED
- getFloatArrayExtra ( )
- EXTRA_DOCK_STATE_UNDOCKED
Related Classes
- java.io.File
- android.os.Bundle
- android.content.Context
- android.view.View
- java.util.Date
- android.util.Log
- android.widget.TextView
- android.view.ViewGroup
- android.app.Activity
- android.view.LayoutInflater
- android.os.Build
- android.widget.Toast
- android.widget.ImageView
- android.graphics.Color
- android.os.Handler
- android.net.Uri
- android.view.MenuItem
- android.widget.Button
- android.graphics.Bitmap
- android.text.TextUtils
- android.widget.LinearLayout
- android.content.pm.PackageManager
- android.support.annotation.Nullable
- android.widget.EditText
- android.content.SharedPreferences
Java Code Examples for android.content.Intent#ACTION_AIRPLANE_MODE_CHANGED
The following examples show how to use
android.content.Intent#ACTION_AIRPLANE_MODE_CHANGED .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EmergencyAffordanceService.java From android_9.0.0_r45 with Apache License 2.0 | 6 votes |
@Override public void onBootPhase(int phase) { if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) { mTelephonyManager = mContext.getSystemService(TelephonyManager.class); mVoiceCapable = mTelephonyManager.isVoiceCapable(); if (!mVoiceCapable) { updateEmergencyAffordanceNeeded(); return; } mSubscriptionManager = SubscriptionManager.from(mContext); HandlerThread thread = new HandlerThread(TAG); thread.start(); mHandler = new MyHandler(thread.getLooper()); mHandler.obtainMessage(INITIALIZE_STATE).sendToTarget(); startScanning(); IntentFilter filter = new IntentFilter(Intent.ACTION_AIRPLANE_MODE_CHANGED); mContext.registerReceiver(mAirplaneModeReceiver, filter); mSubscriptionManager.addOnSubscriptionsChangedListener(mSubscriptionChangedListener); } }
Example 2
Source File: OBConnectionManager.java From GLEXP-Team-onebillion with Apache License 2.0 | 6 votes |
private void connectToNetwork_disconnect () { final WifiManager wfMgr = (WifiManager) MainActivity.mainActivity.getApplicationContext().getSystemService(Context.WIFI_SERVICE); // MainActivity.log("OBConnectionManager.connectToNetWork_complete.block complete"); // MainActivity.log("OBConnectionManager.connectToNetWork_complete.disable wifi"); wfMgr.setWifiEnabled(false); // try { MainActivity.log("OBConnectionManager.connectToNetWork_complete.enable airplane mode"); Settings.Global.putInt(MainActivity.mainActivity.getContentResolver(), Settings.Global.AIRPLANE_MODE_ON, 1); Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED); intent.putExtra("state", true); MainActivity.mainActivity.sendBroadcast(intent); } catch (Exception e) { MainActivity.log("Exception caught while trying to set the airplane mode"); // e.printStackTrace(); } }
Example 3
Source File: LegacyGlobalActions.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
/** * Change the airplane mode system setting */ private void changeAirplaneModeSystemSetting(boolean on) { Settings.Global.putInt( mContext.getContentResolver(), Settings.Global.AIRPLANE_MODE_ON, on ? 1 : 0); Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED); intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING); intent.putExtra("state", on); mContext.sendBroadcastAsUser(intent, UserHandle.ALL); if (!mHasTelephony) { mAirplaneState = on ? ToggleAction.State.On : ToggleAction.State.Off; } }
Example 4
Source File: AirplaneModeLoader.java From Easer with GNU General Public License v3.0 | 5 votes |
private boolean switchBefore17(boolean newState) { Settings.System.putInt( context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, newState ? 1 : 0); Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED); intent.putExtra("state", !newState); context.sendBroadcast(intent); return true; }
Example 5
Source File: TwilightScanner.java From PhoneProfilesPlus with Apache License 2.0 | 5 votes |
void start() { IntentFilter filter = new IntentFilter(Intent.ACTION_AIRPLANE_MODE_CHANGED); filter.addAction(Intent.ACTION_TIME_CHANGED); filter.addAction(Intent.ACTION_TIMEZONE_CHANGED); filter.addAction(TwilightScanner.ACTION_UPDATE_TWILIGHT_STATE); context.registerReceiver(mUpdateLocationReceiver, filter); mLocationHandler.enableLocationUpdates(); }
Example 6
Source File: AirplaneModeIconData.java From Status with Apache License 2.0 | 4 votes |
@Override public IntentFilter getIntentFilter() { return new IntentFilter(Intent.ACTION_AIRPLANE_MODE_CHANGED); }
Example 7
Source File: NetworkUtil.java From DoingDaily with Apache License 2.0 | 3 votes |
/** * 设置飞行模式状态 * 需添加权限: * <pre> * android.permission.WRITE_SETTINGS * </pre> * * @param context 上下文 * @param isAirplaneModeOn 是否开启飞行模式 */ public static void setAirplaneMode(Context context, boolean isAirplaneModeOn) { Settings.System.putInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, isAirplaneModeOn ? 1 : 0); // 广播飞行模式的改变,让相应的程序可以处理 // 不发送广播,在非飞行模式下,Android 2.2.1 上测试关闭了 WIFI,不关闭通话网络(GMS/GPRS等) // 不发送广播,在飞行模式下,Android 2.2.1 上测试无法关闭飞行模式 Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED); context.sendBroadcast(intent); }