Skip to content

feat: add Send notification DIY action - #1411

Merged
sameerasw merged 3 commits into
sameerasw:developfrom
jawzf:feat/002-send-notification-action
Oct 18, 2026
Merged

sameerasw merged 3 commits into
sameerasw:developfrom
jawzf:feat/002-send-notification-action

Conversation

@jawzf

@jawzf jawzf commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds a Send notification action to DIY automations, under System actions next to Wait.

Before: automations could only post failure notices; there was no way to show your own message.

After: add Send notification to any automation and fill in:

  • Title
  • Message (multi-line)
  • Label (optional): shown next to the app name in the header, e.g. "Essentials • Home". Android always shows the posting app's name there, so the label is set as the notification's subtext.

Save stays disabled until there's a title or a message, and blank fields are left off the notification. The action row shows "Send notification · <title>".

How: Action.SendNotification is a configurable action like Wait, saved through the existing ActionGsonAdapter. AutomationNotificationPoster posts it on a new Automation notifications channel, separate from the failure notices so either can be muted on its own. Each action uses its own notification id, so running the same action again replaces its notification while different actions stack. The action needs POST_NOTIFICATIONS; the editor shows the existing permission sheet when it's missing, and at run time a missing permission is skipped without a crash.

Type of change

  • Bug fix
  • New feature
  • UI / visual update
  • Performance improvement
  • Refactoring / cleanup
  • Translations
  • Build / CI tooling

UI changes

1_notification

The posted notification with title, message and label.

2_two_notifications

Two different Send notification actions stack; the one with only a title has no empty lines.

Checklist

  • The base branch is set to develop (not main).
  • The app builds cleanly locally with ./gradlew assembleDebug (and assembleRelease).
  • Unit tests pass with ./gradlew testDebugUnitTest (2 new tests in ActionListJsonTest: round trip, and missing fields load as empty).
  • Tested on the Android 17 emulator: action listed under System; Save disabled when empty; notification shows title, message and "Essentials • "; blank fields omitted; same action twice shows one notification, two actions show two; without notification permission the editor shows the permission sheet and running the automation doesn't crash; actions keep their text after a force-stop.
  • Reuses EssentialsBottomSheet, RoundedCardContainer and the existing permission sheet.
  • New strings are in strings.xml (English only).
  • No new settings, so nothing to register in FeatureRegistry.kt.
  • No new dependencies or permissions in the manifest.

🤖 Generated with Claude Code

Posts a notification with a user-set title, message and label (shown as
subtext next to the app name) on its own "Automation notifications"
channel. Running the same action again replaces its notification.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sameerasw
sameerasw force-pushed the feat/002-send-notification-action branch from ce7cfcc to e5f6420 Compare October 18, 2026 03:34
@sameerasw
sameerasw merged commit 61ba376 into sameerasw:develop Oct 18, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Essentials Progress Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants