Double click (Button and Back pressed)

This is a simple tutorial, to detect a double click on a button or “go back” on android, follow the steps below or see the example in the aia file:

Used Components:

add the above components and define the following blocks:

How it works:
Each click on the button will be counted, when the number of clicks is 2 (in the example, from 0 to 1) the action will be executed, the timer detects if the number of clicks actually is 2, if in a second the user does not touch twice the timer will reset the number of clicks.

In the example above, the number of clicks starts at 0, so the count is 0-1, when the caption text is equal to “1” the snackbar will show “Done” or if the "Back pressed “the snackbar will show the text” Back Pressed ", in the timer, if no more click is done by the user in 1 second the caption text will be returned to 0.

I hope I explained it right :slight_smile:.

some images and videos:

Vídeo (Google Drive)

double_click.aia (3,1 KB)
double_click.apk (4,3 MB)

Known Issues:
Need a short time interval between each click, very fast clicks are not detected as two.

I hope I have helped someone :slight_smile:.


I understood so I think you explained it well :slight_smile:

Could be useful for somebody I think !

1 Like

Great Tutorial :grin:

1 Like