3

I'm developing an Android application that needs to communicate with a PC in the easiest possible way. preferably using USB, headphones jack or Bluetooth, this should be a two way connection.

I assumed USB would be the simplest, but got quite lost with USB Host/Accessory and am not even sure anymore that this is the way to go. tried usb-serial-for-android but couldn't find any example of using it with a computer, and the code as it is never recognized my computer as a device.

Is there any Right Way (tm) to do this? can someone share some sample code? everything I've found was for Arduino boards, which I don't have.

I'm not looking to transfer lots of data, but I need the latency to be as little as possible.

Any hints? Is USB isn't the way to go? I read that using the headphones jack is quite complicated and that BT has too many different implementations, but didn't really try these two other options.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
bjesus
  • 478
  • 6
  • 10
  • Unfortunately communicating with another device isn't usually as cut and paste as it sounds. What are you trying to share? Socket Communication via USB is likely a good choice: http://stackoverflow.com/questions/15129437/to-transfer-file-from-pc-to-android-device-via-usb – zgc7009 Apr 07 '14 at 21:11
  • Thanks @zgc7009 . I'm actually not trying to transfer files or anything like that, just signals about events happening in the phone (clicks, sensors, etc'). If I understand correctly, the socket communication will only work on PCs that have ADB installed and set up, and I was hoping to have something that don't require so much software installation from the PC. Is it just not possible? – bjesus Apr 08 '14 at 07:20

0 Answers0