So here's the deal... I've got to silence the user's phone when they have class. So I need an alarm to go off daily at a specific time, for each class.
So I'm thinking every class has their own alarm (interval set for a day). And the phone is silenced if class is in session the present day.
Here's my current code:
am.setInexactRepeating(AlarmManager.RTC_WAKEUP, startTime,
DAY_IN_MILLISECONDS, start);
Will setInexactRepeating() be accurate enough to silence the phone within a few minutes over a day interval?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…