StorageManager.StorageVolumeCallback.OnStateChanged(StorageVolume) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called when StorageVolume#getState()
changes, such as
changing to the Environment#MEDIA_MOUNTED
or
Environment#MEDIA_UNMOUNTED
states.
[Android.Runtime.Register("onStateChanged", "(Landroid/os/storage/StorageVolume;)V", "GetOnStateChanged_Landroid_os_storage_StorageVolume_Handler", ApiSince=30)]
public virtual void OnStateChanged (Android.OS.Storage.StorageVolume volume);
[<Android.Runtime.Register("onStateChanged", "(Landroid/os/storage/StorageVolume;)V", "GetOnStateChanged_Landroid_os_storage_StorageVolume_Handler", ApiSince=30)>]
abstract member OnStateChanged : Android.OS.Storage.StorageVolume -> unit
override this.OnStateChanged : Android.OS.Storage.StorageVolume -> unit
Parameters
- volume
- StorageVolume
- Attributes
Remarks
Called when StorageVolume#getState()
changes, such as changing to the Environment#MEDIA_MOUNTED
or Environment#MEDIA_UNMOUNTED
states.
The given argument is a snapshot in time and can be used to process events in the order they occurred, or you can call StorageManager#getStorageVolumes()
to observe the latest value.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.