Here is v1.1:
Aix
com.sunny.BT.aix (15.3 KB)
Changes
- Internal changes as suggested by @ChrisWard
Hello,
First of all thank you for the work done on this extension. I was able to find a solution for my application with which I wanted to have an automatic connection to my robot.
On the other hand, I noticed a small problem that I wanted to bring up to you. Sometimes after a scan, the application gives an error message. So I tried with your application as an example, same observation.
I wondered if it was not from a bluetooth module that does not display their mac address. So I tried adding conditions to list creations to exclude wrong addresses, but nothing helped. I'm starting to wonder if this might not come from the extension code. Little will you have an idea of the problem.
Cordially.
Hello,
absolutely. The problem arises even with your example program. But it's pretty random and I don't know if it happens when a particular bluetooth module is nearby or not. Because I am in university residence and I therefore do not have control over the work environment. Like you, I think the error returned on this block in question but I have not found a solution for the moment. Maybe you would have better luck.
By removing this block from the program
and doing an infinite loop of scanning to try to debug. My modified blocks for debugging:
the problem does not arise
Hello,
it still does not work with the new version. I was able to test on the move today and the error messages keep coming back. With hindsight, given that for my personal app, I'm trying to connect to a device that bears a particular name (Hexapod) without worrying about its Mac address (so that my app is compatible with several robots), I I created a method different from the one proposed in the example which does not need to manage a list.
I do not see how to solve this problem, but maybe some will have more experience and will have found themselves.
Extension is open source now:
Useful extension
Hello, i can not enable/disable bluetooth via BT1.Toogle call method.
How can i enable or disable Bluetooth using this call method?
go to logic section and drag out true or false blocks
It works. Thank you so much my friend.
Thanks so much for making this extension, it works great but I encountered a small problem on android 12 versions. In these weeks I'm busy with an important project and I notice that every time I try to run the application on android 12/ ...it gives me the following error:
I was told that the error is due to not updating the necessary permissions for those versions of android. in fact the "BLUETOOTH_CONNECTION" permission would be missing in the script ... is it possible to update the extension?
I'll update the extension the later for sure. But now you can do it with any zip software.
Open aix as zip file and go to com.sunny.bt/files
dir. You'll find component_build_infos.json
file. Open that and add required permission.
Note that the BLUETOOTH_CONNECT permission is a runtime permission, so the extension will also need to be updated to ask for the permission in the long run.
Yes, I'll update the extension soon.
I tried to do as you told me but I figured it didn't work for the reasons explained by ewpatton, however update me as soon as possible on your extension. Thanks for your time and have a nice day
Only adding permission to aix is not sufficient.
You'll have to ask permission at the runtime too.
Bluetooth Toggle not working.
Start Discovery not working.
Please fix thes isue ...