Phone On/Off

A

Adam Goetz

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.
 
P

Peter Foot [MVP]

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
 
G

Guest

Adam,

As Peter has suggested in order to turn on/off the phone you need to look at
the TAPI. OpenNETCF has recently added this support to the SDF which you may
want to look at as the TAPI can be very time consuming.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top