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_MEDIA_MOUNTED
The following examples show how to use
android.content.Intent#ACTION_MEDIA_MOUNTED .
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: BaseTvActivity.java From VCL-Android with Apache License 2.0 | 6 votes |
@Override protected void onResume() { super.onResume(); //Handle network connection state IntentFilter networkfilter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION); IntentFilter storageFilter = new IntentFilter(Intent.ACTION_MEDIA_MOUNTED); storageFilter.addAction(Intent.ACTION_MEDIA_UNMOUNTED); storageFilter.addDataScheme("file"); registerReceiver(mExternalDevicesReceiver, networkfilter); registerReceiver(mExternalDevicesReceiver, storageFilter); }
Example 2
Source File: CacheManager.java From Dashchan with Apache License 2.0 | 5 votes |
private CacheManager() { handleGalleryShareFiles(); syncCache(); IntentFilter intentFilter = new IntentFilter(Intent.ACTION_MEDIA_MOUNTED); intentFilter.addDataScheme("file"); MainApplication.getInstance() .registerReceiver(AndroidUtils.createReceiver((r, c, i) -> syncCache()), intentFilter); new Thread(this, "CacheManagerWorker").start(); }
Example 3
Source File: MediaStatusReceiver.java From edx-app-android with Apache License 2.0 | 5 votes |
@Override public void handleReceive(Context context, Intent intent) { if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) { return; } prefManager = new PrefManager(context, PrefManager.Pref.USER_PREF); final String username = loginPrefs.getUsername(); final String hashedUsername = (username != null) ? Sha1Util.SHA1(username) : null; final String sdCardPath = intent.getDataString().replace("file://", ""); final String action = intent.getAction(); if (action != null) { boolean sdCardAvailable = false; switch (action) { case Intent.ACTION_MEDIA_REMOVED: case Intent.ACTION_MEDIA_UNMOUNTED: sdCardAvailable = false; handleSDCardUnmounted(hashedUsername, sdCardPath); break; case Intent.ACTION_MEDIA_MOUNTED: sdCardAvailable = true; handleSDCardMounted(context, hashedUsername); break; } EventBus.getDefault().postSticky(new MediaStatusChangeEvent(sdCardAvailable)); } }
Example 4
Source File: StatusServiceImpl.java From Cangol-appcore with Apache License 2.0 | 5 votes |
@Override public void onReceive(Context context, Intent intent) { if (intent.getAction() == Intent.ACTION_MEDIA_EJECT) { //do nothings } else if (intent.getAction() == Intent.ACTION_MEDIA_SHARED) { //do nothings } else if (intent.getAction() == Intent.ACTION_MEDIA_BAD_REMOVAL) { //do nothings } else if (intent.getAction() == Intent.ACTION_MEDIA_REMOVED) { notifyStorageRemove(context); } else if (intent.getAction() == Intent.ACTION_MEDIA_MOUNTED) { notifyStorageMount(context); } }
Example 5
Source File: MediaMountedReceiver.java From edslite with GNU General Public License v2.0 | 4 votes |
@Override public void onReceive(Context context, Intent intent) { Logger.debug("MediaMountedReceiver"); LocationsManagerBase lm = _lm; if(lm == null) return; String mountPath = intent.getDataString(); ExternalStorageLocation loc = mountPath != null ? new ExternalStorageLocation(context, "ext storage", mountPath, null) : null; try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } switch (intent.getAction()) { case UsbManager.ACTION_USB_DEVICE_ATTACHED: Logger.debug("ACTION_USB_DEVICE_ATTACHED"); lm.updateDeviceLocations(); LocationsManager.broadcastLocationAdded(context, loc); break; case Intent.ACTION_MEDIA_MOUNTED: Logger.debug("ACTION_MEDIA_MOUNTED"); lm.updateDeviceLocations(); LocationsManager.broadcastLocationAdded(context, loc); break; case Intent.ACTION_MEDIA_UNMOUNTED: Logger.debug("ACTION_MEDIA_UNMOUNTED"); lm.updateDeviceLocations(); LocationsManager.broadcastLocationRemoved(context, loc); break; case Intent.ACTION_MEDIA_REMOVED: Logger.debug("ACTION_MEDIA_REMOVED"); lm.updateDeviceLocations(); LocationsManager.broadcastLocationRemoved(context, loc); break; case UsbManager.ACTION_USB_DEVICE_DETACHED: Logger.debug("ACTION_USB_DEVICE_DETACHED"); lm.updateDeviceLocations(); LocationsManager.broadcastLocationRemoved(context, loc); break; } }
Example 6
Source File: FloatingBallUtils.java From RelaxFinger with GNU General Public License v2.0 | 2 votes |
/** * 通知媒体库更新文件夹 * @param context * @param filePath 文件夹 * * */ public static void scanFolder(Context context, String filePath) { Intent scanIntent = new Intent(Intent.ACTION_MEDIA_MOUNTED); scanIntent.setData(Uri.fromFile(new File(filePath))); context.sendBroadcast(scanIntent); }