usb

Get all storages and devices with their names android

前提是你 提交于 2020-01-07 07:41:11
问题 I already found out how to get all storages with either of these answers: with proc/mounts and with mount command, but now I want to put a name on the paths returned. I have no problem with Internal Storage, however these methods can't distinguish between a SD card and a USB stick. If it sees two drives connected how can I be sure which one is the SD Card and which is the USB, or are they two SD Cards? Or two USB drives? 回答1: I found part of the solution, however I won't get any farther

How can i send data by USB port in Android C#?

删除回忆录丶 提交于 2020-01-07 02:04:47
问题 I am developed a app in Visual Studio with mono for android. C# So. How can i send data by USB port in Android. C#? The type serialPort1.Write("1"); 回答1: Long story short - you can not do it the way you intended. USB is not a serial port that you can just write to and data comes out on the other side. Serial ports can be emulated over USB, but Android does not support that. Android typically can act as device that offers different profiles: disk, camera and proprietary debug (if enabled on

How can i send data by USB port in Android C#?

感情迁移 提交于 2020-01-07 02:04:32
问题 I am developed a app in Visual Studio with mono for android. C# So. How can i send data by USB port in Android. C#? The type serialPort1.Write("1"); 回答1: Long story short - you can not do it the way you intended. USB is not a serial port that you can just write to and data comes out on the other side. Serial ports can be emulated over USB, but Android does not support that. Android typically can act as device that offers different profiles: disk, camera and proprietary debug (if enabled on

How to write a custom USB Infrared Touch Screen driver for OS X? [duplicate]

冷暖自知 提交于 2020-01-07 00:05:36
问题 This question already has an answer here : How to write usb touchscreen driver kext in os x 10.9? (1 answer) Closed 6 years ago . System details: OS X 10.9.1 (13B42) USB Infrared Touch Screen details: Low Speed device @ 3 (0x14400000): ............................................. Composite device from unknown vendor Port Information: 0x101a Not Captive Attached to Root Hub External Device Connected Enabled Connected to External Port Number Of Endpoints (includes EP0): Total Endpoints for

Android get total size and free size of USB device memory

此生再无相见时 提交于 2020-01-06 19:14:28
问题 Access USB Device Memory through programmatically. Get USB Device Total Memory Size. Get USB Device Total Free(Available) Memory Size. I know the memory size of Internal/External Memory File path = Environment.getDataDirectory(); StatFs stat = new StatFs(path.getPath()); long blockSize = stat.getBlockSize(); long availableBlocks = stat.getAvailableBlocks(); String availableMemory = Formatter.formatFileSize(this, availableBlocks * blockSize); Log.i("","Available MB : " + availableMemory); In

Getting USB Serial Port Parameters

别来无恙 提交于 2020-01-06 15:18:35
问题 I am trying to read the output stream from a GPS chip, attached to my computer via a USB cable, using the RXTX API. My Java reads sp.setSerialPortParams(4800, SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); My app currently outputs Scanning port /dev/tty.Bluetooth-Incoming-Port So I believe my Bluetooth port is number 4800? Running ls /dev/tty.* gives /dev/tty.usbserial only when the GPS is plugged in, so this is my device. I also see the Bluetooth device. So I think I

Google Api level 10 project not working on android 2.3.4

寵の児 提交于 2020-01-06 07:28:28
问题 I created a project to implement USB accessory. The accessory mode is supported for Google API level 10 which works on Android 2.3.4. Now my project works on AVD which has target device as Google APIs level 10 but does not work if I change the target to 2.3.3 ( Since 2.3.4 target is not there on eclipse) . In short I want to run a project that uses Google API level 10, on an android phone. How to do this? I tried copying the .apk file but that was of no use. I also tried to copy the complete

Google Api level 10 project not working on android 2.3.4

ぃ、小莉子 提交于 2020-01-06 07:28:15
问题 I created a project to implement USB accessory. The accessory mode is supported for Google API level 10 which works on Android 2.3.4. Now my project works on AVD which has target device as Google APIs level 10 but does not work if I change the target to 2.3.3 ( Since 2.3.4 target is not there on eclipse) . In short I want to run a project that uses Google API level 10, on an android phone. How to do this? I tried copying the .apk file but that was of no use. I also tried to copy the complete

Sending Data over USB on Interrupt Endpoint

家住魔仙堡 提交于 2020-01-06 07:16:08
问题 I am working for sending data over USB from an Android app to a connected HID device. On checking for interface and endpoint of the device I have found that the device has two interrupt endpoint for both In and Out direction with Max Packet Size=64. I have detected the USB device and its endpoint from the code below and struggling to send data from the app to device but didn't get success yet. private void setConfiguration() { if (mUsbDevice.getInterfaceCount() != 1) { Log.e(TAG, "could not