Skip to content

feat(android-foreground-service): add notificationTapped listener for…#2

Draft
sizeak wants to merge 61 commits intomainfrom
add-notification-tapped-listener
Draft

feat(android-foreground-service): add notificationTapped listener for…#2
sizeak wants to merge 61 commits intomainfrom
add-notification-tapped-listener

Conversation

@sizeak
Copy link
Copy Markdown
Collaborator

@sizeak sizeak commented Mar 12, 2026

… notification tap events

Replace the deep link URL approach with a notificationTapped event listener that fires when the foreground service notification is tapped. This follows the same broadcast receiver pattern as the existing buttonClicked listener.

Pull request checklist

Please check if your PR fulfills the following requirements:

  • The changes have been tested successfully.
  • A changeset has been created (npm run changeset).
  • I have read and followed the pull request guidelines.

… notification tap events

Replace the deep link URL approach with a notificationTapped event listener
that fires when the foreground service notification is tapped. This follows
the same broadcast receiver pattern as the existing buttonClicked listener.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sizeak sizeak force-pushed the add-notification-tapped-listener branch from f2b1921 to aacf46d Compare March 12, 2026 14:42
sizeak and others added 28 commits March 12, 2026 16:31
Pass the notification ID through the launch intent so the current
plugin instance handles it — in load() for activity recreation and
handleOnNewIntent() when the activity is alive. This mirrors the
reliable delivery mechanism that deep links use and avoids events
being lost on a stale plugin instance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This method was superseded by the intent-based delivery in ae9058f.
Keeping it around would invite use of the broken static-instance path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nt instead of broadcast receiver

Replace the notification trampoline pattern (broadcast receiver launching
an activity) with a direct PendingIntent.getActivity, which is required
on Android 12+. The notification tap extra is now passed directly on the
launch intent and handled by the plugin via load() and handleOnNewIntent().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(posthog): support reverse proxy host config

Add apiHost and uiHost configuration for managed reverse proxy setups on web while keeping host as a deprecated alias so existing configs continue to work.

Update Android and iOS config handling to use apiHost consistently, warn when uiHost is ignored or host is deprecated, and refresh the README plus changeset.

* fix(posthog): remove native uiHost warnings

Document uiHost as a web-only option and stop logging warnings from the native plugin layers when it is provided.

This keeps the reverse proxy configuration intact while aligning the implementation and generated README with the reviewed API contract.

* docs(posthog): move reverse proxy note to advanced section

Move the reverse proxy guidance out of the generated config block into a dedicated Advanced section with a single Reverse Proxy subsection above the changelog.

* Update .changeset/green-mails-arrive.md

Co-authored-by: Robin Genz <mail@robingenz.dev>

---------

Co-authored-by: Robin Genz <mail@robingenz.dev>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot and others added 30 commits March 16, 2026 16:53
Co-authored-by: Robin Genz <mail@robingenz.dev>
…key, guard invalid IDs

- Switch PendingIntent from FLAG_MUTABLE to FLAG_IMMUTABLE since extras
  are set at creation time and don't need external modification
- Namespace the intent extra key to reduce spoofing surface
- Guard against invalid notification IDs (< 0) before emitting event

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…aking change

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants