Add custom logic to existing device calendar



I am a newbie to Android programming and would like to build my first mobile application.

I have written a custom logic in Java that would automatically detected if the input dates are on the weekend or holidays and move them to the nearest weekdays. Why? My objective is to allow the user to save recurring dates every month that may or may not fall on the weekend. For example, if my pay dates are on the 10th and 25th of the month, there is no guarantee that they will fall on the weekdays of every month (Example: May 10, 2014 is on a Saturday. People don’t get pay on Saturday. The correct pay date would be May 9, 2014). Therefore, my method will take of care that for the user.

My question is. How can I integrate my custom logic into an existing device calendar. I have written a sample app in Android that I would allow me to select which calendar on my phone to display, but I don’t know how to create a custom feature so the user can take advantage of my logic. As of now, I have an android application that can display a calendar, and a stand alone Java program to handle the dates for pay cycle: weekly, biweekly, twice a month with custom dates and monthly. My android app is designed for the users who are paid twice a month with a custom dates.

Ideally, I would like to have the user selects “Repeat” and go from there.

Can you provide me some guidance on adding my custom logic to Android calendar?