// registerListener / removeListener are the mobile plugin runtime's own // commands, the ones `addPluginListener` invokes to hear the `action` // event. They are commands like any other to the ACL: without them here the // listener was refused ("media-session.registerListener not allowed") and // the card's buttons went nowhere. const COMMANDS: &[&str] = &["update", "clear", "registerListener", "removeListener"]; fn main() { // Registers the command permissions (permissions/autogenerated) and, on // Android, hands the Gradle module under android/ to tauri-build, which // includes it in the app project (tauri.settings.gradle). tauri_plugin::Builder::new(COMMANDS) .android_path("android") .build(); }