I'm writing a simple app that will turn wifi on or off when the screen turns on or off, respectively. I tried registering <receiver> tags for SCREEN_ON and SCREEN_OFF Intents, then defining two BroadcastReceiver classes to catch the Intents, but nothing is happening. I think it's because the app isn't running when the screen turns on or off, which means I need a service running that can pass the Intents to the BroadcastReceivers, right?
Anyway, I'm having trouble figuring out how to connect the BroadcastReceivers to my service, how would I go about this?
Anyway, I'm having trouble figuring out how to connect the BroadcastReceivers to my service, how would I go about this?