4

I just need some initial directions as I am new when it comes to electronic hardware and android phone/app interaction. I am comfortable in both domains within their boundaries.

I have a black box electronic circuit. To simplify things lets assume all it does is, send binary 1 or 0 i.e. electric On or Off pulse. I need to connect this circuit to the android phone via USB(either Host/accessory mode) and want my android app to react to this pulse.

If possible - start the app when the phone receives 1/ON signal OR display an "Switched ON" dialog message while the app is running in background as a service

Please dont worry too much about the electronics part. I'm aware that this is a software/programming forum.

e.g. black box : a electronic thermometer that sends a pulse/1/On signal if the temperature goes to 100 degrees Centigrade OR anything similar that's on a simple circuit board(no processor or programming language/architecture dependent) and could trigger a signal that could be sent to the android phone to inform my app that the event occurred.

another even simpler example, an earphone that has a connect/disconnect call button connected to audio jack of the android phone. i just need to replicate this functionality. instead or ear phone, my electronic BB and instead of phone call program, a custom android app.

Links, DIY projects, Tuts anything will be really helpful

4

1 回答 1

4

这是一个很大的悬而未决的问题。我猜您要的是“真实世界 <=> Android”USB 接口。这需要一些硬件和一些软件。你可能想看看这里:

http://www.yoctopuce.com/EN/products/usb-sensors/yocto-knob

http://www.yoctopuce.com/EN/article/sample-applications-for-android

您可能还想看看比赛

www.phidgets.com

请注意,让 USB 设备与 Android 设备一起工作并不像听起来那么简单:您需要一个能够在主机模式下工作的 Android 设备,设备中使用的 Android 映像必须支持 USB 设备,并且您可能有一个如果设备应该从您计划使用的 USB 端口供电,则会出现电源问题。

经验表明,最便宜的 Android 设备越不可能与外来的 USB 设备兼容。

于 2012-11-12T07:27:19.957 回答