Skip to content

Commit a5752db

Browse files
authored
feat(core): forward onNewIntent event to android plugins (#7436)
1 parent 3b98141 commit a5752db

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.changes/android-on-new-intent.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": 'patch:enhance'
3+
---
4+
5+
Listen to `onNewIntent` and forward it to registered plugins.

core/tauri/mobile/android-codegen/TauriActivity.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
package {{package}}
88

99
import android.os.Bundle
10+
import android.content.Intent
1011
import app.tauri.plugin.PluginManager
1112

1213
abstract class TauriActivity : WryActivity() {
@@ -18,4 +19,9 @@ abstract class TauriActivity : WryActivity() {
1819
pluginManager.onNewIntent(intent)
1920
}
2021
}
22+
23+
override fun onNewIntent(intent: Intent) {
24+
super.onNewIntent(intent)
25+
pluginManager.onNewIntent(intent)
26+
}
2127
}

0 commit comments

Comments
 (0)