InternetConnection : Useful with IoT and Apps use Internet : Continuously checks for Internet: No need to use Clock

  • The InternetConnection extension is very much useful to work with Internet of Things (IoT) and The Apps use Internet.*

  • It Continuously Checks the Network for Internet Access.

  • No need to use the Clock block for this purpose in the app coding.

:point_right: The only block of this extension : ‘InternetConnection’ is…

:point_right: The event InternetConnection.Results of this extension has its own Timer that checks the network continuously (No need to use the Clock block) for the internet access and delivers the results as parameters which can be used in the app coding…

InternetConnection.Results - Event - Parameters Description

  • Network Status : ssid, mobile or disconnected

  • IP Address : Local IP Address or 0.0.0.0(if disconnected)

  • Internet Access : true or false

  • Metered Internet : true or false

The parameter networkStatus gives the SSID of the WiFi Network to which the device is connected.
The phrase mobile, if it is connected to the Mobile Network.
Otherwise, the phrase disconnected, if it is disconnected from the network.

The parameter ipAddress gives the Local IP Address with which the device is connected to the network.
Otherwise 0.0.0.0, if it is disconnected from the network.

If the parameter internetAccess is true, the Internet is available.
If it is false, there is no internet.

If the parameter meteredInternet is true, there is a data limit in accessing internet.
If it is false, there is no data limit in accessing internet.

:point_right: Screenshots of the app using this extension are…

:star:Try and feel the usefulness of this extension. That’s it.

Download the resources here:

:point_right: Use this extension and feel free to suggest the improvements.

Thank you
Hema Srinivas
India
08.08.2020

:heart_eyes: P.S.

This extension is very useful in making apps for IoT with Arduino, ESP, Raspberry PI and many other embedded hardware and apps using Internet.

Happy coding.

13 Likes

Nice Extension :+1:

1 Like

Thank you very much.

1 Like

Who told you to use clock to check for internet?
Network component has Connect and Disconnect event.

Why not use a broadcast receiver which will automatically catch the state changes?

Good job btw :+1:

2 Likes

Thanks for your comment.

  • It checks the network for the availability of internet.
    Does Network Component do this?
    Please check for that option once!

Please use this extension before you comment.

2 Likes

Yes it does.
Disconnect event gets fired when device disconnects from internet and Connect event gets fired when device connects to internet.

Internet or Network, check it once and feel the difference.

1 Like

This one. :slightly_smiling_face:

1 Like

I am a beginner in extension making. I am learning the things by doing.
I learn about broadcast receiver and use it in my future extensions.

If i am stuck in coding, can i ask you?

5 Likes

keep up the good work!

don’t hesitate to ask…
however the corect community for working with the App Inventor sources is this

Taifun

Yes you are right. I have tested these events many times. It triggers when you are connected to internet, no matter if the connection is stable or not. So I think this extension works in a different way.

Dear Sunny Gupta and Aditya_Singh,

Please check the Network Component performance in checking Internet Access like this way…

Code used for checking :

code

Result:

  • Mobile-1 is used as HOTSPOT which does not have Internet access (Data is Turned Off)

  • Mobile-2 is used for checking the Network Component.
    It shows: Network1.IsConnected as True. But Web Viewer indicates No Internet.

:point_right: So, check Network Component once again and compare the results with my extension: InternetConnection.

Awaiting your response…

3 Likes

Please check my response in the above post.

2 Likes

Please check my response in the above post.

1 Like

The only difference I can find is that your extension tells whether Internet Connection has data or not.

It is the important factor which is a must with IoT.

1 Like

But Internet Connection is different from Data Connection so you should mention it in the first post.

I don’t understand, in which case both are different.
Are Network connection and Internet connection both same?
Is Data connection different from Internet connection?
Please explain?

3 Likes

Different data limit off or not connected true

Really amazing extension.

I am working with IoT. I built an app e-switch to control electrical switch board in my home through internet. I stuck up in checking the availability of Internet. I tried Network Connection component. But it does not meet my requirement.

I have been searching for the solution for the last two months. Finally, i get your Internet Connection Extension today. This is what exactly i need.

Thanks for making such a fabulous extension.

Hope the people working on IoT got a great solution with your extension.

1 Like