View Single Post
Old 03-26-2012, 11:23 AM   #1 (permalink)
citizenKane
New Member
 
Join Date: Mar 2012
Model: 8520
PIN: N/A
Carrier: lala
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Go back to application after finishing phone call

Please Login to Remove!

Hi, i am trying to go back to the application after placing a phone call. I place the call programatically, send some tones and finish the call. After that instead of going back to the screen from which i came from, i am sent to the phone calls list screen. My code is:

phoneCall.sendDTMFTones("12345#");

try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

EventInjector.KeyCodeEvent pressEndKey = new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_DOWN, (char) Keypad.KEY_END, 0,100);
EventInjector.KeyCodeEvent releaseEndKey = new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_UP, (char) Keypad.KEY_END, 0, 100);

EventInjector.invokeEvent(pressEndKey);
EventInjector.invokeEvent(releaseEndKey);

}
EventInjector.KeyCodeEvent pressBackKey = new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_DOWN, (char) Keypad.KEY_BACKWARD, 0,100);
EventInjector.KeyCodeEvent releaseBackKey = new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_UP, (char) Keypad.KEY_BACKWARD, 0, 100);
EventInjector.invokeEvent(pressBackKey);
EventInjector.invokeEvent(releaseBackKey);

any ideas on how to make this work? Thanks in advanced
Offline   Reply With Quote