I'm trying to get my app to poll a server in the 'background.' I've
accomplished this by setting an alarm AlmSetAlarm to go off every 10 minutes
that calls my application with the sysAppLaunchCmdAlarmTriggered launch
code. Once my code is launched it opens the netlib:

    err = NetLibOpen(*appNetRefP, &ifErrs);
    if(err && err != netErrAlreadyOpen)
    {
        if(err == netErrConfigNotFound)
        {
            NetLibOpenConfig(*appNetRefP, 0, 0, &ifErrs);
            err = NetLibOpen(*appNetRefP, &ifErrs);
        }
        //error occured while opening netlib
        if( ifErrs)
            {}// interface error
    }

connects to the socket, sends the data and closes the netlib.

This works great most of the time. However, if I try polling while the
blazer application is running, the app crashes + the phone restarts. Any
thoughts, suggestions on how I can avoid this/not poll if the netlib is in
use by another application?

thanks
Michael

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

Reply via email to