Connect android app to a software installed on the pc to transfer file

Asked

Viewed 188 times

0

I will start developing a software in Lazarus and an application for android. I wonder if there is any library or any reference to make communication via usb between the software and the application. I will need to transfer file (.sql) from the application to update the database of the software installed on the pc.

I will implement a button in the software for when it is triggered recognize the application and thus transfer the data.

I am researching this on the Internet but I could not find any reference to guide in this direction. Does anyone know where I can find a reference to do this?

  • 1

    It could do via bluetooth or via HTTP only that local communication via local network. Easier than implementing an entire USB functionality that would probably need to root on android to be able to get the file from inside the device.

  • @Guilhermenascimento, would be complicated even with a public folder inside the mobile device?

  • not believe, but I can not say, the complicated part would be to configure the USB port (numbering) and some kind of auto-detection.

  • This might help: https://answall.com/a/217986/64969

1 answer

0

Friend, I work with an App and a Software that communicate by files, by the way the Software is in Delphi rsrsrs, the exchange of information works like this, we send the files to an email box and the other device makes that read the file. sql and does this import, you could implement it in FTP if you think it is more feasible. Or even by Webservice and if you do not want something on the Web can make a feature of the App can access a server on your local network and put there the files or vice versa and the other software read it. If you still need it and I haven’t made myself clear, let me know that I can help you.

  • Hi, thanks for the answer. Interesting the options you presented, but I’m wanting something simpler, if it exists as is clear, because the user who will install the software on the pc will not have enough knowledge to configure the FTP or webservice on his pc. That is why I want something simpler, for example after the system installed on the pc the user can plug the phone into the pc via usb and do a search with the software to get the public folder path on the mobile and so transfer the file. Is it possible to do it this way?

  • Hello, I find it unlikely to work like this because when connecting an Android phone to a PC it does not generate those drive (D:, G:) it opens now as a device and makes available only inside it access to internal memory or SD card. Another alternative would be when the Software was installed on the PC it create a server type with a predefined fixed name in the App for the App to find that PC and send the files.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.