[PAID] ⏰ Alarm Manager Extension with Notification or Autostart

Thank you for your message. You received an email with a link to the download folder, which gives you access to the following files

  • TaifunAlarmManager.aix:Use the full version of the extension if you need to open the app above the lockscreen
  • TaifunAlarmManagerKODULAR.aix:Use the Kodular version of the extension if you are developing in Kodular and need to open the app above the lockscreen
  • TaifunAlarmManagerLITE.aix: Use the lite version if you do NOT need to open the app above the lockscreen
  • simple.aia: example project as simple as possible to show a notification at alarm time
  • alarmmanager.aia: example project to show the main features of the extension in startMode OnlyNotification
  • lockscreen.aia: example project to open the app above the lockscreen
  • itooNow.aia: example project to show how to use the StartNow method to open the app above the lockscreen from background processing

I will send you again the link in a PM - private message. For further questions concerning accessing the extension please contact me by PM. Thank you.

Taifun

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

Taifun

Is rhere an event available, which gets triggered if the connection was successful?

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

Taifun

How to create dynamic alarms using the alarmmanager extension

Example 1: display a random message at alarm time

start a repeating alarm and at alarm time in the OnReceive event handler pick a random text and display the notification using the StartNow method


dynamic1a

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


Taifun

2 Likes