views:

25

answers:

2

Suppose i'm working on an android application . Suddenly i connect my Android phone with my computr. Does Android OS has a mechanism to detect such hardware interrupts?

+1  A: 

Yes, the linux kernel that is running in the background can handle interrupts.

You can even take a look at them by typing:

cat /proc/interrupts

in the adb shell.

Nils Pipenbrinck
+1  A: 

This is definitely not the android way of doing things. There are broadcasts to listen for when the phone is plugged in and unplugged

Falmarri