diff --git a/.changes/android-on-new-intent.md b/.changes/android-on-new-intent.md new file mode 100644 index 000000000000..4164d23f7984 --- /dev/null +++ b/.changes/android-on-new-intent.md @@ -0,0 +1,5 @@ +--- +"tauri": 'patch:enhance' +--- + +Listen to `onNewIntent` and forward it to registered plugins. diff --git a/core/tauri/mobile/android-codegen/TauriActivity.kt b/core/tauri/mobile/android-codegen/TauriActivity.kt index b0ca3bba86a5..d610116e8dc9 100644 --- a/core/tauri/mobile/android-codegen/TauriActivity.kt +++ b/core/tauri/mobile/android-codegen/TauriActivity.kt @@ -7,6 +7,7 @@ package {{package}} import android.os.Bundle +import android.content.Intent import app.tauri.plugin.PluginManager abstract class TauriActivity : WryActivity() { @@ -18,4 +19,9 @@ abstract class TauriActivity : WryActivity() { pluginManager.onNewIntent(intent) } } + + override fun onNewIntent(intent: Intent) { + super.onNewIntent(intent) + pluginManager.onNewIntent(intent) + } }