How to disable button 12 hours after click

You can cotrol your any button to clickable and non clickable by using firebase database.

For that, in your firebase database create a bucket, tag and set value “false” (text)

(Fill all firebase properties. Like bucket, tag, url, api key)

In your app set blocks firebase get value on screen initialize.

When firebase got value use if then condition:

If get value is equal to “false” (text)
Then set button clickable to false
Else set button clickable to true.

Whenever you want to disable the button set your firebase value to false and if you want to re enable it then change value to true.

Now its totally in your hand, when you want to enable disable it, change firebase value and thats it. All happens in the app.

1 Like