EventInjector is part of the regular device system api, so importing the system api and then doing:
EventInjector.invokeEvent( new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv ent.KEY_DOWN , (char) NativeConstants.KEY_SEND, KeypadListener.STATUS_NOT_FROM_KEYPAD));
EventInjector.invokeEvent( new EventInjector.KeyCodeEvent( EventInjector.KeyCodeEvent.KEY_UP , (char) NativeConstants.KEY_SEND, KeypadListener.STATUS_NOT_FROM_KEYPAD));
should work perfectly, as it is for me.
note: NativeConstants and Keypad constants are interchangeable
|