From 1f196e80b00b20747bcbe2385caeefa99090818b Mon Sep 17 00:00:00 2001 From: Riajul Islam Date: Sat, 9 Sep 2023 22:30:42 +0600 Subject: [PATCH] fix(android): [Bug]: getAcceptPendingIntent is not working when app is in foreground. #362 --- .../com/hiennv/flutter_callkit_incoming/TransparentActivity.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/android/src/main/kotlin/com/hiennv/flutter_callkit_incoming/TransparentActivity.kt b/android/src/main/kotlin/com/hiennv/flutter_callkit_incoming/TransparentActivity.kt index 2a4186cf..44bdb363 100644 --- a/android/src/main/kotlin/com/hiennv/flutter_callkit_incoming/TransparentActivity.kt +++ b/android/src/main/kotlin/com/hiennv/flutter_callkit_incoming/TransparentActivity.kt @@ -14,6 +14,9 @@ class TransparentActivity : Activity() { intent.putExtra("data", data) intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION) intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY) + intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT) + intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) + intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP) return intent } }