I was wondering if it is possible in Android to write an app that runs in the background and gets the text entered into a TextField of another app. More concretely, is it possible to have an app run in the background that allows to obtain the content that is typed in the textfield for sending messages in WhatsApp or gtalk? Imagine for instance that before sending the content through WhatsApp, I want to preprocess the text and only then send it, but this pre-processing shall be somehow automatic.
On a desktop this is possible to build but I am not sure if one can build this for Android phone devices. Maybe one could catch all inputs done with a keyboard that are sent to a certain app, but I guess this is not possible to prevent keyloggers etc. Is there any alternative to achieve this goal?
I would like to do it without rooting the phone.
Essentially, what I want to do is to have a keyboard where the user can type using the standard english letters but the typing is automatically translated to hindi text + some annotation added after each word.