Hello LiveCoders!
I want to check internet connection when an android app is just loaded.
If there is no internet connection, I want to make app poped up with message saying "Check your internet connection" with "OK" button.
And with touching "ok" button, I want to make app closed.
How can I make this script..?
Tommy
Is it possible to check internet connection for android?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Is it possible to check internet connection for android?
Hi Tommy,
If I'm correct, there is no special feature for Android to check the internet connection. The following should work:
and an alternative way could be
There are other, more complicated ways, but this should do. You can replace the address of my website with your own or e.g. with Google's.
Kind regards,
Mark
If I'm correct, there is no special feature for Android to check the internet connection. The following should work:
Code: Select all
on mouseUp
put empty into fld 1
get url "http://economy-x-talk.com"
put the result into rslt
if rslt is not empty then
beep
answer "Check your internet connection"
end if
put rslt into fld 1
end mouseUp
Code: Select all
on mouseUp
get hostnametoaddress("economy-x-talk.com")
if it is empty then
beep
answer "Check your internet connection"
end if
end mouseUp
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Is it possible to check internet connection for android?
Dear Mark,
Thank you very much for your help.
I wonder how you create scripts.
You are a genius.
Thanks alot..
Best regards,
Tommy
Thank you very much for your help.
I wonder how you create scripts.
You are a genius.
Thanks alot..

Best regards,
Tommy