Reading and writing to a USB device via NDK?

1,027 views
Skip to first unread message

Anil

unread,
Jan 25, 2011, 5:46:12 AM1/25/11
to android-ndk
Hi,

Please tell me wether it is possible to connect to a USB device
through native c or c++ code and transferring data to and from it is
possible or not in NDK?

Thanks & regards,
Anil kumar

mic _

unread,
Jan 25, 2011, 2:56:18 PM1/25/11
to andro...@googlegroups.com
USB OTG (which is necessary for your phone to act as a USB host) is not an Android feature. It's up to each vendor to implement support for it. So far I think Motorola has done this, and there may be others that have Android phones with OTG support.
But until it's a part of Android it won't be a part of the NDK.

/Michael


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


Nikhil Dhavale

unread,
Jan 30, 2011, 11:56:01 PM1/30/11
to android-ndk
Hello Michael,
Can you tell me if I can use NDK to communicate with a prog on PC and
windows. NDK is used so that similar coding could be done for iphone.
Nikhil Dhavale

On Jan 26, 12:56 am, mic _ <micol...@gmail.com> wrote:
> USB OTG (which is necessary for your phone to act as a USB host) is not an
> Android feature. It's up to each vendor to implement support for it. So far
> I think Motorola has done this, and there may be others that have Android
> phones with OTG support.
> But until it's a part of Android it won't be a part of the NDK.
>
> /Michael
>
> On Tue, Jan 25, 2011 at 11:46 AM, Anil <anil.kr...@gmail.com> wrote:
> > Hi,
>
> > Please tell me wether it is possible to connect to a USB device
> > through native c or c++ code  and transferring data to and from it is
> > possible or not in NDK?
>
> > Thanks & regards,
> > Anil kumar
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-ndk" group.
> > To post to this group, send email to andro...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > android-ndk...@googlegroups.com<android-ndk%2Bunsu...@googlegroups.com>
> > .

mic _

unread,
Jan 31, 2011, 11:06:36 AM1/31/11
to andro...@googlegroups.com
You could take a look at the source code for ADB. But it will still be the PC acting as the USB host, and the phone will be the slave.

/Michael

To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages