Android Question Problem whit Android 10

Fausto62

Member
Licensed User
Hello , I have developed an App that connect eps32 with android phone.
The App work well with Android 10 on Cinese phone, but not work on phone whit android 10 for european market.
The Phone not Connect to ESP32
Any suggestion.
Thanks in avance
 

Fausto62

Member
Licensed User
Hello Erel,

I'm testing the attached code. The example work in android 8.0.0, but whit huawei P30 Lite whit Android 10 not work. The phone see the Bluetooth device, but the example app not connect whit the device.

Thanks for your help.

Fausto
 

Attachments

  • Adruino_Bluetooth_B4A.zip
    9.7 KB · Views: 99
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Fausto62

Member
Licensed User
Hello DonManfred ,

Thanks for yur help.

I have changed the manifest from

<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="26"/>

to

<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="28"/>

But not work.

How add RuntimePermissions and how request the needed Permission?

Thanks a lot for your help
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can also see it in the Bluetooth examples:
[B4XPages] Bluetooth Chat Example
 
Upvote 0

Fausto62

Member
Licensed User
Hello ,
I have tested the bluetooth chat example and work.
I have changed the Astrem initialization with
'AStream.InitializePrefix(serial.InputStream, False, serial.OutputStream, "astream")
AStream.Initialize(serial.InputStream, serial.OutputStream, "astream").
If I use the bluetooth chat whit samsung A3 i can connect to ESP32 whit bluetooth serial standard.
But if I use the same bluetooth chat , on P30Lite this see the ESP32 but not connect, alwais timeout error.
If I use the App "Serial Bluetooth Terminal" from google play the same phone connect to esp32 and work properly.
What setting I need in the chat sample to connect whit esp32 in serial standard?

Any help is very apreciated

Thanks in avance
 

Attachments

  • BluetoothNoPrefix.zip
    7.1 KB · Views: 100
Upvote 0
Top