I have an activity thats already binded to the service.
When I start the activity, it binds to the service and gets a value from a variable inside the service. So I can display the value in my activity.
Now I want to read the value of the variable in the service permanently. Not only once while onCreate of my activity is called.
How can I do this?
Whats the right way for this?
There are several ways to accomplish that. One relatively easy way is to use a
Handlerthat triggers itself periodicallyYou would put the update of the value in
doUpdate()in this example.