Android Question BluetoothAdmin StartDiscovery Not Working in Samsung Android 11

rscheel

Well-Known Member
Licensed User
Longtime User
I have an application that looks for bluetooth names in a service, it works correctly on phones other than Samsung, on samsung it doesn't work, admin.StartDiscovery does nothing, it's as if it ignored that line of code, any idea what might be happening?


Code Fragment:
    If admin.IsEnabled Then
        'admin.StartDiscovery
        Dim success As Boolean = admin.StartDiscovery 'Not Working
        If success = False Then
            LogColor("Error starting discovery process.", Colors.Red)
        End If
    Else
        admin.Enable
    End If

Thanks
 

rscheel

Well-Known Member
Licensed User
Longtime User

The example works fine, in the code I realized that it had admin_DeviceFound and I changed it in the same way as it is in your code with the letter a (Admin_DeviceFound) in uppercase and it works correctly, now I have the error that with the application closed running the background service admin.StartDiscovery does not start and is false.

thanks for your help
 
Upvote 0
Top