Reputation: 2496
I wish to create event which will react on change of int/ eventually Integer variable. When the variable reaches some special value I wish to run some method (e.g. stopservice method). Can anyone help me?
Upvotes: 0
Views: 804
Reputation: 34534
Look into the observer pattern. This can be adapted and used for your situation.
There are great resources for this already available on the internet.
Upvotes: 1