title: Get calling context in a service
body: <p>So I'm working on a <code>service</code> that will handle requests to send data to a socket.</p>
  
  <p>I've done socket programming in a <code>service</code> before, but only within the same application. I'd like this to just sit and do nothing until any application wants to give it data to send. That's all well and good.</p>
  
  <p>I have register an <code>intent filter</code> and the usual stuff and can process the data. But I want to process the data coming from different activities in different threads (subsequent calls from the same application will be computed on the same thread).</p>
  
  <p>Is there a way to get the calling package or app or whatever? I'd prefer not to require passing in an identifier as an extra to prevent spoofing. (It's not a serious security concern, it's just each application needs its data processed in the order that it's received.)</p>