I am trying to write a service/daemon that will start when the USB is
connected and do something, then stop when the USB is disconnected.

Normally I would expect to use udev or something similar, but as far
as I am aware Android does not have udev. This means that all devices
are created statically, so we cannot tell if a USB device is connected
by watching the /dev folder. I cannot see therefore how the "on device-
added-" functionality could be used here as the device is always
there. Please correct me if my understanding is wrong in this.

My question is, how can I see when the USB is connected/disconnected?

I thought of mountd and vold but I'm not sure whether they can be used
in this case, as I think they normally for mounting partitions.
Any thoughts on this would be greatly appreciated.

Jon
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to