For normal synchronization operations, you can use a handler
Only from the foreground. Any other use of the Handler for a long-term survey is unreliable at best, even ignoring your fears about uptime calculations.
Define action for your anxiety
It's not obligatory. This is not even a good idea.
Create a receiver (either by creating a dedicated receiver class, either by declaring it as a manifest, or by implementing an interface, registering the receiver with registerReciever and unregistering it)
If you want the event to occur when you are not in the foreground and the alarm goes off when the device is sleeping ( _WAKEUP alarms), a registered receiver is required. If _WAKEUP not required, service will be sufficient. If you only need to be in the foreground and receive an event in action, use createPendingResult() to give you a PendingIntent that will call onActivityResult() your activity. Although in this latter case it would be wiser to use postDelayed() for a View or Handler .
and keep the pending intent if you want to cancel the alarm
If saving the PendingIntent is an option, then the Handler is all you need and the AlarmManager unusable. To cancel the alarm, you need the equivalent of PendingIntent (the one where the main Intent objects correspond based on filterEquals() and where the PendingIntent operation [activity, service, broadcast] is the same).
If you want to cancel the alarm, cancel it using the saved pendingIntent
No, you cancel it by creating an equivalent PendingIntent .
If you decide to have multiple intentions or intentions with data changes, you will have to save all of them in order to subsequently clear the alarm manager
No, you cancel them by creating the equivalent of PendingIntent .
Is there an easy way to delay the exectuion based on the "wallclock", for example, through the open source shell around the AlarmManager?
Creating a wrapper code for this, covering 80% of the work, would take less time than writing your question. I do not know about a separate library for this, partly because there would not be so many.
Or use ScheduledExecutorService and WakeLock for short-term things. This is not suitable for βevery 15 minutesβ scenarios, as it constantly wakes up the device.