title: How can I create an android service that dalvik will not kill?
body: <p>Before I begin my question, I want to preface this with: I KNOW IT'S A BAD IDEA TO FORCE A SERVICE TO RUN FOREVER... I simply do not care.</p>
  
  <p>This application is not for consumer use. It is not going on the app store. It is for my use only.</p>
  
  <p>Alright, well I have this unused HTC Sensation running 4.0.3 (ICS) sitting around, and I have volunteered it to a local theatre for a task. The task is for it to ring on cue whenever it is needed in the show. We don't want a sim card in it because someone might accidentally call the phone during the show when it is not supposed to ring.</p>
  
  <p>So I created a fake phone application that receives a signal via TCP from a server that I have set up to send signals to devices over the LAN. Right now I have the listener running in an infinite loop in a service. I am, however, still experiencing the service not responding to the TCP signals.</p>
  
  <p>I would really appreciated it if some android guru's could give me some hints/tips for making this service as reliable as possible, good/bad coding techniques aside I want to do everything possible to make this service unkillable. This phone has only one job now, and that is to always be listening for incoming messages, no matter what.</p>
  
  <p>Things I have done so far:</p>
  
  <p>Created a Service (and launched a separate thread from that service)
  Used startForeground(id, notification);
  Activated DeviceAdmin and created a wakelock</p>
  
  <p>anything else you guys can think of?</p>