Java tutorial
//package com.java2s; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; public class Main { public static boolean hasAlarm(Context context, Intent intent, int notificationId) { return PendingIntent.getBroadcast(context, notificationId, intent, PendingIntent.FLAG_NO_CREATE) != null; } }