How do I check status of internet connection?

Get help using Construct 2

Post » Sun Jul 31, 2016 2:35 pm

Hey guys,

i have online highscores in my game that needs internet connectivity to run. I wanted to do "warning" when the device is "offline". Do you have any idea how to do it?

Thanks for every help! :)
B
10
S
1
Posts: 42
Reputation: 620

Post » Sun Jul 31, 2016 3:08 pm

mosik wrote:Hey guys,

i have online highscores in my game that needs internet connectivity to run. I wanted to do "warning" when the device is "offline". Do you have any idea how to do it?

Thanks for every help! :)


The Browser plugin has a Condition to use:

Is online
True if the browser currently has an active connection to the internet.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,422
Reputation: 59,530

Post » Mon Nov 21, 2016 9:05 am

Hi guys. This is my very first post, so I would like to say mornin' :)

I searched for solution, but despite many issues described on forum, there is nothing to fix it. I also want to check online status, but it seems that Browser Is Online work only on desktop browser, not in XDK app. There I got always true on "is online" condition, even if there is no connection at all.

Any idea how to get it done? I need to check internet status to determine if preload admobs or not.
B
7
S
1
Posts: 12
Reputation: 399

Post » Mon Nov 21, 2016 11:21 am

Sorry for the bump, but I may have solution:

My test works (with online and offline check) after adding cordova-plugin-network-information in XDK.

Maybe it would be helpfull for somebody else. :)
B
7
S
1
Posts: 12
Reputation: 399

Post » Tue Jan 31, 2017 3:00 am

@qam Thanks man! That works perfectly!
B
18
S
6
G
1
Posts: 20
Reputation: 1,795


Return to How do I....?

Who is online

Users browsing this forum: batto and 21 guests