The Android Accessibility service did what i want :
http://developer.android.com/training/accessibility/service.html
and i found a simple example :https://gist.github.com/qihnus/1909616
but it needs to modify your manifest.
check here:
http://developer.android.com/guide/topics/ui/accessibility/services.html
Also some Apis were declared from Android Ice Cream Sandwich or up but you can still access them using support libraries.
This is a general answer but you can do whatever from these links.
Remember to check if Accessibility is enabled or not:
Detect if my accessibility service is enabled
and if not enabled you can fire an intent to the setting to make user manually enable it, since you can not enable Android Accessibility programmatically.