I have a receive开发者_运维问答r in my app (public class SMSReceiver extends BroadcastReceiver) which works just fine - except when the screen turns off. After the screen has turned off, the receiver stops receiving SMSes. Is there any way to solved this?
I would say that you will have to start a service that will listen for these Broadcasts. this is what I am doing while listening for ON_TIMETICK, SCREEN_OFF, and SCREEN_ON. I could not get it to work any other way.
精彩评论