Bump!

Too wordy mabye?  Here's a shorter version:

Problem:
The second dialog that displays over my form causes the Treo to lock up.
EvtGetEvent never returns.

Reproduction:
1. Proc Alarm triggers, and my form is displayed
2. While my form is displayed a phone call comes in
3. The Incoming Call form displays.
4. Caller hangs up generating a Missed Call form.
5. The Missed Call form never displays and the device is stuck in
perpetual ring/vibrate.

At this point my Proc Alarm handler's event loop has called the
EvtGetEvent() method and is just waiting for it to return. If you answer
the call it does not hang.  If you call again the Treo will not display
anything or ring/vibrate even though the caller can hear the ring tone
on the line.

I think the Phone Manager stops my UI when the call comes in so it can
display the Incoming Call form.  It would be nice to just blame this
issue on the Phone Manager since it seems to lockup while doing stuff
there.  However I suspect our code is causing this.  Hasn't anyone dealt
with handling phone calls while handling an alarm yet?  Any help would
be much appreciated.

Thanks,

Aaron


>-----Original Message-----
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On Behalf Of Aaron Hansen
>Sent: Monday, March 07, 2005 4:39 PM
>To: Palm Developer Forum
>Subject: Treo ProcAlarms and phone calls
>
>
>Hey folks,
>
>In my app I am setting a Procedure Alarm in order to handle 
>periodic synchronizations.  When my alarm procedure is called 
>I do some UI to ask the user if they mind performing a sync or 
>would they rather snooze the sync.
>
>This UI is causing problems when calls come in on Treo's.  SO 
>I am in a callback from a procdure alarm and displaying a 
>dialog.  In this callback I start up an app event loop to 
>handle and dispatch events for the form.  In the loop I use 
>nilEvents as a heartbeat for a timeout on the Dialog.  If the 
>user does nothing the dialog times out and performs the sync.
>
>My problem is that if a phone call comes in with this dialog 
>displayed and is missed, the call to EvtGetEvent() never 
>returns.  The incoming call dialog displays on top of mine and 
>I can select Answer or Ignore without problems.  However if 
>the call is missed.  The UI locks up and my last call to 
>EvtGetEvent never returns.  
>
>It seems like the first dialog that displays on top of mine is 
>ok, but if a second dialog displays it causes problems.  Even 
>if I answer the call and the phone dialog correctly closes and 
>displays my app's dialog again, I cannot get a subsequent call 
>to display any UI.
>
>Here is some pseudo code to show how the app tries to do this:
>
>Procedure Alarm fires -- Callback Procedure called:
>       FrmInitForm(myForm)
>       FrmSetActiveForm(myForm)
>       SetEventHandler(myEventHandler)
>       FrmDrawForm(myForm)
>
>       Start Event Loop:
>               EvtGetEvent()
>               [insert standard app event handling code here]
>               If user taps a button or timeout occurs exit loop
>
>       Handle User choice/timeout
>       FrmReturntoForm(0)
>
>Callback procedure returns
>
>Now for some questions:
>
>1. Any suggestions for how this should be done differently?
>
>2. Does anyone know how procedure alarms interact with the 
>phone or where this might be documented?
>
>3. Is UI blocked by incoming phone calls? (it looks that way to me)
>
>4. What are possible scenarios for EvtGetEvent never coming back?
>
>
>Thanks in advance,
>
>Aaron Hansen
>
>-- 
>For information on using the Palm Developer Forums, or to 
>unsubscribe, please see http://www.palmos.com/dev/support/forums/
>
>

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to