Enable/disable button that interact with user



Hi, I want to create a button that if any user interact with it first, will automatically disable the same button on other user’s app (I don’t know if that make sense)

Specifically speaking, I want to create a lock/unlock button for a smart doorlock project. If the user1 press the lock button, then the user2 will not be able to press the lock button until user1 unlock it back.

Is it possible to do that? Any solution, link or aia that is relevant to my topic is very much appreciated.



I did this model well to try to help you I hope it helps.
For it to work correctly use firebase, enter your database key for your firebase and url in its integration fields, if you don’t know anything about firebase please let me know that I change it to Tiny Web Db which is simpler.
Good luck on your project.

Enable_disable_button.aia (3.0 KB)


Hi Cristhian,

First of all thank you for replying. Yes, It worked perfectly tho I already had a code of my own version but yours is more efficient as it didn’t use too many blocks as mine did. And yes I want it to integrate with a firebase, so you don’t have to change it to tiny Web Db version :slight_smile:

I will re implement my button to use your block model. Thanks again :smiley:


How nice! I am happy to help and when you are ready please be sure to share your working application with us, it is always good to see projects completed in Kodular.