Unable to Find BLuetooth Devices after Scanning
See original GitHub issueCan’t see any device during Scanning… I tried with Android Emulator 13 and also installed app on phone (Samsung) but was not successful on .net 6 MAUI
I am using API version 2.3.1
public partial class DeviceScanner
{
[Inject]
public BluetoothService BluetoothService { get; set; }
private Status workflow;
public string workflowText;
private HashSet<DeviceNode> devices = new();
private DeviceNode selectedDevice = null;
private SemaphoreSlim semaphoreSlim = new(1, 1);
private async void OnSearch()
{
await semaphoreSlim.WaitAsync();
try
{
devices.Clear();
selectedDevice = null;
SetWorkflow("Scanning for Devices...", Status.Lock);
await Task.Delay(1500);
devices = await BluetoothService.CrossBluetooth.StartDiscoveryAsync(Callback);
if (devices.Count == 0)
{
await Toaster.ShowAsync("Unable to find nearby Bluetooth LE devices. Try again.");
}
}
finally
{
var successText = "Scan completed. Select a device and Connect";
var failureText = "Unable to find nearby Bluetooth LE devices. Try again.";
var text = devices.Count > 0 ? successText : failureText;
UnlockWorkflow(text);
}
}
standalone git repository* Repo
Expected behavior
I expected to recieve visible BLE devices after Scanning
Actual behavior
After calling “devices = await BluetoothService.CrossBluetooth.StartDiscoveryAsync(Callback);” i do not recieve any device , no Bluetooth Device could be seen.
Configuration
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
**Version of the Plugin . 2.3.1
**Platform: Android Emulator 13 >
Device: e.g. HTC Sensation /i Phone 7 …
Issue Analytics
- State:
- Created 5 months ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
My Android Won't Connect To Bluetooth. Here's The Fix!
Put Your Bluetooth Device In Pairing Mode [1:30] 6. ... When you pair a Bluetooth device to your Android for the first time, ......
Read more >Fix Bluetooth problems on Android
Can't pair with other accessories · Open your phone's Settings app. · Tap Connected devices. If you see "Bluetooth," tap it. · Tap...
Read more >How to Fix Bluetooth Pairing Problems
1. Make sure Bluetooth is turned on · 2. Determine which pairing process your device employs · 3. Turn on discoverable mode ·...
Read more >12 Quick Ways to Fix Bluetooth Problems on Android Devices
1. Try to Connect With a Different Device · 2. Turn Off Bluetooth and Then Turn It On Again · 3. Unpair the...
Read more >How to Fix Bluetooth Pairing Problems - Techlicious
1. Make sure Bluetooth is turned on · 2. Determine which pairing process your device employs · 3. Turn on discoverable mode ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I will try it out again in some days and share a Repo to the source code if it doesn’t work
Sounds like his problem was solved by this:
I’m closing this issue. As soon as you do it right, it suddenly starts working 😉