title: How to pass Remote Interface (aidl) throughout Activities?
body: <p>I am developing an application using services and Remote interface. </p>
  
  <p>I have a question about passing the reference of my Remote interface throughout Activities.</p>
  
  <p>In my first Activity, I bind my service with my activity, in order to get a reference to my interface I use </p>
  
  <pre><code>private ServiceConnection mConnection = new ServiceConnection() {
  
          @Override
          public void onServiceConnected(ComponentName arg0, IBinder service) {
              x = X.Stub.asInterface(service);
  
          }
  
          @Override
          public void onServiceDisconnected(ComponentName arg0) {
              // TODO Auto-generated method stub
  
          }
  
      };
  </code></pre>
  
  <p>x being the reference to my interface.
  Now I would like to access this interface from another activity, I see two ways to do it but I don't know which one is the "proper" way to do it :</p>
  
  <ul>
  <li>passing x with my intent when I call the new Activity</li>
  <li>redo <code>this.bindService(new Intent(y.this,z.class), mConnection, Context.BIND_AUTO_CREATE);</code> in the onCreate() of my new Activity</li>
  </ul>
  
  <p>What would you advice me to do ?</p>