How to emulate keyboard event in application
<p>I need to use button in my activity instead android keyboard. 
I finde example (<a href="http://developer.android.com/guide/topics/text/creating-input-method.html" rel="nofollow">http://developer.android.com/guide/topics/text/creating-input-method.html</a>):</p>

<pre><code>InputConnection ic = getCurrentInputConnection();

    ic.deleteSurroundingText(4, 0);

    ic.commitText("Hello", 1);

    ic.commitText("!", 1);
</code></pre>

<p>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!!!</p>
