i want to generate keyevents automatically for foreground activities from my servic.-Android
<p>I am developing an application in which i want to generate keyevents automatically for foreground activities from my service. I went through getCurrentInputConnection(), but we can use this function only in InputmethodService, even we cannot create InputMethodService object directly. In the mean i don't want to create my own softkeyboard through InputMethodService because it is cumbersome and detroit the use case of my app substansially. </p>
