How to check internet connection in Sketchware?

To check internet connection in your Sketchware android project, follow the steps given below.

1. In your Sketchware project, add a new RequestNetwork component network.
 2. In onCreate event or in the event when you want to check internet connection, use the block RequestNetwork start network request to method GET to url http://google.com with tag A, as shown in image below.

 3. Add event RequestNetwork onResponse, and here Toast the message "Connected to Internet" or do other things when user is connected.
 4. Add event RequestNetwork onErrorResponse, and here Toast the message "Not Connected to Internet" or do other things when user is not connected.

5. Save and run the project.

Komentar

Cara pembuatan Apps paling Populer

Create Stopwatch App in Android using Sketchware

TextInputLayout in Sketchware

How to find and​ highlight a word in a text field in Sketchware?

A Flash Light App in Sketchware

How to enable download in webview in Sketchware apps?

Intent - Open File By Type

Code for implementing Notifications in Sketchware

How to share an image from Drawable folder?

ActionBar back button

Animation Transtition Animation