Wifi SSID and 3G

Omitsu

New Member
Hello people. Im new at Basic4android so it will be a little difficult to explain this but i'll try.


i want to do an app to send a kind of data from my phone to my house and then receive a kind of status from it. So first i need to know if im connected to my wifi because if not, ill need to connect to my router by ddns(from another wifi connection or 3G better).

And that's my problem because i dont know how to do it.

I was looking for information about it and i found that its not possible getting the status from my actual connection.

ill show you a kind of example

_____________________________________________________________________________________________________________________

If wifi="localwifi"
localconection -----> no internet connection needed because it can work offline

else
ddns
_________________________________________________________________________________________________

AND if im not connected to my house's wifi and i want to connect by ddns i need to know if my connection its working, i mean if i have Internet connection.

WELL thats all, i really dont want someone to do all the job, i just need some help plz guys ;D

Thanks and Bye
 

wl

Well-Known Member
Licensed User
Longtime User
I guess your server at home will have an IP in an internal range (such as 192.168.x.x or 10.x.x.x) ?

Why not try to connect to the internal IP and when it does not work (because you are outside your network) connect to the external IP (as provided by Dyn DNS) ?

Wim
 
Top