Skip to content

Commit

Permalink
feat(core): forward onNewIntent event to android plugins (#7436)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianLars authored Jul 17, 2023
1 parent 3b98141 commit a5752db
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/android-on-new-intent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": 'patch:enhance'
---

Listen to `onNewIntent` and forward it to registered plugins.
6 changes: 6 additions & 0 deletions core/tauri/mobile/android-codegen/TauriActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package {{package}}

import android.os.Bundle
import android.content.Intent
import app.tauri.plugin.PluginManager

abstract class TauriActivity : WryActivity() {
Expand All @@ -18,4 +19,9 @@ abstract class TauriActivity : WryActivity() {
pluginManager.onNewIntent(intent)
}
}

override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
pluginManager.onNewIntent(intent)
}
}

0 comments on commit a5752db

Please sign in to comment.