-1

Suppose you wake up at 00:00 AM and usually have an alarm ring half-way through the day at 12:00 PM.

But now you sleep in, and wake up at 02:00 AM. Is there an app that allows for you to "reset" such alarms (and in my case there is more than one) to (in this case) find the new half-way point (which is 02:00 PM) for your alarm?

I don't know what else to call this except "programmatic alarms" in Android. Does such a thing exist?

  • This seems quite unclear. – user186920 Feb 2 '17 at 9:15
1

I haven't seen an app that does that specifically, but such a thing would be possible.

In the Calendar API in Android, there are values to set AM/PM for a time (AM and PM, respectively). The midpoint you speak of is the same time just with this value changed. There really isn't any formula that would have to be implemented to make this really all that programmatic. Just switch those values.

Here is the reference to the API: https://developer.android.com/reference/java/util/Calendar.html

EDIT: Thinking about this a little bit more, if there is a function in the app to silence the alarm after a certain amount of time then if this extends to 12 hours (which is highly unlikely) your specific use case is covered. I think that it might be worthwhile finding an open source alarm app, editing and compiling your own version for personal use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.