Possible Duplicate:
How to implement a change listener
I know that some will use a change listener or some custom made listener to detect a change in the value of a variable.
Is there a way to code this without using a listener. A simple java way to do this? Any ideas?
I am looking for alternative ways to do this. Is there a better way or is using a listener the best way? This is a subject that can be called “best practices”
Any time the value of a variable changes in an Activity it will be reported to a Service by way of broadcast intent to a broadcast receiver that is nested inside of the Service.
I would hide the variable behind a Setter Function. Then every time the setter is called, the variable is modified.