In Intent,there is a constant named `ACTION_DOCK_EVENT`

Added in `API level 5`  

Broadcast Action: A sticky broadcast for changes in the physical docking state of the device.

What do you mean by docking state?