04-17-2009 05:19 AM - edited 04-17-2009 05:20 AM
Try putting a dialog and see if it is being showed.. Also I assume that you know the callInitiated is a method which listens for outgoing calls from your handheld..
EDIT: That is call being initiated from your side..
04-17-2009 06:21 AM
>>That is call being initiated from your side..
He..he..thanks. I know you trying to ensure everything.
To sum up everything let me put the sequesnce of execution,
1. After the simulator is started, sometime my app's main function breakpoint is hit.
2. From homescreen I dial a number.
3. callInitiated breakpoint is hit.
4. I do single stepping to reach the event injection code.
5. Single step the event injection code.
6. After the injection is posted, wait for the dialed call to disconnect.
Like you suggested, I inserted a dialog before each line in the "EventInjection code" block. The code now looks like below,
Dialog.alert("Preparing injection"); EventInjector.KeyEvent inject = new EventInjector.KeyEvent(EventInjector.KeyEvent.KEY_
DOWN, Characters.ESCAPE, 0, 0); Dialog.alert("Before injection"); inject.post(); Dialog.alert("After injection");
Observation:- The control does not come back to the function after inject.post()
04-17-2009 06:49 AM
I assume that you want to cut the call that is initiated.. If I'm right, use the following code to attain it..
ent.KEY_DOWN, ((char)Keypad.KEY_END), KeypadListener.STATUS_ALT));
04-17-2009 06:51 AM
In addition if you want to inject the escape key use "KEY_ESCAPE" instead..
Hope this is the requirement.. Cheers
04-17-2009 07:46 AM
When the call is in the state of initiated, then the Escape key injection will get you Task Switcher in front of the screen..
Cheers, and glad that you got worked it out