• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to emulate keyboard event in application

I need to use button in my activity instead android keyboard. I finde example:

InputConnection ic = getCurrentInputConnection();

ic.deleteSurroundingText(4, 0);

ic.commitText("Hello", 1);

ic.commitText("!", 1);
But I can't understand how use it in my application. Where should I create class that extends InputMethodService, and what this class must have. Please help!!!
 
Back
Top Bottom