How do I create a way to communicate between a phone and a computer using a usb in Java

38 Views Asked by At

I am currently working on a project that would use a phone's accelerometer data, and after connecting that phone to a computer, allow it to function as a mouse. This project idea started with the intent to use a Bluetooth connection, however, that proved too difficult for me to code, so for now I am attempting a proof of concept with a USB connection. However, I am relatively new to coding, and don't really know how to set up something like that.

So far, I have coded an application in Android studio that reads in the accelerometer data of the phone, and prints it to the console. The trouble I am running into is how to send that data to the computer, let alone extrapolate it and make this mouse idea work. All of the java USB libraries seem to be very outdated (plus I'm not entirely sure how I would use them anyway), and there isn't much online about how to do this.

0

There are 0 best solutions below