[android-developers] Re: How to read data from external device using android USB Host Api ?

2012-10-16 Thread German Schwengber
Hola gente, a mi me pasaba algo parecido. Podía crear el UsbManager, pero 
deviceList.size() me daba 0. Despues de averiguar me entere que el problema 
no era de mi app, sino de la config del la tablet (superchina A10-MID 7, 
android 4.0.3).
Me di cuenta usando una App gratuita USB Device Info. Esa aplicacion me 
devolvia Android Device list=0, Linux Device List=5 (1 PenDrive + 1 
WLANAdapter + 3xHubUSB).
Despues de escudriñar la web hice lo siguiente:
-genere el archivo android.hardware.usb.host.xml
-edite el archivo tablet_core_hardware.xml
-los dos archivos estan en /system/etc/permissions

Vean las instrucciones en: 
http://stackoverflow.com/questions/11183792/android-usb-host-and-hidden-devices 
(primer 
respuesta)

Despues de hacer eso USB Device Info veia Android Device list=2 (1 
PenDrive + WLANAdapter), Linux Device List=5 (1 PenDrive + 1 WLANAdapter + 
3xHubUSB). Mi app tambien me devolvia deviceList=2.

Espero les sirva

El miércoles, 31 de agosto de 2011 12:36:43 UTC-3, Sam escribió:

 Hello , 

 I've written an app to connect an USB Device and read data from 
 external usb device to my android USB Host 3.1 root tab device. 
 i used http://developer.android.com/guide/topics/usb/host.html android 
 USB Host Api. But every time read data value got 
 zero value in every byte from external device. 

 can anyone send me demo or proper documentation how to read data from 
 external device ? 
 any encoding require for reading data ? 

 Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How to read data from external device using android USB Host Api ?

2012-10-01 Thread Anupam Jain
hiii
firstly check that your devices is connected with usb host, if your devices 
is connected than print device name and vendor id.
after that you send command and check response from your device.
Thanks 

Anupam Jain 

On Wednesday, 31 August 2011 21:06:43 UTC+5:30, Sam wrote:

 Hello , 

 I've written an app to connect an USB Device and read data from 
 external usb device to my android USB Host 3.1 root tab device. 
 i used http://developer.android.com/guide/topics/usb/host.html android 
 USB Host Api. But every time read data value got 
 zero value in every byte from external device. 

 can anyone send me demo or proper documentation how to read data from 
 external device ? 
 any encoding require for reading data ? 

 Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en