On this occasion: A few years ago I wanted to create an HRV (heart rate variability) measurement feature. We are missing - as far as I know - but still appropriate extensions or any APIs. Unfortunately, I lost sight of the topic again. If anyone knows anything more about this, please let us/me know.
The HRV provides very good and reliable information about the state of relaxation and health of a person and is used worldwide (not least by (competitive) athletes.
OK Sorry but I was gone off-grid for 3 months. After returning I bought a phone with Android 11, removed the SIMS or any other method of connecting to the internet. I then made the changes to my app and use the phone as a dedicated phone for my app only.
Thank you for the suggestion ChrisWard
Let me explain what I did in order to understand why it suddenly stopped working?
Since my app is truly huge It is not feasible to simply rewrite it so...
I used "Copy All Blocks to Backpack"
Delete (633) blocks)
I deleted the previous BLE and inserted the new BLE
I used "Paste All Blocks from Backpack"
This is where I noticed a problem. The paste block count is much lower count than the Copy count.
An attempt to simply remove the BLE and install the new BLE caused a ridiculous number of errors.
Did I mention the granular blocks backup technique of doing draggable blocks images of all blocks, using one of the browser extensions in the Blocks Editor FAQ?
Those come in handy when you lose blocks that depended on deleted extensions.
Presumably, you might be able to drag those block images back into the app after deleting an old extension.
For an entirely different replacement technique, there is the idea of pulling in the newer extension alongside the older one, and switching all the blocks that use the old extension to the new one.
Maybe the installation code is smart enough to clean out old versions?
(I have not tried any of these.)
It's good to have lots of Project->Save As backups and .aia exports before trying any of these ideas. I have had too many projects crumble in my hands.
Yes that is where I began. this help request post That was the first thing I tried. I simply added the new BLE and was going to build as you describe. As soon as I would import the new added BLE extension it reported "was updated". When I would attempt to use my app it simply would fail to run. I was in disbelief and repeated the procedure 3 or 4 times. With that failing, I attempted the backpack method mentioned above and upon that failing I started this post.
Upon your suggestion of today I decided I should at least try as you suggested and this time the app works!!! Something changed and it wasn't me
I am going to test this extensively and if it takes the hammering I will credit you for the solution.
Yes I have more than 30 backups, each with a Notepad explanation of changes per save.
I also have to make Notepad maps of all the modules on each screen. The app is very large. When the new BLE failed I, understandably, freaked
hmm The BLE I have has been on my PC since last July edu.mit.appinventor.ble-20230223-beta. IE: I am still using the same BLE today as I did during July when I could not get it to work.
I was thinking that Google released a couple minor updates for OS 13 during the last 5 months and maybe that is what changed.
I did not (until now) think to check if there was yet another release since then. Version 20230728 appears to be the latest and I DLed it. I will also test that, especially since it is not marked "beta".
I have changed the code in the pursuit of looking for any possible mistakes.
I also improved some button handling events, etc
I installed the app on my 2 phones: Android 13 and android 11
On the android 13 phone the heart rate reports very accurately up to 99. Upon hitting 100 it reports 10 !
On the android 11 phone it reports the HR accurately all the way to my maximum heart rate and for 20 minutes workout (using a watch belt and phone type belt).
I realize the BLE for heartrate extension belongs to E.W.Patton and think he should know about this but want to ask you if you think I should submit this as a bug?
I would look for truncation of the heart rate when it hits the Label, something that might be device dependent if you asked for a fixed width in the Designer.
If that's not it, by all means post the exported aia here for us to examine.
I did think of that and yes its fixed to 45% which is capable of displaying 000 3 digits
Again, it works fine on my android 11 phone
Also I have an earlier version of the app that worked perfectly when that phone was android 11 and it works perfectly even now with 13. The only change has been the BLE. I never changed the size of the readout label during upgrade.
I am a bit shy to post a bug
A few minutes later: what it there is leading spaces? I did a trim on it but same result BUT I have two displays and the other one works fine so no bug except me somehow
UPDATE: got it working thanks to you. Somehow in android 13 the font size on screen has changed. I tested this app on many phones and it works perfectly until I updated to the new BLE!!! very strange