after the update of the AlarmManager my Main-App is now working too.
The compagnion isn't working also with apps without Itoo. I tried all suggestions given by MIT, no success????
As i don't now, if you save my Test-App before Taifon removed it (Sorry again to Taifun for this mistake), here is the new one without the AlarmManager-Extension.
I tested it on Android 9 and 14, again the Acceleration-Sensor didn't work in background, Pedometer is OK.
I looked at your project, I see that AccelerometerSensor1.AccelerationChanged --> changing which is right but then it calls Show_Accel which attempts to set label text.
This is not possible, you cannot change UI elements when your blocks are called from background. That's why it crashes.
Hi Marcel, I checked your project, you are doing almost everything right except the fact that procedures startBle and stopBle are missing an argument "x" which is meant for the message slot.
startBle() -> startBle(x) stopBle() -> stopBle(x)
Since you are missing an argument signature, this Itoo fails to call your procedure.
Im using the version provided by Ewpatton, which works.
However, the problem is not the BLE version Im using. The problem is that Itoo does not call the procedures startBle and stopBle which should start respectively stop BLE.
It is not Itoo's fault. All the procedures are called properly. I discovered this error message while I was debugging your program:
AEvent(ErrorOccurred=null) args [edu.mit.appinventor.ble.BluetoothLE@49fba75, StartAdvertising, 3300, Error 9121 in extension BluetoothLE: More than 31 bytes in advertising packet] listener = xyz.kumaraswamy.itoo.Itoo$1@4329dac
"startBle" and "stopBle" now only update the property "state". The "state" is updated on the screen when "Timer" fires (every second). However when pressing "Start Monitoring" or "Stop Monitoring" the screen is not updated..so "state" is not updated...so it looks like "startBle" and "stopBle" are not called. Could you please further investigate? Many thanks in advance!
Your blocks do not really nake sense
If the app is running in the background, there is no user interface available to display anything
Also how exactly shout these procedures startBle or stopBle be called and by whom?
For a working ble example in the background see here.
The UI of the app enables the starting and stopping of BLE advertising running in the background using Itoo. The state "started" or "stopped" is displayed whenever the app is openened. So I will always know what the state is by opening the app. That makes sense doesnt it?
I carries a wearable device with me that just scan for the BLE advertisments. When found everything is ok! When not found, my phone is out of range and the wearable device gives an alarm. I use the rssi value to set the range/sensibility between my phone and wearable device.
This app worked without any problems up to 17th of August. Since that date new builds didnt work anymore. The problem was recognized and Kumaraswamy provided a new version of Itoo.
This new version introduced a new issue for me. As far I was able to do problem determination, it looks like the broadcast fucntionality doesnt work anymore. At least not for me using a Samsung A52 running Android 14.
In the PhneBuddyV2_0_noBle.aia posted above, I stripped all functionality except for the Itoo broadcast handling. Indeed the app doesnt tmake sense anymore, but I hope it would help you to find out what is going on.
Hi Kumaraswamy,
Let me know if I can be of any help. Collecting logs perhaps? I have ADB running and USB debugging enabled, but might need some guidance from you how to capture the right data.
Android 14 imposes restrictions on the feature that Itoo uses to exchange messages b/w processes. And there's some technical debt to the project, interfacing the service with the blocks makes it really messy.
Im not sure what to do... Thinking of spiting the message exchange system into a new component (a breaking change), while also allowing more flexibility...