0

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

2 Answers2

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

Community
  • 1
  • 1
Stanley
  • 1,421
  • 5
  • 19
  • 36
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