Hi.
Anyone have a clue on this?
I implemented PhoneListener.
on callConnected(int arg0) I inject few commands.
The trace shows that the events are not being sent immediately.
Example:
Code:
public void callConnected(int arg0) {
System.out.println("Entering callConnected handler ");
KeyCodeEvent keyEvnt;
keyEvnt= new KeyCodeEvent(KeyCodeEvent.KEY_DOWN, ((char) Keypad.KEY_MENU), 0);
keyEvnt.post();
System.out.println("EVENT: KeyCodeEvent: menu - down");
keyEvnt = new KeyCodeEvent(KeyCodeEvent.KEY_UP, ((char) Keypad.KEY_MENU), 0);
keyEvnt.post();
System.out.println("EVENT: KeyCodeEvent: menu - up");
//...
try {
Thread.sleep(2000);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
//...
System.out.println("Exiting callConnected handler ");
}
The trace shows that the events are sent (injected) but they are executed right after the "Exiting ..." trace.
The sleep commands are added so I can track the sequence of events.
(I am using 8110 simulator)