• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to update value in fragment when Database updates.

I'm working with a step counter that constantly monitors the users steps, which displays the step count in a fragment. I'm having issues trying to update this value displayed when ever the value in the database changes. I've been looking at ContentProviders as a start but having trouble getting up and going with it. Does anyone have a decent example of how I make a fragment listen for the changes? Is this the right way to go about it?
 
How is the database updated? Could you get that code to update the UI components in the fragment?
 
Back
Top Bottom