title: How to transfer an object to the service?
body: <p>I have class that is declared in <strong>MainActivity</strong>:</p>
  
  <pre><code>public class MainActivity extends ListActivity {
  
   public class CommunicatorServiceImpl implements CommunicatorService{
  
      @Override
      public Communicator createCommunicatorThread(BluetoothSocket socket) {
          return new CommunicatorImpl(socket, new CommunicatorImpl.CommunicationListener() {
              @Override
              public void onMessage(final String message) {
                  runOnUiThread(new Runnable() {
                      @Override
                      public void run() {
                          textData.setText(textData.getText().toString() + "\n" + message);
                      }
                  });
              }
          });
      }
  
  
  }
  
  private final CommunicatorService communicatorService = new CommunicatorServiceImpl();
  
  }
  </code></pre>
  
  <p>I need to transfer <strong>communicatorService</strong> to the service. This object, along with the service, will use the thread. As I know, I can't transfer an object as an argument of the service constructor. How can I do this?</p>
  
  <p>Thanks in advance.</p>