Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;

public class Main {
    public static void setAlarm(Context context, PendingIntent intent, long time) {
        AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
        alarmManager.set(AlarmManager.RTC_WAKEUP, time, intent);
    }
}