From: Adam Goetz on
I have a full screen application that uses GPRS to communicate with a remote
web service. This is usually working fine, but I'm having reports from the
field where the system stops working. Under investigation it appears that
for some reason the Phone has been switched off. Now this is easy to fix
via the Today Screen on these units, but as it is a full screen app with a
password to exit, the intended user has no means of getting out to the Today
screen.

How can I tell if the Phone is On/Off, and how to switch it back on?

Units in question are Symbol MC70s.


From: Peter Foot [MVP] on
You can use the managed Windows Mobile SystemState class to monitor the
phone radio state - see the PhoneRadioOff property.

To actually enable/disable the phone yourself programmatically you need to
go through the Telephony API (TAPI) which means either purchasing a
third-party wrapper or P/Invoking the relevant APIs yourself. In summary you
must initialize TAPI, enumerate through the lines until you find one named
"Cellular Line", then using this open the line to get a handle to it. You
can then use the Extended TAPI method lineSetEquipmentState to toggle the
hardware state.

Regards,

Peter

--
Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com


"Adam Goetz" <sick(a)of.spam> wrote in message
news:uKgDZRYrHHA.1172(a)TK2MSFTNGP03.phx.gbl...
>I have a full screen application that uses GPRS to communicate with a
>remote web service. This is usually working fine, but I'm having reports
>from the field where the system stops working. Under investigation it
>appears that for some reason the Phone has been switched off. Now this is
>easy to fix via the Today Screen on these units, but as it is a full screen
>app with a password to exit, the intended user has no means of getting out
>to the Today screen.
>
> How can I tell if the Phone is On/Off, and how to switch it back on?
>
> Units in question are Symbol MC70s.
>