Unmount external storage from code - Java for Android App Development

Hi
I have made an app for a closed user group that reads the contents of an external storage media connected via OTG. My app respondes to the media_mounted intent to know when to start.
The user can unmount the drive as Android gives them that option. However is there an intent i can use to trigger the unmount from my code?
Mike
Sent from my Transformer TF101 using xda app-developers app

Related

[Q] How to set up a formatted sdcard

I am running the latest version of MIUI and have an unused stock sdcard that came with the phone. It had a few backups which I copied to my new sdcard, but otherwise I didn't need anything that was on it, so I formatted it. Now it will not allow me to mount the sdcard because it is not set up correctly, how could I set it up?
What did you format it as? NTFS? FAT32? EXT-2/3/4? Need more info. Ensure you format it as FAT32 and you should be fine; it has the best compatibility between ROMs and PCs.
I haven't been able to format it at all.
Sent from my HTC Glacier using XDA App
Jacezo said:
I haven't been able to format it at all.
Sent from my HTC Glacier using XDA App
Click to expand...
Click to collapse
You might consider connecting it to your PC using a card reader. From your PC you should be able to format it as FAT32. If you are on Windows, you can do this through Administrative Tools >> Computer Management >> Disk Management. In fact, sometimes Windows will just pop up and ask you if you want to format right when you plug it in.
Im on mac
Sent from my HTC Glacier using XDA App

External hard drive

How do I connect one and view it the tablet?
Sent from my A500 using XDA Premium App
You must use a FAT32 formatted drive.
If there are pictures, music and videos on there, the appropriate applications will find them.
To browse, use a file manager. I personally like Dual File Manager.
Thanks but where would I go to locate the USB
Sent from my A500 using XDA Premium App
If you use Dual File Manager it will see /mnt/sdcard as your default directory. Hit the Android Back Button once and down at the bottom you should see "usb_storage"
loser504 said:
Thanks but where would I go to locate the USB
Sent from my A500 using XDA Premium App
Click to expand...
Click to collapse
i'm using RootExplorer and goto /mnt/usb_storage.
Hi Loser
You can read HDD USB partitioned NTFS too, read this :
http://forum.xda-developers.com/showthread.php?t=1056759
But first you must read this :
http://forum.xda-developers.com/showthread.php?t=1055354
Good luck

What app do you use

That's works on tab move app sd card thanks for your help
Sent from my ADR6400L using XDA App
Not supported by honeycomb. the apps that do it on 2.X only trigger the already supported function in the 2.x OS. You can do the same thing by going to the App Management screen and picking each app, hit the Move to SD card button. Those apps make it easier to move them when its supported by the os, they don't make it possible to do the unsupported.
That you for your help
Sent from my ADR6400L using XDA App
I read in a thread that there is sym-link software that will link your sdcard mounted as a folder on your internal storage.This would allow you to purpose on SD. But have not tried as I have no need with 16 TB storage internal.I put media music/video on SD thou.
16 TB internal??? Sweet!!!!!!
erica_renee said:
I read in a thread that there is sym-link software that will link your sdcard mounted as a folder on your internal storage.This would allow you to purpose on SD. But have not tried as I have no need with 16 TB storage internal.I put media music/video on SD thou.
Click to expand...
Click to collapse

[Solved] Reformat KF sdcard?

Is it possible to reformat the usb storage/sdcard on the KF and what would be the best way to do it? Reason I ask is yesterday I repartitioned my KF using GNU parted so I can get more media/internal storage. After saving my handy work, I got the "msftres" flag and now when I plug the KF onto my Pc, it shows up empty like there are no files saved onto it, but when I navigate with root explorer, the sdcard/internal storage is populated. It doesn't even give me the prompt to mount usb storage when I plug in the usb cord. Thx in advance for the help.
Update: the issue was with automount, plugged into different usb port and reinstalled drivers and now it works. Thx for the help
Sent from my Kindle Fire using xda premium
Yes it is. If you are on windows mount the usb drive then go my computer and right click over the KF hdd and choose format.
I recommend Fat32
Hope this helps
Sent from my Kindle Fire using XDA App
roketteere said:
Yes it is. If you are on windows mount the usb drive then go my computer and right click over the KF hdd and choose format.
I recommend Fat32
Hope this helps
Sent from my Kindle Fire using XDA App
Click to expand...
Click to collapse
Will this have adverse effects other than just wiping the info that's on the internal storage and then making the internal storgae reading as fat32?
Sent from my Kindle Fire using xda premium
You can also just delete any folder or file that you don't want on there if you mount the storage.
Sent from my iPhone 4 on Straight Talk using Tapatalk

Is it possible to install games on a flash drive with a rooted N7?

Is there a way to put games on the usb drive like you can do movies , songs , docs etc? I tried to use app to sd but my usb stick isnt recognized.. any suggestions ?,
Sent from my HTCEVODesign4G using xda app-developers app
You can store APK's on the USB storage, and you can install them from there, but the installed app will be in the devices memory, not the external USB storage.
Thanks for your response. So theres no app out there to use the usb mass storage as a default location for a apk install ? Bummer.
Sent from my HTCEVODesign4G using xda app-developers app

Categories

Resources