From e1bc03f7482e9370731901fcec8a45e24413a13e Mon Sep 17 00:00:00 2001 From: Pushpam <93931528+Decoder07@users.noreply.github.com> Date: Mon, 8 Jul 2024 12:45:16 +0530 Subject: [PATCH] Foreground microphone fix (#1797) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added microphone service type in foreground service * updated changelog * released sample app version 1.5.211 (511) 🍀 --- packages/hmssdk_flutter/example/ExampleAppChangelog.txt | 3 +++ packages/hmssdk_flutter/example/android/app/build.gradle | 4 ++-- packages/hmssdk_flutter/example/ios/Runner/Info.plist | 4 ++-- .../hmssdk_flutter/example/lib/foreground_task_handler.dart | 2 +- .../hmssdk_flutter/ios/Classes/SwiftHmssdkFlutterPlugin.swift | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/hmssdk_flutter/example/ExampleAppChangelog.txt b/packages/hmssdk_flutter/example/ExampleAppChangelog.txt index 0aeb2e6d4..ec149dcb3 100644 --- a/packages/hmssdk_flutter/example/ExampleAppChangelog.txt +++ b/packages/hmssdk_flutter/example/ExampleAppChangelog.txt @@ -6,6 +6,9 @@ https://app.devrev.ai/100ms/works/ISS-22834 - Noise cancellation layout API https://app.devrev.ai/100ms/works/ISS-22858 +- Sample application not able to access microphone from background in android 14. +https://app.devrev.ai/100ms/works/ISS-22907 + Room Kit: 1.1.5 Core SDK: 1.10.5 Android SDK: 2.9.62 diff --git a/packages/hmssdk_flutter/example/android/app/build.gradle b/packages/hmssdk_flutter/example/android/app/build.gradle index 6f227cc52..459cfe2be 100644 --- a/packages/hmssdk_flutter/example/android/app/build.gradle +++ b/packages/hmssdk_flutter/example/android/app/build.gradle @@ -36,8 +36,8 @@ android { applicationId "live.hms.flutter" minSdkVersion 21 targetSdkVersion 34 - versionCode 510 - versionName "1.5.210" + versionCode 511 + versionName "1.5.211" } signingConfigs { diff --git a/packages/hmssdk_flutter/example/ios/Runner/Info.plist b/packages/hmssdk_flutter/example/ios/Runner/Info.plist index b5eec5462..473c97cd5 100644 --- a/packages/hmssdk_flutter/example/ios/Runner/Info.plist +++ b/packages/hmssdk_flutter/example/ios/Runner/Info.plist @@ -21,7 +21,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.5.210 + 1.5.211 CFBundleSignature ???? CFBundleURLTypes @@ -48,7 +48,7 @@ CFBundleVersion - 510 + 511 ITSAppUsesNonExemptEncryption LSApplicationCategoryType diff --git a/packages/hmssdk_flutter/example/lib/foreground_task_handler.dart b/packages/hmssdk_flutter/example/lib/foreground_task_handler.dart index be95acb5b..92ef37fbc 100644 --- a/packages/hmssdk_flutter/example/lib/foreground_task_handler.dart +++ b/packages/hmssdk_flutter/example/lib/foreground_task_handler.dart @@ -52,7 +52,7 @@ Future initForegroundTask() async { if (isPermissionsGiven) { FlutterForegroundTask.init( androidNotificationOptions: AndroidNotificationOptions( - foregroundServiceType: AndroidForegroundServiceType.CAMERA, + foregroundServiceType: AndroidForegroundServiceType.MICROPHONE, channelId: '100ms_flutter_notification', channelName: '100ms Flutter Notification', channelDescription: diff --git a/packages/hmssdk_flutter/ios/Classes/SwiftHmssdkFlutterPlugin.swift b/packages/hmssdk_flutter/ios/Classes/SwiftHmssdkFlutterPlugin.swift index 640681cde..9d56521d1 100644 --- a/packages/hmssdk_flutter/ios/Classes/SwiftHmssdkFlutterPlugin.swift +++ b/packages/hmssdk_flutter/ios/Classes/SwiftHmssdkFlutterPlugin.swift @@ -924,7 +924,7 @@ public class SwiftHmssdkFlutterPlugin: NSObject, FlutterPlugin, HMSUpdateListene return } - hmsSDK?.preview(role: role) { tracks, error in + hmsSDK?.preview(role: role) { [self] tracks, error in if let error = error { print(#function, error)