Double tap exit button to exit in sketchware

How to enable double click to exit feature in your sketchware made application 

Hi there today in this post I will show you how you can use double tap to exit the app feature in you application.

Follow the below steps carefully :
Step 1

After creating a new project add new number variable called “exit”
Step 2

on activity create
Set number exit to 2
Then you can do anything as per your your app’s requirements 
I will load a webview so I will be  adding a webview called webview1 load url block and set your url

Step 3

Now go to on back pressed event
and add the following blocks

by this code we are checking whether the number is set to 0 or not. We have set this number to 2 at the begining. Every time you click the number, it decreases itself by 1. When equals to zero then it finishes the activity. 

remember if you have a webview in your project then set the blocks according to the below image. Because you should go back to the origin page first then exit the app

Remember you can toast any message using this toast block 

and you are done. Run your project
Please comment any kind of problem or suggestion

This Post Has 4 Comments

Leave a Reply