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

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

Description

set Alarm

Declaration

private static void setAlarm(Context context, Calendar calendar,
            PendingIntent pIntent) 

Method Source Code

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

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

import android.content.Context;

import android.util.Log;

public class Main {
    private static final String TAG = "com.example.lightwake.AlarmManagerHelper";

    private static void setAlarm(Context context, Calendar calendar,
            PendingIntent pIntent) {//from  ww  w  .j  a v a  2s .  co m
        Log.i(TAG, "setAlarm");
        AlarmManager alarmManager = (AlarmManager) context
                .getSystemService(Context.ALARM_SERVICE);

        alarmManager.set(AlarmManager.RTC_WAKEUP,
                calendar.getTimeInMillis(), pIntent);
    }
}

Related

  1. addReminderAlarm(Context context, Date date, String group, boolean toast)
  2. setAlarm( Class receiver, Calendar calendar, String action, Object... parameters)
  3. setAlarm(Context context, 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 cal, PendingIntent pIntent)
  9. setAlarm(Context context, Calendar calendar, PendingIntent pIntent)