From c63271375234852bb4683fb90a4ac87a2580a6d4 Mon Sep 17 00:00:00 2001
From: Neeraj Gupta <254676+ua741@users.noreply.github.com>
Date: Mon, 6 May 2024 16:46:54 +0530
Subject: [PATCH 1/2] [mob] Fix _googlecast._tcp value in Info.plist
---
mobile/ios/Runner/Info.plist | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mobile/ios/Runner/Info.plist b/mobile/ios/Runner/Info.plist
index cdbc23774..9afb874e5 100644
--- a/mobile/ios/Runner/Info.plist
+++ b/mobile/ios/Runner/Info.plist
@@ -108,7 +108,7 @@
NSBonjourServices
_googlecast._tcp
- F5BCEC64._googlecast._tcp
+ _F5BCEC64._googlecast._tcp
NSLocalNetworkUsageDescription
From 12fb606e776ab109f3a6d96141aeb3e44bdc9ec9 Mon Sep 17 00:00:00 2001
From: Neeraj Gupta <254676+ua741@users.noreply.github.com>
Date: Tue, 7 May 2024 10:32:48 +0530
Subject: [PATCH 2/2] [mob] Disable auto-cast for iOS
---
.../gallery/gallery_app_bar_widget.dart | 52 ++++++++++---------
1 file changed, 28 insertions(+), 24 deletions(-)
diff --git a/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart b/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
index 2898143a0..00b11e9dd 100644
--- a/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
+++ b/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
@@ -738,34 +738,38 @@ class _GalleryAppBarWidgetState extends State {
// stop any existing cast session
gw.revokeAllTokens().ignore();
- final result = await showDialog(
- context: context,
- barrierDismissible: true,
- builder: (BuildContext context) {
- return const CastChooseDialog();
- },
- );
- if (result == null) {
- return;
- }
- // wait to allow the dialog to close
- await Future.delayed(const Duration(milliseconds: 100));
- if (result == ButtonAction.first) {
- await showDialog(
+ if (!Platform.isAndroid) {
+ await _pairWithPin(gw, '');
+ } else {
+ final result = await showDialog(
context: context,
barrierDismissible: true,
- builder: (BuildContext bContext) {
- return AutoCastDialog(
- (device) async {
- await _castPair(bContext, gw, device);
- Navigator.pop(bContext);
- },
- );
+ builder: (BuildContext context) {
+ return const CastChooseDialog();
},
);
- }
- if (result == ButtonAction.second) {
- await _pairWithPin(gw, '');
+ if (result == null) {
+ return;
+ }
+ // wait to allow the dialog to close
+ await Future.delayed(const Duration(milliseconds: 100));
+ if (result == ButtonAction.first) {
+ await showDialog(
+ context: context,
+ barrierDismissible: true,
+ builder: (BuildContext bContext) {
+ return AutoCastDialog(
+ (device) async {
+ await _castPair(bContext, gw, device);
+ Navigator.pop(bContext);
+ },
+ );
+ },
+ );
+ }
+ if (result == ButtonAction.second) {
+ await _pairWithPin(gw, '');
+ }
}
}