Net : Get some information about network

Introduction

Extension Name: Net
Description: It gives you some basic information about user's network connection.

Latest Version: 3
Released: 2020-06-08T18:30:00Z
Last Updated: 2021-12-12T18:30:00Z

Blocks

image

Documentation

  • OnConnect
    Event raised when device connects to internet
    component_event (12)
  • On Disconnect
    Event raised when device disconnects from internet
    component_event (13)
    Note: this method does not works during live test
  • Is Connected
    Returns whether device is connected to internet or not
    component_method (7)
    Returns : boolean

Downloads

Aix: com.sunny.Net.aix (9.5 KB)

Updates

ChangeLog Version 2

Net : Get some information about network - #16 by vknow360

ChangeLog Version 3
  • Extension is now compatible with Android 11

Hope it helps ! :grin:

15 Likes

Does this cover/discriminate between both wifi and data connections ?

1 Like

Both will be treated as same.

1 Like

(added to FAQ)

1 Like

Please check this:

The OnDisconnect event is not triggered.

1 Like

Are you testing in companion?

cool i like it :+1: :smiley: :+1:

Thanks :heart_eyes:

You’re welcome :+1:

grafik

Probably it will not work during Live Test.
Because as soon as you disconnect from internet your connection to Rendezvous will also get disconnected.
It works perfectly in apk :wink:

But OnConnect works also with Companion (USB), so so add that in the description.

grafik

Sure.
But it is one of those extensions who should be tested in apk :grin:

1 Like

I’ve tested it on the phone and I found it SUPER :+1:
Nice app @vknow360!

2 Likes

MIT can redistribute this extension:

I, vknow360 aka Sunny Gupta, attest that I am the author of the Net extension , grant that the extension included in this project is free and that MIT has a non-exclusive irrevocable license to republish the extension as part of the project file for the purposes of the MIT App Inventor Hackathon 2020.

3 Likes

ChangeLog Version2

Bug Fixes

  • Fixed bug in OnDisconnect event
    Thank you @Anke

Aix file
com.sunny.Net.aix (8.2 KB)

4 Likes

This extension has been added to my watch toolbelt! It also returns true for internet connections via bluetooth, not just data/wifi :), that is to say when its paired with my phone. Which lets me delete quite a bit of code from my projects :slight_smile:

Thanks!

1 Like

Hi @Horacio_Spinelli
Glad to know that you liked it.
But, unfortunately, Google is limiting resources for us (Extension Developers) so the extension is currently not comaptible with API 29.
However, I have fixed it and will release an update soon.
Thank you.

2 Likes

Olá, sou meio leigo no app mi2 ainda, como eu poderia informar no app se tem internet ou não? a principio gostaria de testar com uma mensagem text e depois acionar um arquivo html informando que não tem conexão

Just use OnConnect and OnDisconnect events.