Question: What are the parameters of the following: 

```
alarmMgr.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),
                AlarmManager.INTERVAL_FIFTEEN_MINUTES, alarmIntent);

```

And of the following: 

```
alarmMgr.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),
        AlarmManager.INTERVAL_DAY, alarmIntent);

```

What is the difference and also how are the two different in terms of functionality?

Answer: 
**Decide how precise your alarm needs to be**

Choosing the alarm type is often the first step in creating an alarm. A further distinction is how precise you need your alarm to be.

For most apps, **`setInexactRepeating()`** is the right choice. When you use this method, **Android synchronizes multiple inexact repeating alarms and fires them at the same time**. This reduces the drain on the battery.

For the rare app that has rigid time requirements as example, the alarm needs to fire **precisely** at 4:00 p.m. everyday then use **`setRepeating()`**.

Reference: [Decide how precise your alarm needs to be](http://developer.android.com/training/scheduling/alarms.html#set)
**setRepeating is more accurate** and **setInexactRepeating is for saving battery but no accurate** , setInexactRepeating is good for maintenance in background for example and setRepeating is necessary for example for alarm clock .