thank you for this amazing tutorial.
what if i want to make the user ability to change agrams from 7 to 10 for the long coffe as instance how can i implement this
You would need to add this configuration to the CoffeeLoggerWidgetConfigureActivity:
add a field like “long coffee amoung (g)”
save this value in CoffeeLoggerPersistance (or directly in the SharedPreferences)
use the saved value when adding a long Coffee in the MainActivity (or Service)
It’s just like we’ve done with the coffee limit in the tutorial but with a new user preference. Don’t forget to use the default value if the user doesn’t enter a preference