create a pending intent using alarmamanager wakeup when ever you want to set up phone silent
for alarma manager check here
Frage
I'm making an Android app which would make the phone go on silent or in vibration mode at a user defined time.
I've learned how to toggle between silent mode to normal mode and to get the current time using calendar.
I want to know how can I turn my phone silent at a particular time even the app is not running?. Basically I want it to be like an alarm clock to make my phone silent.
Lösung
create a pending intent using alarmamanager wakeup when ever you want to set up phone silent
for alarma manager check here