How do I make my phone silent at a particular time, even when the Android app is not running?

StackOverflow https://stackoverflow.com/questions/22422179

Вопрос

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.

Это было полезно?

Решение

create a pending intent using alarmamanager wakeup when ever you want to set up phone silent

for alarma manager check here

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top