Can anyone please tell me if it is possible to "wake up" my Android service as soon as there's an incoming SMS event? What I meant to say is that, whenever an SMS is received, there will be a system-wide broadcast of this event. Can I intercept this broadcast to start my own background service? I know, it's not possible to run my service permanently in the background (not to mention it's a bad design practice).
Any help would be highly appreciated!
EDIT: Adding more detail to my original question. My broadcast receiver will be wrapped inside a service class. But there is a chance the Android will kill my background service in the event of memory crunch. In that case, even if there is an incoming SMS, my service won't be fired. How can I deal with this situation? This was the main intent of the question. I know it's not possible to run my service permanently in the background (or is it possible? perhaps if I have root access?)