capture keystrokes from background service in android

Hello All,These days i am working on android project in which need to grab all keystrokes using default keyboard.Main concern is my application runs in background as service and from my service i want to detect keystrokes in android.

In windows dev it is called "system hooks", I hope you find a solution but i think it is real difficult that it will allow you to do it cause that you try i maybe a virus.You coul get card numbers, passwords,....I think system will forbide it.