Android Question Android pairing activity

jemajuca

Member
Licensed User
Hello;

I am making an application on B4A to control a device that has a Bluetooth BLE 652.
My code uses the BLE2 library and connects correctly and controls it without any problem. Now I want to add security to my project, causing the mobile to pair with the BLE652 device so I need the B4A application to display the Android pairing activity window, as the following happens:

- I have implemented the pairing code on my BLE2 device and this device performs the Advertising I believe correctly.

- If on my mobile I go to Settings - Bluetooth and look for my device BLE652, find it and when I select it I get the window of the activity where I check that the passkey generated by the device BLE652 appears on the screen of my mobile to accept or cancel The pairing.

The problem is that I deprecate B4A application, I am not able to visualize that screen, that is, what I want exactly is that the user does not have to do the pairing before loading my B4A application, but it is my B4A application that by means of a button View shows me that screen for the user to Accept or Cancel the pairing and then return to my B4A application.

I have read a lot in the posts, but I can not visualize the activity in my application, can you please tell me the correct code in B4A to visualize the Android system pairing activity?

Thank you very much and apologize for my English
 

jemajuca

Member
Licensed User
What happens if you unpair the devices and then try to connect? Does it show the pairing window?

Hi Erel;

I do not get any windows ...... connect me in a normal way but to pair me I have to go to Settings - Bluetooth .... search it ..... and select it ...... when doing this opens a Window that shows the passkey to pair us ...... but what I need is that it can be matched but from within my application, for example by means of a button.

Thank you
 
Upvote 0
Top