How to receive/send broadcast while device in lock mode in Android

133 Views Asked by At

We have a Quick Setting for our application. Using the Quick Setting user can On and Off our application. For syncing application and Quick Setting, we are using broadcasts it is like client and server communication.

Like Quick Setting send a request by sending a broadcast to our application to send the state of the app as soon as the app receives this broadcast, Application sends status ON/Off broadcast and quick setting receive and show status to a user.

But this communication will break in one condition. Case User reboots the phone but did not unlock, and drag the quick-setting panel and go to our app quick setting tile but the user can't see the status of our app on Quick setting. Because of our quick setting not able to send a broadcast to our application.

How can we send/receive broadcast wile device in lock state?

0

There are 0 best solutions below