Android Question USB access to tablet from PC

Arf

Well-Known Member
Licensed User
Longtime User
I need to transfer data from a SQL DDB that is on the tablet up to a PC, as well as retrieve data from the PC and stuff it into the DDB. I wanted to use USB but after doing some reading it seems that USB communication between a B4A app and a PC is not really supported.

First, is this lack of support for this still accurate? Second, the other thing I can try is to have the tablet connect via USB as a media device and my PC app can then be pointed to the folder wherein the database file lives, and extract and inject the required data using queries. Is this possible to do, and does anyone know if there is any C# or similar code available that allows interaction with a B4A SQL database?

Thanks
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I wanted to use USB but after doing some reading it seems that USB communication between a B4A app and a PC is not really supported.
It is not really related to B4A.

There are two ways to communicate with a USB connected Android device:

1. If USB debug mode is enabled then you can use ADB to do whatever you need and it is quite simple.
2. Otherwise only the MTP protocol is available. I didn't find any working MTP library for Java or .Net.


If the PC and the device are in the same local network then it will be simpler to connect over wifi with a simple B4J program.
 
Upvote 0

Arf

Well-Known Member
Licensed User
Longtime User
Thanks Erel,
I'll do some reading up on ADB and MTP. Unfortunately the tablet forms part of a system tht will be used in hospitals and often the operators won't have wifi access, only USB access to local machines.
 
Upvote 0
Top