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

How to enable download in webview in Sketchware apps?

TextInputLayout in Sketchware

Create Stopwatch App in Android using Sketchware

How to integrate Admob Ads in Sketchware project using AIDE?

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

Code for implementing Notifications in Sketchware

A Flash Light App in Sketchware

Create a Stopwatch App using Chronometer in Sketchware

Create app to save all passwords, protected using voice key