Files
tauri-plugins-workspace/examples/api
46381516b7 feat(notification): report actions on desktop (#3671)
* feat(notification): report actions on desktop

A click on a notification (tap) or on one of the actions of its action
type now reaches the JavaScript onAction listeners on desktop, and the
new Rust Notification::on_action on every platform. On Linux and the
BSDs the click comes from the notification server's ActionInvoked
signal; on Windows and macOS from notify-rust's wait_for_response,
which needs notify-rust 4.18.

register_action_types, remove_active (Linux and the BSDs) and the
listener commands are implemented for desktop, so they no longer fail
with "command not found".

The api example sends a notification with two actions and shows the
action it hears.

Closes #2150, closes #1903.

* fix(notification): complete desktop action API

* cleanup

---------

Co-authored-by: Haex <hexxx@ok.de>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2026-10-08 14:14:19 -03:00
..
2023-05-05 09:41:17 -03:00
2026-10-07 20:28:15 +02:00
2023-05-05 09:41:17 -03:00
2026-10-07 20:28:15 +02:00
2026-10-07 20:28:15 +02:00
2023-05-05 09:41:17 -03:00
2023-05-05 09:41:17 -03:00

API example

This example demonstrates Tauri's API capabilities using the plugins from this repository. It's used as the main validation app, serving as the testbed of our development process. In the future, this app will be used on Tauri's integration tests.

App screenshot

Running the example

  • Install dependencies and build packages (Run inside of the repository root)
$ pnpm install
$ pnpm build
  • Run the app in development mode (Run inside of this folder examples/api/)
$ pnpm tauri dev
  • Build an run the release app (Run inside of this folder examples/api/)
$ pnpm tauri build
$ ./src-tauri/target/release/app