I have an sms app underway that uses a service. Without going into detail, my preference is to have the service always running, but it does sometimes get killed. I can live with that but have looked at alternates to keep it alive and have tried (successfully) the following approach.
Using the Phone library I now also start the service when a phone call is either received or made, as well as the desired method of when an sms message is received.
The thought here is that it now gives the app three different intents to listen for that would restart the service if it fails.
While maybe not the ideal situation I wonder what the general feeling is on this approach. Is it 'acceptable' or 'totally bad' practice.
Using the Phone library I now also start the service when a phone call is either received or made, as well as the desired method of when an sms message is received.
The thought here is that it now gives the app three different intents to listen for that would restart the service if it fails.
While maybe not the ideal situation I wonder what the general feeling is on this approach. Is it 'acceptable' or 'totally bad' practice.