FireflyApi storage
3.6 External storage related
-
Get external storage path for USB-flash
Function:public String getUSBPath(int num)Description:Get external storage path for USB-flashParameters:index of num u diskReturn:Returns null if failedExample: -
Get the external SD card path
Function:public String getSDcardPath()Description:Get the external SD card pathReturn:Returns null if failedExample: -
Uninstall external storage
Function:public void doUnmountVolume(String path,boolean force,boolean removeEncryption)Description:Uninstall external storageParameters:path is volume mountPoint, it will throw an exceptionForce uninstall, when it is false, the occupied device will not be uninstalledWhen removeEncryption is true, it contains force that is true, which will force uninstall and remove the crypto map.Remark:When calling this interface to uninstall external storage, use StorageList.getVolumeState to detect the mount state of path, and then uninstall it when it is Environment.MEDIA_MOUNTEDExample: