Android Question [SOLVED] Monitor phone to network connection ?

lemonisdead

Well-Known Member
Licensed User
Hello,

I am facing a problem I can not solve : I am in need of detecting if the phone is connected to its network and warn if the connection is lost.

The only way I had found was to use a service and use PhoneEvents then ConnectivityChanged event. But this seems only to catch the lost of connection when the data are on only.

Using a broadcast receiver on android.net.conn.CONNECTIVITY_CHANGE won't return the "reason" any time.

Please, do you know a way to detect if the phone is connected to its network without data ?

Many thanks
 

Troberg

Well-Known Member
Licensed User
As Erel said, checking a real site is the only way to detect that you are not stuck in a captured portal (those login pages to wifi networks you get to regardless of which URL you specify).
 

lemonisdead

Well-Known Member
Licensed User
Hello,

Excuse me, I had some technical troubles I couldn't reply previously. Thanks for your ideas. I will try.

I think she cares about connectivity to the radio network.
Yes, you are right. Thanks for the word "radio network". I will be able to make further googling about. ;)
 

lemonisdead

Well-Known Member
Licensed User
Top