03-02-2009 02:44 PM
I was testing this with the phone application already in the foreground. Part of the issue is the fact that the events are being injected before the phone application has focus. To work around that you can add a delay (Thread.sleep) in the thread that is running this code.
You'll also need to use EventInjector.invokeEvent method instead of calling post.