tags:

views:

22

answers:

1

Hi all, i want to generate Key Keypresses programmatically in android. i had gone through sample codes but they are using ServiceManager and IWindowManager which are removed from present SDK.

can any one sugget me how to do it or post sample code.please am need of it.. thanks in advance

+1  A: 

i want to generate Key Keypresses programmatically in android.

This is impossible for SDK applications, except via test code, for security reasons.

If you are trying to "generate Key Keypresses" for one of your own activities, you can try calling onKeyDown() and onKeyUp() yourself, but that will only work within your activity.

CommonsWare