Код: Выделить всё
AlarmManager am = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
Intent intent = new Intent("net.arkellyga.checkservice");
intent.putExtra("text", etmessage.getText().toString());
pendingIntent = PendingIntent.getService(this,0,intent,PendingIntent.FLAG_CANCEL_CURRENT);
// If service working now.
am.cancel(pendingIntent);
Log.i("AlarmManager", "Start working from " + d.getHours() + ":" + d.getMinutes());
am.set(AlarmManager.RTC, d.getTime(), pendingIntent);
am.setInexactRepeating(AlarmManager.RTC, d.getTime(), 60000, pendingIntent);
Подробнее здесь: https://stackoverflow.com/questions/316 ... armmanager