알람매니저를 현 시간부터 계속 interval 시간마다 호출하기 위해
AlarmManager alarmManager = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
Intent intent = new Intent(context, WifiAlarmService.class);
PendingIntent operation = PendingIntent.getService(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
alarmManager.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, System.currentTimeMillis(), interval, operation);
이렇게 구현하였습니다.
System.currentTimeMillis() 를 하면 현재시간이니 바로 알람에 등록한 서비스가 깨어날거라 생각했는데
서비스가 깨어나질 않네요 .. adb로 dumpsys 해보면 알람이 등록은 돼 있는데 말입니다.
현재 시간부터 바로 알람을 실행하고싶은데 어떻게 하면 될지 도움좀 부탁드립니다.