diff --git a/CHANGELOG.md b/CHANGELOG.md index 5108ae12..c7db1649 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 5.4.0+2 + +- Fixed Android `ChromeCustomTabsActivity` not responding to the `ActionBroadcastReceiver` + ## 5.4.0+1 - Merged "[Android] Explicitly export for the receiver defined in AndroidManifest" [#1147](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1147) (thanks to [AlexV525](https://github.com/AlexV525)) diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsActivity.java b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsActivity.java index a7712e55..534c7a8f 100755 --- a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsActivity.java +++ b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsActivity.java @@ -5,6 +5,7 @@ import android.app.PendingIntent; import android.content.Intent; import android.graphics.Color; import android.net.Uri; +import android.os.Build; import android.os.Bundle; import androidx.browser.customtabs.CustomTabColorSchemeParams; @@ -217,9 +218,9 @@ public class ChromeCustomTabsActivity extends Activity implements MethodChannel. extras.putString(ActionBroadcastReceiver.CHROME_MANAGER_ID, manager.id); actionIntent.putExtras(extras); - if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) { + if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { return PendingIntent.getBroadcast( - this, actionSourceId, actionIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE); + this, actionSourceId, actionIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE); } else { return PendingIntent.getBroadcast( this, actionSourceId, actionIntent, PendingIntent.FLAG_UPDATE_CURRENT); diff --git a/pubspec.yaml b/pubspec.yaml index 27165858..3191400f 100755 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_inappwebview description: A Flutter plugin that allows you to add an inline webview, to use an headless webview, and to open an in-app browser window. -version: 5.4.0+1 +version: 5.4.0+2 homepage: https://github.com/pichillilorenzo/flutter_inappwebview environment: