Skip to main content

Posts

Showing posts with the label internet

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.