BetterArguruments / nofapp

Awesome App to track your NoFap progress
http://betterarguruments.github.io/nofapp
2 stars 0 forks source link

Android widget #9

Closed chrisbraucker closed 9 years ago

chrisbraucker commented 9 years ago

Native android widget displaying the current streak, maybe with a 'next achievement' indicator of sorts. The App Widgets developer guide seems to be a good start.

Updating the widget is done via onUpdate(). For this to work, read-only database access is needed to fetch the last relapse date. A single 1x1 scalable widget should suffice, maybe with functionality to start a specific intent on tapping, like entering data/sex/relapse or showing latest stats.

chrisbraucker commented 9 years ago

Regarding widget updates on changes in app, I see two options:

or rather implement the former and add the latter as needed.

olieidel commented 9 years ago

The second solution sounds more complex, but better. In case of relapse, I suppose that it wouldn't work if we only update the widget on app load, as the widget would still need to be updated.

chrisbraucker commented 9 years ago

Right now, the widget gets updated every time the user closes (pauses) an activity that extends from MainActivity. Meaning: Press the Back or Home button and the widget updates.