Notification of network availability

  • Thread starter Thread starter Hari
  • Start date Start date
H

Hari

Hi,

Does pocketpc, windows mobile devices notify network
availability? I use a socket connection in my app which is torn-off
when i receive a phone call. I need to establish a new socket
connection as and when the phone call ends and network channel gets
available. But how do i know that the 'network is now available'? Does
the platform notify that or do i have to keep polling until its
available? Please suggest.

Thanks,
Hari
 
If you are using Windows Mobile 5.0 you can use the SystemState class to
watch the PhoneActiveCallCount property. When this returns to 0 you can use
the device for data connections again.

Peter
 
If you are using Windows Mobile 5.0 you can use the SystemState class to
watch the PhoneActiveCallCount property. When this returns to 0 you can use
the device for data connections again.

Peter

Hi Peter,

Thanks a lot for the response. Currently i don't have a device.
I've to do that with the emulator. How can i simulate a call to the
emulator? Can you provide a sample app that uses SystemState class and
the PhoneActiveCallCount Property? And this class is contained in the
WM5.0, so i can't use this for PPC devices. Any other solution for
PPC?? Please suggest.

- Hari
 
Monitor the IP address you are listening on using a worker-thread, maybe use
TAPI - if not targeting WM5.

It is not possible to receive a call via the emulator as it it a fake
network. You can however emulate an outgoing call.
 
Monitor the IP address you are listening on using a worker-thread, maybe use
TAPI - if not targeting WM5.

It is not possible to receive a call via the emulator as it it a fake
network. You can however emulate an outgoing call.

Hi Simon,

Monitor the IP address you are listening on using a worker-thread, maybe use
TAPI - if not targeting WM5.
Can you please expand on monitoring IP? I found another post which
suggests using
http://www.innovativedss.com/forums/topic.asp?TOPIC_ID=68.
According to this, i need to keep sending url requests until i get a
response, which means that the network is available. But this is not
the effcient way.

Is there no way that i be notified of the network availability by the
OS ??

I can't use the PhoneActiveCallCount property of system state because,
there could be other reasons for the network disconnection, not only
the phone call.

Plz suggest a way out.

Thanks,
Hari
 
Back
Top