We don't see your bluetooth blocks. Also what brand of phone.

Brand is Oppo A95.
I can give the bluetooth blocks but they did not change. They app has been working perfectly for more than a year until I changed the clock seconds counter. No other changes were made

You've provided some minor information about the clock, but you haven't written the most important one. Are you using bluetooth component or BLE extension?

If you are using the BLE extension, you must use the latest version from this year.

Extension BluetoothLE

So as I wrote above, use the latest version of the extension. Yours is already deprecated for the latest versions of android.

1 Like

WOW ok will try that! I did not notice that earlier... thanks

I never suggested that. It wouldn't work because there are many Android versions that are not numeric (e.g. 2.3.3, 4.4.4, 5.0.1 or 6.0.1 or 7.1.2, ...).

I installed the new beta and it said it updated but now the app will not compile

Check if you have any errors in blocks. I hope you didn't remove the old version of the extension before adding the new one...because then you removed all the BLE blocks.

Haha! Yes, the first time, I did delete the BLE and install new BLE and yes a ton of errors (I have been away from coding for a year). I restored from a .aia and installed the new BLE the second time. There are no errors but it refuses to compile.

Try this one (and post screenshots):

It's impossible for the app to not compile only after adding the ble extension. Perhaps the other extensions you use are outdated and need to be updated. Publish your project aia here. After that, you can check if the scan is working in Companion.

1 Like

I would be happy to do that Patryk but the app has 8 screens, with 700 -2000 blocks per screen; a bit overwhelming.

Considering your certainty that "its impossible for the app to not compile" I will attempt a few things in the next couple days to see if I can narrow this down some.

I sincerely appreciate your help and will get back to you as soon as I can hopefully get a clue :wink:

Make a small sample project with the ble extension, where you will be able to connect to your device and send/read data. If all goes well, adopt it for your big project.

1 Like

Compiling problem solved!

I copied all blocks to backpack, deleted all blocks, removed BLE, installed new BLE, Restored all blocks

Compiled without a problem. Obviously the AI does not "update" properly.

Problem seems to be solved

Here are the blocks of my BLE test APK:

Note: The bluetooth permissions should be requested automatically on Android 12+. However, I have explicitly requested them here for teaching and documentation purposes (among other things, to be able to trigger and display the PermissionGranted events).

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.