简体   繁体   中英

android app to send data to the peripheral through USB

I want to develop an android application to be written in html5 and Javascript which sends a string "001" to the peripheral( connected via USB). I've googled about it and knew that javascript don't have access to the external hardware. As this a part of my project i am having big trouble.

Android App.(javascript) <----USB---> peripheral(receives string 001)

Has somebody already done this or have idea about this?

Expecting some Suggestions and help. Thank you

(late answer to a valid question)

In a scenario like this, a native application is required to act between the HTML5 part and the peripheral. There have been major changes to USB communication in Android since API 12.

There is plenty of information online, including two samples from the Android Developers group: AdbTest and Missile Launcher .

Of course, firstly you should read the official documentation on the subject here and here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM