Create a foreground service that send characters like keyboard wedge


Is it possible in android to send characters to other apps like keyboardwedge? I would like to create a foreground service that send chars to the foreground app like datawedge does

Submitted by James Swinton … on December 01, 2021 Permalink

Hi Alessandro,

I don't think this will be possible. As far as I'm aware an application requires elevated permissions to push data to the Keyboard queue, so unless you're running on a rooted device I don't see this being feasible. 

There may be a way to work-around this by creating a custom IME and using that to push the data through the keyboard, but it would require your app to either toggle the default keyboard, or request the users sets your keyboard as the default.