is the "open above lockscreen feature" limited only to alarms(can only be triggered by alarms), or can that be triggered by a stimulant, say when bytes/strings are received by a BLE module?
i believe that feature also brings the app to the foreground if im not wrong?
im trying to trigger an alarm using itoo and ble and it works, but not in a way i expect it to work. instead of anything appearing on the lockscreen, i get only a notification with the title and text. i created another screen for lockscreen but it doesnt appear. i tried to follow the lockscreen app as much as i could, and the lockscreen app works perfectly fine, but this doesnt. i dont understand where the issue is. (even if the alarm activates because of ble received, the alarm still should perform as expected right?) all permissions required have been enabled as well.
is it because itoo is interfering with the app with the createprocess block?
ALSO: in recent xiaomi mobile phones, theres an additional show in lockscreen option that needs to be enabled by opening app settings. (advice)
if i put the instant to call clock1.now, will the alarm activate just after the button is pressed?
if yes, then it doesnt work somehow for me{i created an apk of the lockscreen example file, and tweaked only that function a bit},
and if no, then how does it work, and what does that sentence entail?
if i want to trigger an alarm as soon as the button is pressed{button.click or idk}, how do i do so?
To solve the issue I think I could add some logic to not use the alarmmanager api in this case and trigger the alarm directly... I will do some experiments when I find some time...
I was thinking about it again... In your latest screenshot you click the Start button and your idea is to set an immediate alarm to open the app above the lockscreen... this does not make much sense like this, because your app already is running, isn't it?
Please describe your use case more in detail... are you trying to open the app above the lockscreen from the background using itoo together with the alarmmanager extension?
well i mean- you are not wrong, but i was testing the extensions capability to create an alarm and activate it in an exact instant by a stimulus, be it anything at all and i needed the LockScreen screen to appear.
almost precisely. figured me out lol and well I have achieved the said above process, but the extensions takes much time in creating and activating the alarm(almost 10 s, when i create the alarm with the screenshots block and put this in the instant section {even though the seconds added is 5} when i want it to be in an instant)
Hi, I was planning to use your extension and onReceive. I have to say that the notifications keep working repeatedly. That’s why I added a command in the onReceive procedure to connect via MQTT to the broker, and then I activate a timer which, after 45 seconds, reads the topic from the broker and disconnects.
I found out that the condition checking whether the MQTT client is connected doesn’t work. It seems to me that usrPahoMqttClient and timers don’t work inside onReceive. Do they need to be activated somehow?
Normally, in itoo it worked for me for at least 6 hours. When it didn’t work, I tried to activate itoo in the background if Android killed it. That also didn’t work out.
What am I doing wrong? Thank you very much for your help.
The alarmmanager uses the itooX framework, so all rules relevant for itoo are also relevant for the background processing of the alarmmanager. So the answer is yes, do it the same as you would use itoo
This should return false even if you started the connection in the foreground, i.e. do not mix foreground and background processing, i.e. start your connection in the background in the OnReceive event handler
To send a notification you could also use the StartNow method from the alarmmanager extension
Also for debugging use the Notifier.LogInfo method and use Logcat to check the log
I currently do not have a link to the documentation of the mqtt extension...
You might want to register that event for itoo ... same for other relevant mqtt events...
What I forgot to ask earlier, I'm assuming, you added also the itoo extension? Without that extension obviously background processing is not possible
Example 2: display the current weekday at alarm time
start a repeating alarm and at alarm time in the OnReceive event handler get the current weekday and display the notification using the StartNow method