I need help i think i noticed that bluetooth doesnt work with newer version of android

im trying to make a app but i have followed every thing even turring the bluetooth in the permisons and nothing what sould i do

Hello,

Are you using Bluetooth classic or BLE?
What about providing a screenshot of your relevant blocks?

For Bluetooth classic see below
Taifun


(Canned Response ABG - Bluetooth non-BLE SCAN Permission Blocks)

The easiest solution, for immediate relief
(from @Barry_Meaker) ...

I had the same issue. The problem is your app does not have permission to see nearby devices. The solution is to give your app permission on your phone (no code changes in your app).

on your phone,

  • goto settings
  • search for your app
  • in App Info for your app select Permissions
  • change Nearby Devices from Not Allowed to Allowed
  • Done

By the way, the very first time you run the app, Android will ask if you want to grant the app this permission. If you say no, or ignore the pop-up, the permission will be set as Denied. Android will not ask again.

A more complex approach, for professional app development:

See Bluetooth liste of devices deosn't work anymore - #7 by Anke
Special note for Xiaomi devices:
I have an error with bluetooth on android 12, Xiaomi Poco X3 NFC - #20 by Patryk_F

Hey,
I found an old application and it shows me the bluetooth list normally, when I compile it again without any changes it no longer shows me the lists. WHY?

Because nowadays you have to ask for permission before you get the list...

Taifun

I have all the permits.
the old application does not ask for permissions and still works

I downloaded the app and code from this video. The old apk works, but the new apk does not work after building and donwload.
I set permissions on my phone.

It was built with an old target sdk
If you build now, you have to ask for permissions
Taifun

how to do it outside these blocks because it doesn't work

Well, what about following the link to see how to do it?

Here is it again...

Taifun

Sory I don't understand what I should do. it works, but I have no idea how to implement it into my program. I'm on my first day at this

Well, are you able to click a link?
This one from my previous answer

You can find there the recommended blocks how to do it...

Taifun

Yes, and I ran it and it works fine. I have a list of devices all over my screen. I can't do anything else on the screen. I can't see the buttons underneath

Great

Yes, the listpicker will use the complete screen to display a list of devices
Now usually you pick one of the devices you like to connect to

Taifum

I learned a little more about this app. Unfortunately, when I go into that article, I donwload the app BTclient_test2. It shows me a list of devices. Unfortunately, it still does not connect to the HC-05 module for Arduino. I have allowed all options in settings

Did you meanwhile ask for permissions as mentioned several times earlier?

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

Yes, it asks for access, I allow it. I see the HC-05 device in the app, when I click to connect, nothing happens


Switching Screens breaks Bluetooth connections.

How to prevent this?

Use virtual screens or establish the Bluetooth connection on the relevant screens.