Android Alarm Create setAlarm(Context context, Calendar cal, PendingIntent pIntent)

Here you can find the source of setAlarm(Context context, Calendar cal, PendingIntent pIntent)

Description

set Alarm

Declaration

public static void setAlarm(Context context, Calendar cal,
            PendingIntent pIntent) 

Method Source Code

//package com.java2s;
import java.util.Calendar;

import android.app.AlarmManager;
import android.app.PendingIntent;

import android.content.Context;

public class Main {
    public static void setAlarm(Context context, Calendar cal,
            PendingIntent pIntent) {/*from w  w  w .  ja  v  a  2s.c  o m*/
        AlarmManager am = (AlarmManager) context
                .getSystemService(Context.ALARM_SERVICE);
        am.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), pIntent);
    }
}

Related

  1. setAlarm(Context context, Calendar calendar, PendingIntent pIntent)
  2. setAlarm(Context context, Calendar calendar, PendingIntent pIntent)
  3. setAlarm(Context context, Calendar calendar, PendingIntent pIntent)
  4. setAlarm(Context context, Calendar calendar, PendingIntent pIntent)
  5. setAlarm(Context context, Calendar calendar, PendingIntent pIntent)
  6. setAlarm(Context context, Calendar calendar, PendingIntent pIntent)
  7. setAlarm(Context context, Calendar calendar, PendingIntent pIntent)
  8. setAlarm(Context context, Calendar calendar, PendingIntent pIntent)
  9. setAlarm(Context context, Calendar calendar, PendingIntent pIntent)