So after wading through reams of (sometimes contradictory) documentation and online discussion about how to build a persistent background service on the Android platform, I finally got it working this weekend, sounding alarms even when the client isn't open or the device is asleep. There are some rough edges to smooth over on it, but it was really gratifying to see it working. Next is creating a user interface to build alarms. This is where one of the key advantages will lie: the ability to group tasks into “schedules,” allowing the user to enable or disable the entire schedule easily, instead of having to enable or disable each task individually.
I got another idea this weekend: Imagine that while you're at work, your spouse remembers that you need to leave to pick up the kids from school on Wednesday at 2:10 pm. Instead of having to call you and you having to enter it manually into Android Brain, the idea is that they could simply text you the reminder, something like this:
Wed 2:10 pm Pick up kids from school
Android Brain would monitor texts as they come in, recognize anything that looks like an appointment, and automatically schedule it, with no intervention on your part. This is something that wouldn't be in the first pass, but would definitely be a cool feature.
It does present some interesting challenges, though. How would Android Brain distinguish between appointments and other texts? First, it would probably be desirable to have a whitelist that dictates who is allowed to set appointments for you. Second, we could assume that the sender knows you have Android Brain and is intentionally writing the text to be intercepted. We could therefore establish a rule that says the text must start with the time for the appointment.
Third, Android Brain could tokenize the text and try to parse each token as a potential piece of time information. The first token that doesn't parse would be the first word in the label. Then it would need to look at what pieces of time information it got and see if that's enough to schedule it. In the case of the above example, it would recognize
pm as time parts and construct the time to sound the alarm. But say it was given this text:
May we come visit?
May would parse as being a month, and if we were particularly forgiving,
we might be interpreted as “Wednesday,” but
come wouldn't parse. Since “May” and “Wednesday” all by themselves don't give enough information to schedule an appointment, Android Brain would correctly deduce that this is an unrelated text and do nothing.
Android Brain ought to be forgiving and allow some parts of the time to be omitted, but I'm not sure how it ought to handle some ambiguous situations. For example, say it gets this message:
8:00 Call Joe
My inclination is that the rules that Android Brain follows ought to be as simple as possible, so that it is easy for users to know how it will act. So I think that the rule ought to be “Android Brain will use the first time that matches what was written.” So if the above message came in at 7:30 am, it would schedule the alarm to go off in half an hour. If it came in at 8:30 am, it would remind you to call Joe at 8 pm that evening. If it arrived at 8:30 pm, it would sound the alarm tomorrow at 8 am.
Still, it might also help to be able to configure an “appointment window.” For example, if the
pm indicator were left off the appointment to pick up the kids from school, a human would still deduce that the intended time was 2:30 pm, not am, because kids don't get out of school in the middle of the night. If Android Brain were able to be configured to only accept appointments from, say 7:00 am and 9:00 pm, it would then be able to resolve the ambiguity correctly, since only 2:10 pm falls within that window.
Anyway, it's an enticing idea, but first things first: the editing GUI.