Android Question How to make a hidden 'easter egg' in b4a App - reg.

beelze69

Active Member
Licensed User
Longtime User
Hi!

I want to keep a feature (a hidden message) in my App screen which can be invoked by TAPPING the screen say 'n' times..

After the TAPPING is done on the screen (say 7 times), a hidden message will be displayed ...

Screen tapping can be done anywhere in the Application ... (something like the way we enable 'Developer Options' on mobile devices...

Ps. help.

Thanks
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4X:
Sub Globals
   Private LastClickTime As Long
   Private ClickCount As Int

End Sub

Sub Activity_Create(FirstTime As Boolean)

End Sub

Sub Activity_Click
   If LastClickTime + 1000 < DateTime.Now Then
       ClickCount = 0   
   End If
   LastClickTime = DateTime.Now
   ClickCount = ClickCount + 1
   Log(ClickCount)
   If ClickCount = 7 Then
       ToastMessageShow("top secret...", True)
   End If
End Sub
 
Upvote 0

beelze69

Active Member
Licensed User
Longtime User
Hi Erel !

Thanks a lot for your immediate reply...

I have lot of panels.. I guess I need to write the code in Activity_Click event on all
the PANEL CLICK EVENTS so that the Easter Egg is displayed 'wherever' I click on the application....

Is there any facility by which I can make an Activity_Click event 'override' the Panel_Click Events so that I need not code this on the Click event of all the Panels ?

Thanks a lot once again...
 
Last edited:
Upvote 0
Top