From 16cb8775c1b8d77c300f8ab6eac90096ab024b7f Mon Sep 17 00:00:00 2001 From: Sergei Semko <28645140+justSmK@users.noreply.github.com> Date: Tue, 17 Nov 2026 18:59:53 +0300 Subject: [PATCH] MOBILE-408: Pass App Link intents to the SDK from onNewIntent FlutterActivity hands a new intent only to plugins and does not call setIntent, and the plugin forwarded only push intents. A warm App Link open reached Mindbox as a direct visit without the URL, and an open into the app on screen sent no visit at all. --- .../mindbox/mindbox_android/MindboxAndroidPlugin.kt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mindbox_android/android/src/main/kotlin/cloud/mindbox/mindbox_android/MindboxAndroidPlugin.kt b/mindbox_android/android/src/main/kotlin/cloud/mindbox/mindbox_android/MindboxAndroidPlugin.kt index 868ec84..fb1cb12 100644 --- a/mindbox_android/android/src/main/kotlin/cloud/mindbox/mindbox_android/MindboxAndroidPlugin.kt +++ b/mindbox_android/android/src/main/kotlin/cloud/mindbox/mindbox_android/MindboxAndroidPlugin.kt @@ -286,7 +286,7 @@ class MindboxAndroidPlugin : FlutterPlugin, MethodCallHandler, ActivityAware, Ne private fun handleIntent(intent: Intent) { intent.let { - val uniqueKey = intent.getStringExtra("uniq_push_key") + val uniqueKey = intent.getStringExtra(PUSH_UNIQUE_KEY_EXTRA) if (uniqueKey != null) { Mindbox.onPushClicked(context.applicationContext, it) Mindbox.onNewIntent(intent) @@ -300,7 +300,13 @@ class MindboxAndroidPlugin : FlutterPlugin, MethodCallHandler, ActivityAware, Ne } override fun onNewIntent(intent: Intent): Boolean { - handleIntent(intent) + if (intent.getStringExtra(PUSH_UNIQUE_KEY_EXTRA) == null) { + Mindbox.onNewIntent(intent) + } else { + handleIntent(intent) + } return false } -} \ No newline at end of file +} + +private const val PUSH_UNIQUE_KEY_EXTRA = "uniq_push_key"