I Want to create a log user activity when android phone/Tablet get connected to PC with date and time
I searched a lot for that I am not able to find how to catch usb connection event
I have implemented the log4j for logging exception and steps of phone user.But I am unable to log anything regarding PC connection.
Please Help me.
Thanks
You can use the following receiver, android.intent.action.UMS_CONNECTED
For Logging
source : Android: Detecting USB
alternatively check for charging in case device has usb charging mode
source: http://developer.android.com/training/monitoring-device-state/battery-monitoring.html