santBart
santBart

Reputation: 2496

java android create event

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

Answers (1)

prolink007
prolink007

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

Related Questions