Bluetooth connectivity issue: Mobile screen goes black when searching for BT devices

Hello GJover

Given that your App(s) worked before and now you are working on it again, what have you changed before reporting this issue?

Have you changed the Theme? Have you changed the colour of the List Picker text? I notice that there are a lot of errors in your code....

Can you list the device Make/Models you have tested, together with the Android Version and Bluetooth Version please.

Finally - if you run this project:

BT_Basic_Setup_Receive_two_vals.aia (7.7 KB)

.....are devices found?

When I installed your application and tried to search for BT devices, it generated an error due to lack of permissions, but after granting them, it worked well!!
Later on, I reset the permissions for my applications, and they started working again. I really don't know why it worked now and not before since I had already checked the permissions. I suppose I must have done something else but I don,t know what!.
On the other hand, my applications still don't work properly on a GT-N511 tablet with an older Android 4.4.2 system, even though permissions have been granted. It's a complete mystery. Anyway, thank you very much for your help.

It's possible that your App is using a function or extension that is not compatible with Android 4.4.2 (10 years old).

Aynı sorunu ben de yaşadım, önceden Samsung Galaxy Tab3 tablet ile çalışan programımı Galaxy A7 ye yükleyince bu problemi yaşamaya başladım. nasıl çözülecek? lütfen yardım edin. Ben de Samsung android sürümüyle alakalı olduğunu düşünüyorum. (I had the same problem, I started having this problem when I installed my program that used to work with the Samsung Galaxy Tab3 tablet on the Galaxy A7. How will it be resolved? please help me. I also think it has to do with the Samsung android version.)

What is the exact Android version on both of your Samsung devices Abdurrahman?

Hi, I'm experiencing the very same problem (the listpicker lists no devices ... My smartphone has Android 12 and I have paired it previously with the HC-05 module

I send you a screenshot of my blocks, it's a very basic program, as you can see:

I've tested with another phone with a very old Android version and it works. Apparently, since Android 12 the apps need to ask for BLUETOOTH_CONNECTION permission first. I've found the solution here: https://www.youtube.com/watch?v=MNLzS-MOXAg , I have not tested it yet, though.

did you enable bluetooth?
Taifun

Yes.
It works in Android 12 adding the following blocks:

2 Likes

Hi Abdurrahman. Search for something like 'nearby device permissions' and grant it to your application. In Android 12, it may not be called exactly that. Try it.

my Samsung tablet android version : 13

same device, same codes, but one list shows up and one does not. i am not understand :frowning:



Taifun look it please,

same device, same codes, but one list shows up and one does not.

i think different a problem... not permission problem..


Hi Abdurrahman

The project that is working - is the code on Screen1?

Hi again Abdurrahman

Your BT Connect code should never be in Screen Initialize - why are you concerned about Scanning for available devices when you have a hard-coded address set to be connected?

..... and you are not handling the permissions properly, you must check that all permissions requested are granted before any Bluetooth function is called.

Screen1 is only splash image.

...and the other points I queried?

we need sometimes out of automatic connected address different bluetooth device scanning.

if i do permission control before bluetooth connection, user will must connection manually. i want connection automatic. what is your suggest (is it clock timer)

It can be in the Permission Granted Block.

... but that is not coded as "sometimes", it is hard-coded as "always".

I was having the same problem. The screen goes black when trying to find bluetooth devices. I'm using Android 12. I tried to allow MIT AI2 Companion access to detect nearby devices in the Android app settings and it worked.