Android Question bluetooth devices

Mr Blue Sky

Active Member
Licensed User
Longtime User
bluetooth application no longer works with Android10 & B4A 9.90
I downloaded the two examples Bluetooth "Chat" and Bluetooth "Chat" with B4XPages.

I get the same error at
Dim success As Boolean = Starter.Manager.SearchForDevices
"Error starting discovery process"

bluetooth demo applications work well with versions lower than 9 on Sony, Huawai, Samsung

if someone encountered the same problem and have a solution, i have the permissions in the Android manifest
 

Attachments

  • Screenshot_20200630_151936_anywheresoftware.b4a.samples.bluetooth.jpg
    Screenshot_20200630_151936_anywheresoftware.b4a.samples.bluetooth.jpg
    112.1 KB · Views: 176

Star-Dust

Expert
Licensed User
Longtime User
see this:

SDK 29 - BluetoothAdmin.StartDiscovery and BLEManager.StartScan require the ACCESS_FINE_LOCATION permission. Previously the COARSE location was enough.
 
Upvote 0

Mr Blue Sky

Active Member
Licensed User
Longtime User
Thanks for your help
as I said, it seems to me that I have already done so

see this:

SDK 29 - BluetoothAdmin.StartDiscovery and BLEManager.StartScan require the ACCESS_FINE_LOCATION permission. Previously the COARSE location was enough.
 

Attachments

  • manifest.jpg
    manifest.jpg
    261.8 KB · Views: 169
  • android29.jpg
    android29.jpg
    74 KB · Views: 166
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Thanks for your help
as I said, it seems to me that I have already done so
I see you have entered it several times. I don't know what it could be.

Try TargetSDK at 29
 
Upvote 0

Mr Blue Sky

Active Member
Licensed User
Longtime User
I see you have entered it several times. I don't know what it could be.

Try TargetSDK at 29
yes it was already at 29 at the beginning, I did a test with TargetSDK at 30 and android.jar-30 to see and i send a screenshot error

I am with AddManifestText(
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29"/>

I specify that I have a Huawei P40 5G and a Samsung S20 identical problem. a priori very specific to Android 10

I deleted
AddPermission (android.permission.ACCESS_COARSE_LOCATION)

and leave that
AddPermission (android.permission.ACCESS_FINE_LOCATION)

That changes nothing
 
Last edited:
Upvote 0

Mr Blue Sky

Active Member
Licensed User
Longtime User
Is is not enough to put the permission in manifest. You need to use Runtimepermission and REQUEST it at Runtime.
yes i know thank too don

1593527582351.png


like i said, it would work fine before Android 10.

I added a manifest and execution authorization
AddManifestText (<uses-permission android: name = "android.permission.ACCESS_FINE_LOCATION" />)
and keep
AddManifestText (<uses-permission android: name = "android.permission.ACCESS_COARSE_LOCATION" />)
 
Last edited:
Upvote 0

Mr Blue Sky

Active Member
Licensed User
Longtime User
its good to tell us what is the problem and how you resolve it - so it would be useful for other who came with same problem
Yes, you're right,

But it won't bring anything, it was just a variable error
once I call it connection, and the second time connected

What I find difficult to understand is that, however, with previous versions of Android, it still works when it shouldn't have
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Thank you very much Don Manfred and Star-Dust for the help to bring, I found my problem, I dare not even say it as I am ashamed ;-)

all works like before !
wonderful
 
Upvote 0

MbedAndroid

Active Member
Licensed User
Longtime User
may be not related to your problem, but i encountered same issue. Google made a update for the Covid-19 and BT in april/ma. After updating my tablet i couldnt enable BT anymore. The slider stays gray. Factory reset and disabling google updates solved the problem. Dont know this is a general issue, but worth the mention it here.
Used tablet was Chuwi H8 with android 8.1
 
Upvote 0
Top