I want to make some external service monitor and be notified on problems as fast as possible.
I tried to set up AlarmManager with 1-2 minutes interval, but it looks like it fires randomly every several minutes.
Of course, I want to be safe from killing my background task by android, which would stop monitoring if I just use Service.
Is it possible to use AlarmManager in small, accurate intervals?
Which approaches are used in applications like Facebook, Gmail to notify about new messages?
Would it be better to make Service with startForeground and partial WakeLock?