If you set an alarm to repeat annually starting on 2/29/16, would you expect the next instance on 2/28/17, 3/1/17, or 2/29/20?
Design for the user's likely intent
It's overwhelmingly likely that the user who indicates Annually wants the alarm to repeat annually. Allowing the leap-year technicality to prevent the alarm from going off annually is a violation of likely user intent.
The question then becomes, how to deal with the leap year? There are three possibilities:
- Prevent the user from selecting February 29th, since that date doesn't exist in non leap years.
- Snap to February 28th for subsequent years, and 29th (or 28th) for subsequent leap years.
- Snap to the next day (March 1st), as per #2.
It's more likely that users will want "annually" to mean every year, so #1 is not a great option. #3 is also not great visually since it involves snapping to another month. So #2 is the remaining reasonable option.
Now, you will need to inform the user since the date will be different in subsequent years. Since you're on Android, a good way to do this is to use a toast which can pop up to inform that user:
- This annual alarm will go off on February 28th when it isn't a leap year.
My gut reaction would be the last day of the month... so 2/28/17. But there's so much guess work involved that I think you're better off to give the user a preview before having them set the alarm. So if that's not what the user want, they can edited it before saving.
So something like:
The alarm will go off on: 2/29/16, 2/28/17, 2/28/18 ... until the alarm is turned off