Skip to content
Discussion options

You must be logged in to vote

Process created gets quickly terminated because adb server and the command i am using to start it are different processes, but after searching for like what felt like an eternity i found how to attach events to the default function.

Here is the solution of running functions upon exit:
tauri::Builder::default().on_window_event(|event| match event.event() { tauri::WindowEvent::CloseRequested { api, .. } => { // CODE HERE } _ => {} });

you can merge this part with your invoke_handler, setup, run and expect in tauri::Builder::default() for full functionality. Also as far as i tested it still works when user kills the process via terminal etc.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mdev896
Comment options

Answer selected by mdev896
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants