After reading the whole thread I see that there is no clear solution. I had a functional app on my device, I updated it and when I downloaded it again, the problem mentioned here appears and I did not find any solution. What a pity, hopefully it will be solved soon.
Yes I actually tried. But it appears a problem with java when I try to open de APK on the program. Later y will publish a screenshot, but I think it's not mi problem because I was following your steps, but thanks anyway.
I'm also encountering the same problem "UID 10718 / PID 5169 lacks permission android.permission.BLUETOOTH". As a Smartphone, I'm using a Xiaomi Poco X3 with Android 12 and MIUI 13. Till almost 18th February (also when this discussion was created) everything was working fine without a problem. Then maybe MIT had an update? After that, I encountered the error above.
I gave the app all permissions I need (it was working though), so I looked at the AndroidManifest.xml (see Post #107) from my working apk (before 18th February) and the new build apk from today. Both xml-files are almost the same, but with two differences.
On my working apk all permissions look like this:
In the new apk, the permissions "BLUETOOTH_ADMIN" and "BLUETOOTH" are set to the maxSdkVersion 30. After I deleted those both, I installed the apk and it was working for me again. So these both maxSdkVersions are causing my problem.
Thanks for your interesting notification : I have the same analysis than you and same symptom.
I guess that the problem occured with the introduction of nb191 of the 17th of February.
In the nb191 release it is mentionned " * Add new Bluetooth permissions to permission helper block" and in bug fixes : " * Ask for dangerous Bluetooth permissions in Android 12 (affects BluetoothClient and BluetoothServer)" . It could be there, I guess ?.
I tried now a test program with the ai2Test 20230301 as proposed by @ewpatton in #131, but the bug is still there when I connect the BT classic.
Unfortunately my present option is still to modify the androidmanifest.xml as @Madhav explain us in #106.
We have updated the build servers for ai2-test with another potential fix for the Bluetooth classic permissions for Android 12 devices that are not following the Google guidance on the legacy BLUETOOTH permission. If you try building on that server, I also recommend you uninstall the previous build of your app from your device just to be sure that the new build is installed correctly.
@ewpatton Thanks. I just checked and can confirm, that in my case building the app in ai2-test after the build servers update solved the issue on my side.
Buenas tardes sigo intentando retomar mi trabajo pero cuando género la app en el servidor "normal " en el servidor normal sigue apareciendo el error , he intentado como otros miembros de este chat con el servidor para test y me da este error
I have a Mi 10T Lite with Android 12 and MIUI 13. I completely deleted the Mit AI2 Companion application and reinstalled it. I recompiled the apk that calls an ESP32 board and it still doesn't work. But I noticed something interesting, an application compiled before the problem appeared works fine. I think that if I will recompile it, it wouldn't work, but I don't dare to do this.
So, I think the problem is still there with MIT App Inventor. Ask me if you need more information.
I solved my problem (not very elegantly by modifying the androidmanifest. Anyway, I have no intention of uploading the apk to Google Play. Thank you.
We did not rebuild the companion for this test, only the buildservers on ai2-test were replaced. The companion will still have the restriction that is affecting certain phone brands w.r.t. the old Bluetooth permissions.
Did you recompile on ai2 or ai2-test? Only the latter has been adjusted to drop the maxSdk constraint on Bluetooth permissions. I just built an app on the test server and can confirm that when I dump the AndroidManifest it has both of the old Bluetooth permissions without restriction.
Hi!
I have built a project that displays sensor parameters read from PSoC 6BLE. I am getting Error 9101 in BluetoothLE extension: Expected device index from 1 to 0. Do you know how to solve it?