public void SetAlarm(Context context, int sec)
{
AlarmManager am=(AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
Intent i = new Intent(context, Alarm.class);
PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0);
am.set(AlarmManager.RTC, System.currentTimeMillis()+1000*5 , pi);
i = new Intent(context, Alarm.class);
pi = PendingIntent.getBroadcast(context, 0, i, 0);
am.set(AlarmManager.RTC, System.currentTimeMillis()+1000*10 , pi);
}
onReceive が 10 秒後に 1 回だけ機能するのはなぜですか?