Is the Android platform conducive to building an app that requires a external device plugged into the power input of the cell phone in order to send data to the app it self to be measured and displayed? I googled android & apple apps with external devices and did not find any for android only. Thanks
Asked
Active
Viewed 66 times
0
-
it would be better to use bluetooth or NFC to communicate with an external device. – kyle k Dec 17 '14 at 03:00
2 Answers
1
I suppose you can check that both that the power is connected using ACTION_POWER_CONNECTED and that the USB is connected using ACTION_USB_ACCESSORY_ATTACHED of UsbManager:
See this question for how to test if power is connected: How to detect power connected state?
And this for a reference of how to use UsbManager:
http://developer.android.com/reference/android/hardware/usb/UsbManager.html
0
Maybe I can point you to the Android Accessory Development Kit...
http://developer.android.com/tools/adk/index.html
There are two guides linked off of the first page, though they are a bit old and not liekly to be reflective of the new status of Android Studio > Eclipse [EDIT: this contains its own IDE, forgot that]

jesses.co.tt
- 2,689
- 1
- 30
- 49