yaniv hanya Active Member Licensed User Jun 19, 2019 #1 Hello I've seen the example from this thread https://www.b4x.com/android/forum/t...access-sd-cards-and-usb-sticks.90238/#content I wanted to know if I could connect my tabet to another phone as a storage device? And how do I copy files from the storage device to my device
Hello I've seen the example from this thread https://www.b4x.com/android/forum/t...access-sd-cards-and-usb-sticks.90238/#content I wanted to know if I could connect my tabet to another phone as a storage device? And how do I copy files from the storage device to my device
Erel B4X founder Staff member Licensed User Longtime User Jun 20, 2019 #2 Try it. If the other tablet behaves like a mass storage device then it should work. yaniv hanya said: And how do I copy files from the storage device to my device Click to expand... With ExternalStorage class. Upvote 0
Try it. If the other tablet behaves like a mass storage device then it should work. yaniv hanya said: And how do I copy files from the storage device to my device Click to expand... With ExternalStorage class.
agraham Expert Licensed User Longtime User Jun 20, 2019 #3 The following assumes that the phone is to read from the tablet. However it probably won't work for reasons given later so read on! You will need an OTG (On The Go) cable to plug into the phone. This cable turns your phone into a USB master device and will probably have a female Type A USB connector. If you plug a USB memory stick into this cable you should be able to access it using the ExternalStorage class as in Erel's link. Mice and keyboards will also usually work with this cable. For a quick check you can also use an app like Ghost Commander which supports Storage Access Framework (I use it. It is free - no ads, from the Play Store) to access the USB stick. Older Android devices offered a mass storage interface the same as a USB stick to external master USB devices, like a PC, to access their storage. Modern Android devices usually only offer MTP (Media Transfer Protocol) or PTP (Picture Transfer Protocol) to external master devices. If your tablet only offers these two USB options then you probably can't directly connect them. Some devices might also offer an MSC options which should work as it is the old mass storage interface. USB configuration options are usually in the Developer Options in Settings Once your phone supports being a USB master this you will need a normal USB cable to plug into your tablet that will have a male Type A USB connector. Plug it into the tablet and plug the male end into a USB port on your PC. You should be able see the tablet memory in File Explorer. Once both the above work connect the tablet to the phone and see if you can make it work with Ghost commander Upvote 0
The following assumes that the phone is to read from the tablet. However it probably won't work for reasons given later so read on! You will need an OTG (On The Go) cable to plug into the phone. This cable turns your phone into a USB master device and will probably have a female Type A USB connector. If you plug a USB memory stick into this cable you should be able to access it using the ExternalStorage class as in Erel's link. Mice and keyboards will also usually work with this cable. For a quick check you can also use an app like Ghost Commander which supports Storage Access Framework (I use it. It is free - no ads, from the Play Store) to access the USB stick. Older Android devices offered a mass storage interface the same as a USB stick to external master USB devices, like a PC, to access their storage. Modern Android devices usually only offer MTP (Media Transfer Protocol) or PTP (Picture Transfer Protocol) to external master devices. If your tablet only offers these two USB options then you probably can't directly connect them. Some devices might also offer an MSC options which should work as it is the old mass storage interface. USB configuration options are usually in the Developer Options in Settings Once your phone supports being a USB master this you will need a normal USB cable to plug into your tablet that will have a male Type A USB connector. Plug it into the tablet and plug the male end into a USB port on your PC. You should be able see the tablet memory in File Explorer. Once both the above work connect the tablet to the phone and see if you can make it work with Ghost commander