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: 
Both examples schedule a repeating alarm that will send the given `alarmIntent`. On both cases, the first time it is sent will be immediate (`calendar.getTimeInMillis()` returns [the current time](http://www.tutorialspoint.com/java/util/calendar_gettimeinmillis.htm)). On both cases, the device will be woken up when the alarm needs to be sent (as evident by `AlarmManager.RTC_WAKEUP`).

There are two differences between these calls. The simpler one is that the intent will be sent every fifteen minutes on the first call, and every day on the second call (as you can see in the third parameter). The more complicated difference is the function call itself: `setRepeating` will schedule the first alarm for **exactly** every fifteen minutes; `setInexactRepeating` will schedule the second alarm for **approximately** every 24 hours, meaning it might deviate from that interval - with the advantage of consuming less power.

Do notice that this has changed in API 19, where these two calls are synonymous. See [this guide](http://developer.android.com/training/scheduling/alarms.html), and [this API documentation](http://developer.android.com/reference/android/app/AlarmManager.html).
Use setInexactRepeating() is used when app is not seriously used to required for example wake up early in the morning . if Alarm wake up approximately that time there is no any life dangeous. 
like medicine pills app where highly critical patient use that app to reminde nurse or doctor staff the is compulsory to use setRepeating().
 When you use setInexactRepeating()
then Android synchronizes repeating alarms from multiple apps and fires them at the same time(once). This reduces the total number of times the system must wake the device.
thus reducing drain on the battery.
repeating alarms are inexact. Note that while setInexactRepeating() is an improvement over setRepeating() also 
it can still overwhelm a server if every instance of an app hits the server around the same time. Therefore, for network requests, add some randomness to your alarms.