Hello everyone!
After copying files to the USB disk, if you force the USB disk to be removed, a 0 byte file will be produced. So you want to pop up the USB disk by programming. Here is the source code found on the Internet. I don't know how to convert it to ba4
Hope to get help, thank you!
App_DataPara.getApp().GetExternalStorageDirectory() It is the file directory of the U disk that needs to be unloaded. String type
After copying files to the USB disk, if you force the USB disk to be removed, a 0 byte file will be produced. So you want to pop up the USB disk by programming. Here is the source code found on the Internet. I don't know how to convert it to ba4
Hope to get help, thank you!
eject USB Disk:
public void doUnMountU() {
IMountService service = IMountService.Stub.asInterface(ServiceManager.getService("mount"));
try {
service.unmountVolume(App_DataPara.getApp().GetExternalStorageDirectory(), true, false);
} catch (RemoteException e) {
e.printStackTrace();
}
}
App_DataPara.getApp().GetExternalStorageDirectory() It is the file directory of the U disk that needs to be unloaded. String type