File tree 2 files changed +18
-15
lines changed
2 files changed +18
-15
lines changed Original file line number Diff line number Diff line change @@ -132,17 +132,18 @@ class _DeviceEnumerationSampleState extends State<DeviceEnumerationSample> {
132
132
}
133
133
134
134
Future <void > loadDevices () async {
135
- //Ask for runtime permissions if necessary.
136
- var status = await Permission .bluetooth.request ();
137
- if (status.isPermanentlyDenied) {
138
- print ('BLEpermdisabled' );
139
- }
135
+ if (WebRTC .platformIsAndroid || WebRTC .platformIsIOS) {
136
+ //Ask for runtime permissions if necessary.
137
+ var status = await Permission .bluetooth.request ();
138
+ if (status.isPermanentlyDenied) {
139
+ print ('BLEpermdisabled' );
140
+ }
140
141
141
- status = await Permission .bluetoothConnect.request ();
142
- if (status.isPermanentlyDenied) {
143
- print ('ConnectPermdisabled' );
142
+ status = await Permission .bluetoothConnect.request ();
143
+ if (status.isPermanentlyDenied) {
144
+ print ('ConnectPermdisabled' );
145
+ }
144
146
}
145
-
146
147
final devices = await navigator.mediaDevices.enumerateDevices ();
147
148
setState (() {
148
149
_devices = devices;
Original file line number Diff line number Diff line change 4
4
<dict >
5
5
<key >com.apple.security.app-sandbox</key >
6
6
<true />
7
- <key >com.apple.security.device.camera</key >
8
- <true />
9
- <key >com.apple.security.device.microphone</key >
10
- <true />
11
- <key >com.apple.security.network.client</key >
12
- <true />
7
+ <key >com.apple.security.device.camera</key >
8
+ <true />
9
+ <key >com.apple.security.device.microphone</key >
10
+ <true />
11
+ <key >com.apple.security.network.client</key >
12
+ <true />
13
+ <key >com.apple.security.network.server</key >
14
+ <true />
13
15
</dict >
14
16
</plist >
You can’t perform that action at this time.
0 commit comments