Kodeco Forums

Android App Widgets Tutorial

Learn how to give your users fast access to the most important functions of your Android app, right from their home screen, using App Widgets.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/33-android-app-widgets-tutorial

Amazing Matei ! Very straight and simple yet extremely helpful tutorial. Thanks a ton!

Thank you. I appreciate your feedback, it made my day!

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

@mateisuica Can you please help with this when you get a chance? Thank you - much appreciated! :]

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

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!