The basics. Sending a signal from an external device connected via USB to an Android phone to make a regular application.

I just need some initial directions as I am new when it comes to electronic hardware and the interaction of Android and Android. I am comfortable in both domains within their borders.

I have a black box electronic circuit. To simplify everything, suppose that everything he does sends a binary 1 or 0, i.e. electrical impulse on or off. I need to connect this circuit to my Android phone via USB (host / accessory mode) and want my Android app to respond to this impulse.

If possible, launch the application when the phone receives a 1 / ON signal OR display the "On" dialog box when the application is running in the background as a service

Please do not worry too much about the electronics part. I know this is a programming / programming forum.

eg. black box: an electronic thermometer that sends a pulse / 1 / switch-on signal if the temperature goes up to 100 degrees Celsius or something like that on a simple circuit board (without a processor or programming language / it depends on the architecture) and can cause a signal, which can be sent to an Android phone to inform my application that an event has occurred.

Another simpler example is a headphone that has a connect / disconnect button connected to the audio jack of an Android phone. I just need to reproduce this functionality. instead of the phone or the phone, my electronic BB and instead of the phone call program, a custom Android application.

Links, DIY projects, Tuts anything really useful

+4
source share
1 answer

This is a big open question. I assume that you are asking, this is the "real world interface <=> Android". This requires some hardware and some software. You can look here:

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

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

You can also look at the competition.

www.phidgets.com

Remember that creating a USB device that works with an Android device is not as straightforward as it seems: you need an Android device that can run in host mode, the Android image used on the device must support USB devices, and you may have a power problem if the device should be powered by the USB port that you plan to use.

Experience shows that the cheapest Android device is all the more unlikely that it will work with exotic USB devices.

+3
source

Source: https://habr.com/ru/post/1445306/


All Articles