private void scheduleCacheCleanup(Context context){
  if (!isAlarmActive(context)) {
    mAlarmManager.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP,SystemClock.elapsedRealtime() + CLEANUP_SCHEDULER_TIME_INTERVAL,CLEANUP_SCHEDULER_TIME_INTERVAL,CacheCleanupReceiver.makeReceiverPendingIntent(context));
  }
}

private void scheduleCacheCleanup ( Context context ) { if ( ! isAlarmActive ( context ) ) { mAlarmManager . setInexactRepeating ( AlarmManager . ELAPSED_REALTIME_WAKEUP , SystemClock . elapsedRealtime ( ) + CLEANUP_SCHEDULER_TIME_INTERVAL , CLEANUP_SCHEDULER_TIME_INTERVAL , CacheCleanupReceiver . makeReceiverPendingIntent ( context ) ) ; } }
helper method that uses alarmmanager to schedule cache cleanup at regular intervals .
