feat(core): forward onNewIntent event to android plugins (#7436)

This commit is contained in:
Fabian-Lars 2023-07-17 15:20:16 +02:00 committed by GitHub
parent 3b98141aa2
commit a5752db985
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
"tauri": 'patch:enhance'
---
Listen to `onNewIntent` and forward it to registered plugins.

View File

@ -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)
}
}