From 4eb0782328ecf347812cbe58993c651665c6faa1 Mon Sep 17 00:00:00 2001 From: Decoder07 Date: Tue, 9 Apr 2024 09:22:14 +0530 Subject: [PATCH 1/3] Added foreground task --- .../preview_bottom_button_section.dart | 2 +- .../android/app/src/main/AndroidManifest.xml | 6 + .../plugins/GeneratedPluginRegistrant.java | 5 + .../hmssdk_flutter/example/ios/Podfile.lock | 92 ++++---- .../ios/Runner.xcodeproj/project.pbxproj | 18 -- .../example/ios/Runner/AppDelegate.swift | 10 + .../ios/Runner/Runner-Bridging-Header.h | 1 + .../example/lib/foreground_task_handler.dart | 82 +++++++ packages/hmssdk_flutter/example/lib/main.dart | 41 ++-- .../example/lib/qr_code_screen.dart | 4 + packages/hmssdk_flutter/example/pubspec.lock | 212 +++++++----------- packages/hmssdk_flutter/example/pubspec.yaml | 3 +- 12 files changed, 273 insertions(+), 203 deletions(-) create mode 100644 packages/hmssdk_flutter/example/lib/foreground_task_handler.dart diff --git a/packages/hms_room_kit/lib/src/preview/preview_bottom_button_section.dart b/packages/hms_room_kit/lib/src/preview/preview_bottom_button_section.dart index 348720f37..4dae03d6b 100644 --- a/packages/hms_room_kit/lib/src/preview/preview_bottom_button_section.dart +++ b/packages/hms_room_kit/lib/src/preview/preview_bottom_button_section.dart @@ -110,7 +110,7 @@ class PreviewBottomButtonSection extends StatelessWidget { onTap: () { previewStore.toggleNoiseCancellation(); }, - isActive: previewStore.isNoiseCancellationEnabled, + isActive: !previewStore.isNoiseCancellationEnabled, child: SvgPicture.asset( 'packages/hms_room_kit/lib/src/assets/icons/music_wave.svg', colorFilter: ColorFilter.mode( diff --git a/packages/hmssdk_flutter/example/android/app/src/main/AndroidManifest.xml b/packages/hmssdk_flutter/example/android/app/src/main/AndroidManifest.xml index a018755ed..b62c8b15d 100644 --- a/packages/hmssdk_flutter/example/android/app/src/main/AndroidManifest.xml +++ b/packages/hmssdk_flutter/example/android/app/src/main/AndroidManifest.xml @@ -73,6 +73,12 @@ + + 10.22.0) - - Firebase/DynamicLinks (10.22.0): + - FirebaseCrashlytics (~> 10.18.0) + - Firebase/DynamicLinks (10.18.0): - Firebase/CoreOnly - - FirebaseDynamicLinks (~> 10.22.0) - - Firebase/Performance (10.22.0): + - FirebaseDynamicLinks (~> 10.18.0) + - Firebase/Performance (10.18.0): - Firebase/CoreOnly - - FirebasePerformance (~> 10.22.0) - - firebase_core (2.27.2): - - Firebase/CoreOnly (= 10.22.0) + - FirebasePerformance (~> 10.18.0) + - firebase_core (2.24.2): + - Firebase/CoreOnly (= 10.18.0) - Flutter - - firebase_crashlytics (3.4.20): - - Firebase/Crashlytics (= 10.22.0) + - firebase_crashlytics (3.4.9): + - Firebase/Crashlytics (= 10.18.0) - firebase_core - Flutter - - firebase_dynamic_links (5.4.19): - - Firebase/DynamicLinks (= 10.22.0) + - firebase_dynamic_links (5.4.8): + - Firebase/DynamicLinks (= 10.18.0) - firebase_core - Flutter - - firebase_performance (0.9.3-19): - - Firebase/Performance (= 10.22.0) + - firebase_performance (0.9.3-8): + - Firebase/Performance (= 10.18.0) - firebase_core - Flutter - FirebaseABTesting (10.23.0): - FirebaseCore (~> 10.0) - - FirebaseCore (10.22.0): + - FirebaseCore (10.18.0): - FirebaseCoreInternal (~> 10.0) - GoogleUtilities/Environment (~> 7.12) - GoogleUtilities/Logger (~> 7.12) @@ -37,22 +37,22 @@ PODS: - FirebaseCore (~> 10.0) - FirebaseCoreInternal (10.23.0): - "GoogleUtilities/NSData+zlib (~> 7.8)" - - FirebaseCrashlytics (10.22.0): + - FirebaseCrashlytics (10.18.0): - FirebaseCore (~> 10.5) - FirebaseInstallations (~> 10.0) - FirebaseSessions (~> 10.5) - GoogleDataTransport (~> 9.2) - GoogleUtilities/Environment (~> 7.8) - - nanopb (< 2.30911.0, >= 2.30908.0) + - nanopb (< 2.30910.0, >= 2.30908.0) - PromisesObjC (~> 2.1) - - FirebaseDynamicLinks (10.22.0): + - FirebaseDynamicLinks (10.18.0): - FirebaseCore (~> 10.0) - FirebaseInstallations (10.23.0): - FirebaseCore (~> 10.0) - GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/UserDefaults (~> 7.8) - PromisesObjC (~> 2.1) - - FirebasePerformance (10.22.0): + - FirebasePerformance (10.18.0): - FirebaseCore (~> 10.5) - FirebaseInstallations (~> 10.0) - FirebaseRemoteConfig (~> 10.0) @@ -61,7 +61,7 @@ PODS: - GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/ISASwizzler (~> 7.8) - GoogleUtilities/MethodSwizzler (~> 7.8) - - nanopb (< 2.30911.0, >= 2.30908.0) + - nanopb (< 2.30910.0, >= 2.30908.0) - FirebaseRemoteConfig (10.23.0): - FirebaseABTesting (~> 10.0) - FirebaseCore (~> 10.0) @@ -81,6 +81,8 @@ PODS: - PromisesSwift (~> 2.1) - FirebaseSharedSwift (10.23.0) - Flutter (1.0.0) + - flutter_foreground_task (0.0.1): + - Flutter - GoogleDataTransport (9.4.1): - GoogleUtilities/Environment (~> 7.7) - nanopb (< 2.30911.0, >= 2.30908.0) @@ -158,17 +160,17 @@ PODS: - mobile_scanner (3.5.6): - Flutter - GoogleMLKit/BarcodeScanning (~> 4.0.0) - - nanopb (2.30910.0): - - nanopb/decode (= 2.30910.0) - - nanopb/encode (= 2.30910.0) - - nanopb/decode (2.30910.0) - - nanopb/encode (2.30910.0) + - nanopb (2.30909.1): + - nanopb/decode (= 2.30909.1) + - nanopb/encode (= 2.30909.1) + - nanopb/decode (2.30909.1) + - nanopb/encode (2.30909.1) - package_info_plus (0.4.5): - Flutter - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - - permission_handler_apple (9.3.0): + - permission_handler_apple (9.1.1): - Flutter - PromisesObjC (2.4.0) - PromisesSwift (2.4.0): @@ -188,6 +190,7 @@ DEPENDENCIES: - firebase_dynamic_links (from `.symlinks/plugins/firebase_dynamic_links/ios`) - firebase_performance (from `.symlinks/plugins/firebase_performance/ios`) - Flutter (from `Flutter`) + - flutter_foreground_task (from `.symlinks/plugins/flutter_foreground_task/ios`) - HMSBroadcastExtensionSDK - hmssdk_flutter (from `.symlinks/plugins/hmssdk_flutter/ios`) - mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) @@ -246,6 +249,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/firebase_performance/ios" Flutter: :path: Flutter + flutter_foreground_task: + :path: ".symlinks/plugins/flutter_foreground_task/ios" hmssdk_flutter: :path: ".symlinks/plugins/hmssdk_flutter/ios" mobile_scanner: @@ -265,24 +270,25 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: app_links: e70ca16b4b0f88253b3b3660200d4a10b4ea9795 - Firebase: 797fd7297b7e1be954432743a0b3f90038e45a71 - firebase_core: cc49b6648d6dd7570d9273a616cb1205260db91e - firebase_crashlytics: a5050259f9e6989a44c131dbf14887a434b4395a - firebase_dynamic_links: 95b935881ca3f9292e0c997481f492d4fff4cf6d - firebase_performance: bbc800cea31e30aa9db4bc256309c0857ed4a8a3 + Firebase: 414ad272f8d02dfbf12662a9d43f4bba9bec2a06 + firebase_core: 0af4a2b24f62071f9bf283691c0ee41556dcb3f5 + firebase_crashlytics: 4b91b8ad60ee7c168fe88979f84c9573a729de7a + firebase_dynamic_links: b626a11f5eb02033981ae377377c3f297eb4c1b0 + firebase_performance: 2183122a3c7a650c80d8c164e9e28f13c4c62fc7 FirebaseABTesting: aec61ed9a34d85a95e2013a3fdf051426a2419df - FirebaseCore: 0326ec9b05fbed8f8716cddbf0e36894a13837f7 + FirebaseCore: 2322423314d92f946219c8791674d2f3345b598f FirebaseCoreExtension: cb88851781a24e031d1b58e0bd01eb1f46b044b5 FirebaseCoreInternal: 6a292e6f0bece1243a737e81556e56e5e19282e3 - FirebaseCrashlytics: e568d68ce89117c80cddb04073ab9018725fbb8c - FirebaseDynamicLinks: 25ed0e87b0afb4769cc0ec8e942a532219abac28 + FirebaseCrashlytics: 86d5bce01f42fa1db265f87ff1d591f04db610ec + FirebaseDynamicLinks: c37307441c53838d66a9650dabca9e0459502527 FirebaseInstallations: 42d6ead4605d6eafb3b6683674e80e18eb6f2c35 - FirebasePerformance: 095debad1fc8d7d73148a835fcaec9e528946166 + FirebasePerformance: c406a9198d8aabfbac281b42855f5122fc1bcf69 FirebaseRemoteConfig: 70ebe9542cf5242d762d1c0b4d53bfc472e0a4ce FirebaseRemoteConfigInterop: cbc87ffa4932719a7911a08e94510f18f026f5a7 FirebaseSessions: f06853e30f99fe42aa511014d7ee6c8c319f08a3 FirebaseSharedSwift: c92645b392db3c41a83a0aa967de16f8bad25568 - Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + flutter_foreground_task: 21ef182ab0a29a3005cc72cd70e5f45cb7f7f817 GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a GoogleMLKit: 2bd0dc6253c4d4f227aad460f69215a504b2980e GoogleToolboxForMac: 8bef7c7c5cf7291c687cf5354f39f9db6399ad34 @@ -301,16 +307,16 @@ SPEC CHECKSUMS: MLKitCommon: c1b791c3e667091918d91bda4bba69a91011e390 MLKitVision: 8baa5f46ee3352614169b85250574fde38c36f49 mobile_scanner: 38dcd8a49d7d485f632b7de65e4900010187aef2 - nanopb: 438bc412db1928dac798aa6fd75726007be04262 - package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c + nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5 + package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85 path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c - permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2 + permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851 share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5 shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695 - url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586 + url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812 PODFILE CHECKSUM: 9fb9f6e431a2c6c79942252e94b241ac7972ac90 -COCOAPODS: 1.15.2 +COCOAPODS: 1.14.3 diff --git a/packages/hmssdk_flutter/example/ios/Runner.xcodeproj/project.pbxproj b/packages/hmssdk_flutter/example/ios/Runner.xcodeproj/project.pbxproj index db4c1d5ae..dd0e12912 100644 --- a/packages/hmssdk_flutter/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/hmssdk_flutter/example/ios/Runner.xcodeproj/project.pbxproj @@ -208,7 +208,6 @@ 3B06AD1E1E4923F5004D2608 /* Thin Binary */, CC19BBB77EA3E7F699588CF7 /* [firebase_crashlytics] Crashlytics Upload Symbols */, 6F3F5B27EBB90D146ABDD315 /* [CP] Embed Pods Frameworks */, - AD29C87BEAC77625CFBF3882 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -391,23 +390,6 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n"; }; - AD29C87BEAC77625CFBF3882 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; CC19BBB77EA3E7F699588CF7 /* [firebase_crashlytics] Crashlytics Upload Symbols */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/packages/hmssdk_flutter/example/ios/Runner/AppDelegate.swift b/packages/hmssdk_flutter/example/ios/Runner/AppDelegate.swift index 70693e4a8..0e33de35f 100644 --- a/packages/hmssdk_flutter/example/ios/Runner/AppDelegate.swift +++ b/packages/hmssdk_flutter/example/ios/Runner/AppDelegate.swift @@ -8,6 +8,16 @@ import Flutter didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GeneratedPluginRegistrant.register(with: self) + + SwiftFlutterForegroundTaskPlugin.setPluginRegistrantCallback(registerPlugins) + if #available(iOS 10.0, *) { + UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate + } + return super.application(application, didFinishLaunchingWithOptions: launchOptions) } } + +func registerPlugins(registry: FlutterPluginRegistry) { + GeneratedPluginRegistrant.register(with: registry) +} diff --git a/packages/hmssdk_flutter/example/ios/Runner/Runner-Bridging-Header.h b/packages/hmssdk_flutter/example/ios/Runner/Runner-Bridging-Header.h index 308a2a560..10e9f0256 100644 --- a/packages/hmssdk_flutter/example/ios/Runner/Runner-Bridging-Header.h +++ b/packages/hmssdk_flutter/example/ios/Runner/Runner-Bridging-Header.h @@ -1 +1,2 @@ #import "GeneratedPluginRegistrant.h" +#import diff --git a/packages/hmssdk_flutter/example/lib/foreground_task_handler.dart b/packages/hmssdk_flutter/example/lib/foreground_task_handler.dart new file mode 100644 index 000000000..1459ffc0e --- /dev/null +++ b/packages/hmssdk_flutter/example/lib/foreground_task_handler.dart @@ -0,0 +1,82 @@ +import 'dart:isolate'; + +import 'package:flutter_foreground_task/flutter_foreground_task.dart'; +import 'package:hmssdk_flutter_example/main.dart'; + +///[ForegroundTaskHandler] is a class that extends [TaskHandler] +///This class is used to handle the foreground task +class ForegroundTaskHandler extends TaskHandler { + SendPort? _sendPort; + + // Called when the task is started. + @override + void onStart(DateTime timestamp, SendPort? sendPort) async { + _sendPort = sendPort; + + // You can use the getData function to get the stored data. + final customData = + await FlutterForegroundTask.getData(key: 'customData'); + print('customData: $customData'); + } + + // Called every [interval] milliseconds in [ForegroundTaskOptions]. + @override + void onRepeatEvent(DateTime timestamp, SendPort? sendPort) async { + // Send data to the main isolate. + sendPort?.send(timestamp); + } + + // Called when the notification button on the Android platform is pressed. + @override + void onDestroy(DateTime timestamp, SendPort? sendPort) async {} + + // Called when the notification button on the Android platform is pressed. + @override + void onNotificationButtonPressed(String id) { + print('onNotificationButtonPressed >> $id'); + } + + // Called when the notification itself on the Android platform is pressed. + // + // "android.permission.SYSTEM_ALERT_WINDOW" permission must be granted for + // this function to be called. + @override + void onNotificationPressed() { + // Note that the app will only route to "/resume-route" when it is exited so + // it will usually be necessary to send a message through the send port to + // signal it to restore state when the app is already started. + FlutterForegroundTask.launchApp("/resume-route"); + _sendPort?.send('onNotificationPressed'); + } +} + +void initForegroundTask() { + FlutterForegroundTask.init( + androidNotificationOptions: AndroidNotificationOptions( + channelId: '100ms_flutter_notification', + channelName: '100ms Flutter Notification', + channelDescription: + 'This notification appears when the foreground service is running.', + channelImportance: NotificationChannelImportance.LOW, + priority: NotificationPriority.LOW, + iconData: NotificationIconData( + resType: ResourceType.mipmap, + resPrefix: ResourcePrefix.ic, + name: "launcher")), + iosNotificationOptions: + const IOSNotificationOptions(showNotification: false), + foregroundTaskOptions: const ForegroundTaskOptions(), + ); + + ///[startService] starts the foreground task + FlutterForegroundTask.startService( + notificationTitle: 'Foreground Service is running', + notificationText: 'Tap to return to the app', + callback: startCallback); +} + +///[stopForegroundTask] stops the foreground task +///Called in onLeave callback +void stopForegroundTask() { + FlutterForegroundTask.stopService(); +} diff --git a/packages/hmssdk_flutter/example/lib/main.dart b/packages/hmssdk_flutter/example/lib/main.dart index a90ddd1e3..e83e67305 100644 --- a/packages/hmssdk_flutter/example/lib/main.dart +++ b/packages/hmssdk_flutter/example/lib/main.dart @@ -10,9 +10,11 @@ import 'package:firebase_dynamic_links/firebase_dynamic_links.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:flutter_foreground_task/flutter_foreground_task.dart'; import 'package:flutter_svg/svg.dart'; import 'package:hms_room_kit/hms_room_kit.dart'; import 'package:hmssdk_flutter_example/app_settings_bottom_sheet.dart'; +import 'package:hmssdk_flutter_example/foreground_task_handler.dart'; import 'package:hmssdk_flutter_example/qr_code_screen.dart'; import 'package:hmssdk_flutter_example/room_service.dart'; import 'package:lottie/lottie.dart'; @@ -50,6 +52,13 @@ void main() async { runApp(HMSExampleApp(initialLink: initialLink?.link)); } +///This function sets up the foreground service interaction +@pragma('vm:entry-point') +void startCallback() { + // The setTaskHandler function must be called to handle the task in the background. + FlutterForegroundTask.setTaskHandler(ForegroundTaskHandler()); +} + class HMSExampleApp extends StatefulWidget { final Uri? initialLink; HMSExampleApp({Key? key, this.initialLink}) : super(key: key); @@ -320,23 +329,27 @@ class _HomePageState extends State { Utilities.saveStringData( key: "meetingLink", value: meetingLinkController.text.trim()); FocusManager.instance.primaryFocus?.unfocus(); + initForegroundTask(); Navigator.push( context, MaterialPageRoute( - builder: (_) => HMSPrebuilt( - roomCode: Constant.roomCode, - options: HMSPrebuiltOptions( - userName: AppDebugConfig.nameChangeOnPreview - ? null - : "Flutter User", - endPoints: endPoints, - userId: - uuidString, // pass your custom unique user identifier here - iOSScreenshareConfig: HMSIOSScreenshareConfig( - appGroup: "group.flutterhms", - preferredExtension: - "live.100ms.flutter.FlutterBroadcastUploadExtension"), - enableNoiseCancellation: true)))); + builder: (_) => WithForegroundTask( + child: HMSPrebuilt( + roomCode: Constant.roomCode, + onLeave: stopForegroundTask, + options: HMSPrebuiltOptions( + userName: AppDebugConfig.nameChangeOnPreview + ? null + : "Flutter User", + endPoints: endPoints, + userId: + uuidString, // pass your custom unique user identifier here + iOSScreenshareConfig: HMSIOSScreenshareConfig( + appGroup: "group.flutterhms", + preferredExtension: + "live.100ms.flutter.FlutterBroadcastUploadExtension"), + enableNoiseCancellation: true)), + ))); } @override diff --git a/packages/hmssdk_flutter/example/lib/qr_code_screen.dart b/packages/hmssdk_flutter/example/lib/qr_code_screen.dart index 00c251d2e..1a236847c 100644 --- a/packages/hmssdk_flutter/example/lib/qr_code_screen.dart +++ b/packages/hmssdk_flutter/example/lib/qr_code_screen.dart @@ -4,9 +4,11 @@ import 'dart:developer'; ///Package imports import 'package:flutter/material.dart'; import 'package:hms_room_kit/hms_room_kit.dart'; +import 'package:hmssdk_flutter_example/foreground_task_handler.dart'; import 'package:hmssdk_flutter_example/room_service.dart'; import 'package:mobile_scanner/mobile_scanner.dart'; +///[QRCodeScreen] is a StatefulWidget that is used to handle the scan the QR code functionality class QRCodeScreen extends StatefulWidget { final String uuidString; QRCodeScreen({Key? key, required this.uuidString}) : super(key: key); @@ -72,9 +74,11 @@ class _QRCodeScreenState extends State { Constant.roomCode = rawValue.trim(); } Utilities.saveStringData(key: "meetingLink", value: rawValue.trim()); + initForegroundTask(); Navigator.of(context).pushReplacement(MaterialPageRoute( builder: (_) => HMSPrebuilt( roomCode: Constant.roomCode, + onLeave: stopForegroundTask, options: HMSPrebuiltOptions( userName: AppDebugConfig.nameChangeOnPreview ? null diff --git a/packages/hmssdk_flutter/example/pubspec.lock b/packages/hmssdk_flutter/example/pubspec.lock index f0b8c72af..6cd30ef53 100644 --- a/packages/hmssdk_flutter/example/pubspec.lock +++ b/packages/hmssdk_flutter/example/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _flutterfire_internals - sha256: "53d06f578b8e988f60324f46fcd6ab919ccdc2dc8cbf0cd4161829b1dba7a62b" + sha256: f5628cd9c92ed11083f425fd1f8f1bc60ecdda458c81d73b143aeda036c35fe7 url: "https://pub.dev" source: hosted - version: "1.3.27" + version: "1.3.16" app_links: dependency: "direct main" description: name: app_links - sha256: "42dc15aecf2618ace4ffb74a2e58a50e45cd1b9f2c17c8f0cafe4c297f08c815" + sha256: "3ced568a5d9e309e99af71285666f1f3117bddd0bd5b3317979dccc1a40cada4" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "3.5.1" archive: dependency: transitive description: @@ -77,10 +77,10 @@ packages: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.17.2" convert: dependency: transitive description: @@ -93,10 +93,10 @@ packages: dependency: transitive description: name: cross_file - sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32" + sha256: "2f9d2cbccb76127ba28528cb3ae2c2326a122446a83de5a056aaa3880d3882c5" url: "https://pub.dev" source: hosted - version: "0.3.4+1" + version: "0.3.3+7" crypto: dependency: transitive description: @@ -141,10 +141,10 @@ packages: dependency: transitive description: name: ffi - sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.0" file: dependency: transitive description: @@ -157,10 +157,10 @@ packages: dependency: "direct main" description: name: firebase_core - sha256: "4e8728edb3053ffcc194315cb0c10f4676947db793581409e36040065918c94f" + sha256: "96607c0e829a581c2a483c658f04e8b159964c3bae2730f73297070bc85d40bb" url: "https://pub.dev" source: hosted - version: "2.27.2" + version: "2.24.2" firebase_core_platform_interface: dependency: transitive description: @@ -173,79 +173,79 @@ packages: dependency: transitive description: name: firebase_core_web - sha256: "6afef1b46818eabdc6058df1148307f80e5653c0eaf26beeec693c89154752d4" + sha256: d585bdf3c656c3f7821ba1bd44da5f13365d22fcecaf5eb75c4295246aaa83c0 url: "https://pub.dev" source: hosted - version: "2.13.0" + version: "2.10.0" firebase_crashlytics: dependency: "direct main" description: name: firebase_crashlytics - sha256: "7ba408d144ebd2d6426fe9830536db7c94809521956e695f21c6a245fea10a33" + sha256: "5125b7f3fcef2bfdd7e071afe7edcefd9597968003e44e073456c773d91694ee" url: "https://pub.dev" source: hosted - version: "3.4.20" + version: "3.4.9" firebase_crashlytics_platform_interface: dependency: transitive description: name: firebase_crashlytics_platform_interface - sha256: "206dde24e1e69250df19d8a3120566581066a862a75ce2ed6a09c822d9ef9228" + sha256: "359197344def001589c84f8d1d57c05f6e2e773f559205610ce58c25e2045a57" url: "https://pub.dev" source: hosted - version: "3.6.27" + version: "3.6.16" firebase_dynamic_links: dependency: "direct main" description: name: firebase_dynamic_links - sha256: "1a77dbb273fed953f4cf2ecb0092857c5804d28d2e7d9da2324d5370060ccac3" + sha256: b0522806658428803aeb5e7be0b22a29acb8f8697a8909c36965feaeb1f655bd url: "https://pub.dev" source: hosted - version: "5.4.19" + version: "5.4.8" firebase_dynamic_links_platform_interface: dependency: transitive description: name: firebase_dynamic_links_platform_interface - sha256: "6f8430899bf9316828927fcd47890b4d3d6af5373f3af46a8ce4f5c18eeaf869" + sha256: "8b90384d8f85c7211f2b5e2d9d5ae98bd08091f116ef2bd1a74b33574efacc61" url: "https://pub.dev" source: hosted - version: "0.2.6+27" + version: "0.2.6+16" firebase_performance: dependency: "direct main" description: name: firebase_performance - sha256: "04eab2e7d4ba2132b10b62ffb0242308da6492c97e062f5c28b98eb8d8b44ff7" + sha256: "9df1c993365814ea6e75be9da4e2545afe2c5d4b27fce02af2e7050b04eb3396" url: "https://pub.dev" source: hosted - version: "0.9.3+19" + version: "0.9.3+8" firebase_performance_platform_interface: dependency: transitive description: name: firebase_performance_platform_interface - sha256: e35bd7500ba3e6bea48ca77c3c192c03314e494fd6cfbcbfd6a2663463848e9d + sha256: a2be699e610f684260984cc327cffb43c72a09f75c1f27084c247adef10faa57 url: "https://pub.dev" source: hosted - version: "0.1.4+27" + version: "0.1.4+16" firebase_performance_web: dependency: transitive description: name: firebase_performance_web - sha256: "852b2a06df211d9da4561d46d33b234b110a6a152eb70b29c4408c8b8eec9cc2" - url: "https://pub.dev" - source: hosted - version: "0.1.5" - fixnum: - dependency: transitive - description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: "73fa046809a3292c04836d362f568146c344951d641d5582dab57c843955f225" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "0.1.4+16" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" + flutter_foreground_task: + dependency: "direct main" + description: + name: flutter_foreground_task + sha256: "9bcfcb43bba4a5446a056e723d21118ff6e184926b5557365c32c13caca157c2" + url: "https://pub.dev" + source: hosted + version: "6.1.3" flutter_linkify: dependency: transitive description: @@ -314,10 +314,10 @@ packages: dependency: transitive description: name: http - sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" + sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.1.0" http_parser: dependency: transitive description: @@ -342,30 +342,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.7" - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" - url: "https://pub.dev" - source: hosted - version: "10.0.0" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 - url: "https://pub.dev" - source: hosted - version: "2.0.1" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 - url: "https://pub.dev" - source: hosted - version: "2.0.1" linkify: dependency: transitive description: @@ -386,34 +362,34 @@ packages: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.5.0" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.9.1" mime: dependency: transitive description: name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.4" mobile_scanner: dependency: "direct main" description: @@ -434,10 +410,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: cb44f49b6e690fa766f023d5b22cac6b9affe741dd792b6ac7ad4fabe0d7b097 + sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017" url: "https://pub.dev" source: hosted - version: "6.0.0" + version: "4.2.0" package_info_plus_platform_interface: dependency: transitive description: @@ -450,10 +426,10 @@ packages: dependency: transitive description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.8.3" path_parsing: dependency: transitive description: @@ -514,58 +490,50 @@ packages: dependency: transitive description: name: permission_handler - sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb" + sha256: "284a66179cabdf942f838543e10413246f06424d960c92ba95c84439154fcac8" url: "https://pub.dev" source: hosted - version: "11.3.1" + version: "11.0.1" permission_handler_android: dependency: transitive description: name: permission_handler_android - sha256: "1acac6bae58144b442f11e66621c062aead9c99841093c38f5bcdcc24c1c3474" + sha256: f9fddd3b46109bd69ff3f9efa5006d2d309b7aec0f3c1c5637a60a2d5659e76e url: "https://pub.dev" source: hosted - version: "12.0.5" + version: "11.1.0" permission_handler_apple: dependency: transitive description: name: permission_handler_apple - sha256: e9ad66020b89ff1b63908f247c2c6f931c6e62699b756ef8b3c4569350cd8662 - url: "https://pub.dev" - source: hosted - version: "9.4.4" - permission_handler_html: - dependency: transitive - description: - name: permission_handler_html - sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d" + sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5" url: "https://pub.dev" source: hosted - version: "0.1.1" + version: "9.1.4" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20" + sha256: "6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4" url: "https://pub.dev" source: hosted - version: "4.2.1" + version: "3.12.0" permission_handler_windows: dependency: transitive description: name: permission_handler_windows - sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" + sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098 url: "https://pub.dev" source: hosted - version: "0.2.1" + version: "0.1.3" petitparser: dependency: transitive description: name: petitparser - sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 url: "https://pub.dev" source: hosted - version: "6.0.2" + version: "5.4.0" platform: dependency: transitive description: @@ -658,10 +626,10 @@ packages: dependency: transitive description: name: shared_preferences_web - sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" + sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.2.1" shared_preferences_windows: dependency: transitive description: @@ -695,18 +663,18 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.1" string_scanner: dependency: transitive description: @@ -727,10 +695,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.6.0" tuple: dependency: transitive description: @@ -751,10 +719,10 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "0ecc004c62fd3ed36a2ffcbe0dd9700aee63bd7532d0b642a488b1ec310f492e" + sha256: c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c url: "https://pub.dev" source: hosted - version: "6.2.5" + version: "6.2.4" url_launcher_android: dependency: transitive description: @@ -767,10 +735,10 @@ packages: dependency: transitive description: name: url_launcher_ios - sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5" + sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" url: "https://pub.dev" source: hosted - version: "6.2.5" + version: "6.2.4" url_launcher_linux: dependency: transitive description: @@ -799,10 +767,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "3692a459204a33e04bc94f5fb91158faf4f2c8903281ddd82915adecdb1a901d" + sha256: "7fd2f55fe86cea2897b963e864dc01a7eb0719ecc65fcef4c1cc3d686d718bb2" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.2.0" url_launcher_windows: dependency: transitive description: @@ -815,10 +783,10 @@ packages: dependency: "direct main" description: name: uuid - sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 + sha256: "22c94e5ad1e75f9934b766b53c742572ee2677c56bc871d850a57dad0f82127f" url: "https://pub.dev" source: hosted - version: "4.3.3" + version: "4.2.2" vector_graphics: dependency: transitive description: @@ -859,30 +827,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.0+2" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 - url: "https://pub.dev" - source: hosted - version: "13.0.0" web: dependency: transitive description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.1.4-beta" win32: dependency: transitive description: name: win32 - sha256: "0a989dc7ca2bb51eac91e8fd00851297cfffd641aa7538b165c62637ca0eaa4a" + sha256: b0f37db61ba2f2e9b7a78a1caece0052564d1bc70668156cf3a29d676fe4e574 url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "5.1.1" xdg_directories: dependency: transitive description: @@ -895,10 +855,10 @@ packages: dependency: transitive description: name: xml - sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" url: "https://pub.dev" source: hosted - version: "6.5.0" + version: "6.3.0" sdks: - dart: ">=3.3.0 <4.0.0" - flutter: ">=3.19.0" + dart: ">=3.1.0 <4.0.0" + flutter: ">=3.13.0" diff --git a/packages/hmssdk_flutter/example/pubspec.yaml b/packages/hmssdk_flutter/example/pubspec.yaml index e3d037887..836a27fde 100644 --- a/packages/hmssdk_flutter/example/pubspec.yaml +++ b/packages/hmssdk_flutter/example/pubspec.yaml @@ -25,7 +25,8 @@ dependencies: url_launcher: mobile_scanner: app_links: - uuid: + uuid: + flutter_foreground_task: ^6.1.3 dev_dependencies: flutter_test: From e6f3ef896455839d2ba62f62ef11bdcd0e3c6e9a Mon Sep 17 00:00:00 2001 From: Decoder07 Date: Tue, 9 Apr 2024 03:54:37 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=A4=96=20Automated=20Format=20and=20F?= =?UTF-8?q?ix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/hmssdk_flutter/example/pubspec.lock | 66 +++++++++++++------- 1 file changed, 45 insertions(+), 21 deletions(-) diff --git a/packages/hmssdk_flutter/example/pubspec.lock b/packages/hmssdk_flutter/example/pubspec.lock index 6cd30ef53..10a9a3805 100644 --- a/packages/hmssdk_flutter/example/pubspec.lock +++ b/packages/hmssdk_flutter/example/pubspec.lock @@ -77,10 +77,10 @@ packages: dependency: transitive description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.18.0" convert: dependency: transitive description: @@ -342,6 +342,30 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.7" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" linkify: dependency: transitive description: @@ -362,26 +386,26 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.11.0" mime: dependency: transitive description: @@ -426,10 +450,10 @@ packages: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_parsing: dependency: transitive description: @@ -663,18 +687,18 @@ packages: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" string_scanner: dependency: transitive description: @@ -695,10 +719,10 @@ packages: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.6.1" tuple: dependency: transitive description: @@ -827,14 +851,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.0+2" - web: + vm_service: dependency: transitive description: - name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted - version: "0.1.4-beta" + version: "13.0.0" win32: dependency: transitive description: @@ -860,5 +884,5 @@ packages: source: hosted version: "6.3.0" sdks: - dart: ">=3.1.0 <4.0.0" + dart: ">=3.2.0-0 <4.0.0" flutter: ">=3.13.0" From ff43e4c87311a14f4d8c31d671854e9cca739244 Mon Sep 17 00:00:00 2001 From: Decoder07 Date: Tue, 9 Apr 2024 13:17:01 +0530 Subject: [PATCH 3/3] Added foreground task in qr screen --- .../example/lib/qr_code_screen.dart | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/packages/hmssdk_flutter/example/lib/qr_code_screen.dart b/packages/hmssdk_flutter/example/lib/qr_code_screen.dart index 1a236847c..9b15738e9 100644 --- a/packages/hmssdk_flutter/example/lib/qr_code_screen.dart +++ b/packages/hmssdk_flutter/example/lib/qr_code_screen.dart @@ -3,6 +3,7 @@ import 'dart:developer'; ///Package imports import 'package:flutter/material.dart'; +import 'package:flutter_foreground_task/flutter_foreground_task.dart'; import 'package:hms_room_kit/hms_room_kit.dart'; import 'package:hmssdk_flutter_example/foreground_task_handler.dart'; import 'package:hmssdk_flutter_example/room_service.dart'; @@ -76,20 +77,22 @@ class _QRCodeScreenState extends State { Utilities.saveStringData(key: "meetingLink", value: rawValue.trim()); initForegroundTask(); Navigator.of(context).pushReplacement(MaterialPageRoute( - builder: (_) => HMSPrebuilt( - roomCode: Constant.roomCode, - onLeave: stopForegroundTask, - options: HMSPrebuiltOptions( - userName: AppDebugConfig.nameChangeOnPreview - ? null - : "Flutter User", - userId: widget.uuidString, - endPoints: endPoints, - iOSScreenshareConfig: HMSIOSScreenshareConfig( - appGroup: "group.flutterhms", - preferredExtension: - "live.100ms.flutter.FlutterBroadcastUploadExtension"), - enableNoiseCancellation: true)))); + builder: (_) => WithForegroundTask( + child: HMSPrebuilt( + roomCode: Constant.roomCode, + onLeave: stopForegroundTask, + options: HMSPrebuiltOptions( + userName: AppDebugConfig.nameChangeOnPreview + ? null + : "Flutter User", + userId: widget.uuidString, + endPoints: endPoints, + iOSScreenshareConfig: HMSIOSScreenshareConfig( + appGroup: "group.flutterhms", + preferredExtension: + "live.100ms.flutter.FlutterBroadcastUploadExtension"), + enableNoiseCancellation: true)), + ))); } } } catch (e) {