super-productivity/android
Johannes Millan bf710637d2
feat(android): add home screen widget for today's tasks (#8737)
* feat(android): add home screen widget for today's tasks (#3818)

Revives PR #7124 (POC by @ilvez) on current master with the review
punch-list addressed:

- today's tasks pushed as a widget_data KeyValStore snapshot (memoized
  selector, debounced, hydration-guarded, re-pushed on sync-window end
  and on pause); Angular is the single writer of the blob
- done-checkbox taps go through a SharedPreferences queue only; pending
  taps are overlaid natively at render time (no native blob write, no
  race with the serializer, no double setDone)
- row title tap opens the app via fill-in extras branching (single
  PendingIntent template); exported receiver no longer lists the custom
  actions in its intent-filter
- typed v:1 contract (android-widget.model.ts <-> WidgetData.kt) locked
  by golden-shape tests on both ends
- drain dedupes and skips missing/already-done tasks; aggregated
  translated snack
- KeyValStore: drop per-call db.close() (SQLiteOpenHelper caches the
  connection; access stays @Synchronized via the App singleton)

Co-authored-by: ilvez <1476689+ilvez@users.noreply.github.com>

* feat(android): polish widget UI and support toggling done state

Visual polish to match the app:
- rounded surface card in the app's exact light/dark tokens
  (#f8f8f7 / #131314) with automatic day/night switching
- branded header (SP logo + 'Today') with separator, matching
  brand purple (#8b4a9d light / #a05db1 dark)
- app-style circle-check on the row end (Material check_circle in
  brand color when done), dimmed title for done tasks
- project dot tinted with the project color and hidden for
  project-less tasks; whole row and empty state open the app

Done-state toggle (was done-only):
- queue is now a last-wins map {taskId: targetIsDone}; tapping a
  done task queues setUnDone, and a done->undone round trip before
  the app runs collapses to a no-op
- checkbox target computed from the DISPLAYED state (incl. pending
  overlay) so repeated taps toggle back and forth while app is dead
- drain applies setDone/setUnDone, still skipping missing tasks and
  tasks already in the target state

---------

Co-authored-by: ilvez <1476689+ilvez@users.noreply.github.com>
2026-07-03 18:32:34 +02:00
..
.idea chore(android): untrack .idea/gradle.xml 2026-04-17 18:13:02 +02:00
app feat(android): add home screen widget for today's tasks (#8737) 2026-07-03 18:32:34 +02:00
fastlane/metadata/android/en-US/changelogs 18.13.1 2026-07-02 16:41:38 +02:00
gradle/wrapper feat: migrate to capacitor 8 2026-05-23 20:42:00 +02:00
.gitignore
ALWAYS_TAG_RELEASES_FOR_FDROID
build.gradle feat: migrate to capacitor 8 2026-05-23 20:42:00 +02:00
capacitor.settings.gradle feat(android): migrate edge-to-edge to built-in SystemBars (#8543) 2026-06-22 16:07:06 +02:00
gradle.properties
gradlew
gradlew.bat
LICENSE
README.md
README_OFFLINE.md
README_ONLINE.md
settings.gradle

super-productivity-android

Android App for Super Productivity (https://super-productivity.com/).

I am not an Android developer, so help would be very welcome!!

New Connectivity-Free Mode is Here!

This feature was added on October 7, 2024. See Pull Request #57.

You can now use the core features of the app without an internet connection, offering a smoother and more reliable experience. We've made several key updates to enhance usability:

  • Connectivity-Free Mode Support: Enjoy uninterrupted access to the app's main features without needing a network connection. You can still sync with WebDAV, Dropbox, or choose to work entirely offline without any network access.
  • Online-Only Mode (Compatibility Mode): For users who prefer or need the traditional experience, the app still supports the original mode, which requires an internet connection for functionality.
  • CORS Issues Resolved: Fixed cross-origin resource sharing (CORS) problems, especially for WebDAV sync, ensuring secure and smooth synchronisation with local or hosted resources.
  • Enhanced Security: Strengthened data protection to keep your information secure, even when offline.
  • Seamless Upgrade: Existing users can continue using the app in Online-Only Mode (Compatibility Mode) without any disruptions, while new users can immediately enjoy the benefits of Connectivity-Free Mode. Future updates will also include a smooth migration plan for everyone.

Update now to enjoy these exciting new features and improvements!

Launch Modes

The app supports two launch modes:

  1. Connectivity-Free Mode (Recommended) Use the app without an internet connection.
  2. Online-Only Mode (Compatibility Mode) Requires an internet connection to connect to production, local development, or self-hosted servers.

Configuring Launch Mode

To configure the launch mode, adjust the LAUNCH_MODE setting in the app_config.properties file:

  • 0: Default behaviour (read from SharedPreferences)
  • 1: Force Online-Only Mode (Compatibility Mode)
  • 2: Force Connectivity-Free Mode (Recommended)

Recommendation: Set LAUNCH_MODE to 2 for Connectivity-Free Mode.

How to Adjust LAUNCH_MODE

  1. Locate the app_config.properties file in the project's root directory.
  2. Open the file in a text editor.
  3. Find the LAUNCH_MODE setting and set it to your desired mode (0, 1, or 2).
LAUNCH_MODE=2

Important: The app_config.properties file is intended for local modifications only. DO NOT COMMIT this file unless you are sure of what you are doing.

Detailed Configuration Guides