rscheel Well-Known Member Licensed User Longtime User Jul 6, 2021 #1 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: Copy 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
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: Copy 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
Erel B4X founder Staff member Licensed User Longtime User Jul 6, 2021 #2 Try this example: https://www.b4x.com/android/forum/threads/b4xpages-bluetooth-chat-example.119014/#content Does it work? Upvote 0
Try this example: https://www.b4x.com/android/forum/threads/b4xpages-bluetooth-chat-example.119014/#content Does it work?
rscheel Well-Known Member Licensed User Longtime User Jul 6, 2021 #3 Erel said: Try this example: https://www.b4x.com/android/forum/threads/b4xpages-bluetooth-chat-example.119014/#content Does it work? Click to expand... 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
Erel said: Try this example: https://www.b4x.com/android/forum/threads/b4xpages-bluetooth-chat-example.119014/#content Does it work? Click to expand... 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
Erel B4X founder Staff member Licensed User Longtime User Jul 7, 2021 #4 The case doesn't matter. You need to request the fine location permission at runtime. Upvote 0