From 20f3ed7156a053f88f4c057905ef04f8cd2d5525 Mon Sep 17 00:00:00 2001 From: Wilfried M Majaliwa Date: Sun, 18 Sep 2022 00:38:46 +0300 Subject: [PATCH 1/2] Update build.gradle Upgraded exo player version to a version that includes the pending intent fix --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index aa57ba2..262876e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -5,7 +5,7 @@ buildscript { // version numbers ext.kotlin_version = '1.3.50' - ext.exo_player_version = '2.13.1' + ext.exo_player_version = '2.14.2' repositories { google() From e9e93ead1d19bd0105510aa8150196520990ac28 Mon Sep 17 00:00:00 2001 From: Wilfried M Majaliwa Date: Sun, 18 Sep 2022 00:42:52 +0300 Subject: [PATCH 2/2] Update StreamingCore.kt Added the PendingIntent.FLAG_IMMUTABLE argument in the createCurrentContentIntent function. --- .../flutter/flutter_radio_player/core/StreamingCore.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/kotlin/me/sithiramunasinghe/flutter/flutter_radio_player/core/StreamingCore.kt b/android/src/main/kotlin/me/sithiramunasinghe/flutter/flutter_radio_player/core/StreamingCore.kt index f3acdda..d7893bc 100644 --- a/android/src/main/kotlin/me/sithiramunasinghe/flutter/flutter_radio_player/core/StreamingCore.kt +++ b/android/src/main/kotlin/me/sithiramunasinghe/flutter/flutter_radio_player/core/StreamingCore.kt @@ -260,7 +260,7 @@ class StreamingCore : Service(), AudioManager.OnAudioFocusChangeListener { @Nullable override fun createCurrentContentIntent(player: Player): PendingIntent { var intent = Intent(this@StreamingCore, activity!!.javaClass) - var contentPendingIntent = PendingIntent.getActivity(this@StreamingCore, 0, intent, 0); + var contentPendingIntent = PendingIntent.getActivity(this@StreamingCore, 0, intent, PendingIntent.FLAG_IMMUTABLE); return contentPendingIntent; }