[Revising my question per @CommonWare's feedback]
I am trying to insert a record into a SQLite database for each SMS message the app receives from an external GPS transmitter (i.e., not from the phone's GPS). All SMS's are processed by my BroadcastReceiver ("SMSReceiver") which is registered in the Manifest with a priority of 999. The BroadcastReceiver aborts the broadcast if the SMS was sent by the GPS device and passes it on if not.
What is the best way of ensuring that that ALL SMS's are processed by my app while dealing with the possibility that the device may fall asleep or my process may be terminated?"
The BroadcastReceiver docs mention "for longer-running operations you will often use a Service in conjunction with a BroadcastReceiver to keep the containing process active for the entire time of your operation." This sounds like what I need but they provide no instructions on how to do that. Any guidance, especially with code examples, would be appreciated. And, in my case, the 'operation' needs to be active for as long as the phone is powered on.