Event when the device is in the cradle

L

Luca Vajani

Hi guy how I can be notified when the device is put in the cradle?
OR how can I know if it's connected to the Lan or ti Internet?

Thanks in advance
 
T

Tom Krueger [MSFT]

Hi Luca,

There is an article titled "Testing for and Responding to Network
Connections" on MSDN.
Here is a link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/NetworkComponent.asp

It also comes with sample code that you could leverage.

Take care,
Tom

--
Tom Krueger
Microsoft Corporation
Program Manager
http://weblogs.asp.net/tom_krueger

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
 
T

Tom Krueger [MSFT]

Here is a Google search that point to OpenNETCF and another article.

http://groups.google.com/groups?hl=...eHLlXEnSEHA.644%40tk2msftngp13.phx.gbl&rnum=1

If you would, please post what ends up working for you so others can
benefit.

--
Tom Krueger
Microsoft Corporation
Program Manager
http://weblogs.asp.net/tom_krueger

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
 
L

Luca Vajani

Tom Krueger said:
Here is a Google search that point to OpenNETCF and another article.

http://groups.google.com/groups?hl=...eHLlXEnSEHA.644%40tk2msftngp13.phx.gbl&rnum=1

If you would, please post what ends up working for you so others can
benefit.

--
Tom Krueger
Microsoft Corporation
Program Manager
http://weblogs.asp.net/tom_krueger

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


Thanks a lot Tom ^__^
bye, Luca
 
L

Luca Vajani

Tom Krueger said:
Here is a Google search that point to OpenNETCF and another article.

http://groups.google.com/groups?hl=...eHLlXEnSEHA.644%40tk2msftngp13.phx.gbl&rnum=1

If you would, please post what ends up working for you so others can
benefit.

--
Tom Krueger
Microsoft Corporation
Program Manager
http://weblogs.asp.net/tom_krueger

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Hei Tom, I've noticed something in your discussion on Devbuzz..
So, I think to change the url of the webservice if I'm connecting via
Lan or via Internet.
Image that I can access my webservice from the office (LAN ip address)
or from my home via gprs ( public ip address).

How the device knows what's thre url to use?
Simply testing the Device IP Address.
So, if I'm at home, I test the Ip address and I see that is 127.0.0.1.
OK, I'm not connected to the lan. Call webservice via gprs.
So, I call my webservice again BUT....now my ipaddress isn't 127.0.0.1
anymore, because The gprs connection has assgined me another
ipaddress.
Knowing that Gprs connection seems to remain always open (also using
opennetcf connectionmanager), teh device thinks to be connecetd via
lan but it isn't true.
And this happens till the gprs session is up....

The only way to be sure is to be notified by activesync ( if the
device is in the cradle but activesync is turned off the device can't
connect to the lan).

Thats right.
BUT

The device can have a wifi connection...I need to know where wifi card
receive signal and connect to the lan.

Do you think some other way?
 
N

Neil Cowburn

As a sidebar, if you're calling a Web service, you don't need to use
Connection Manager. The Web service stack will handle the GPRS connection
for you.

See here for more details: http://tinyurl.com/3uun2

--Neil
 

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