title: Android asynchronous AIDL
body: <p>I have a main app and a remote service app that connects each other using AIDL. </p>
  
  <p>I'm doing synchronous process successfully in remote service, but how can I do an asynchronous process?</p>
  
  <p>My AIDL file is this: </p>
  
  <pre><code>import pack.addonlibrary.Action; /* parcelable */
  
  interface IAddon {
      void onBind();
      void onUnbind();
  
      int getCallbacks();
  
      List&lt;Action&gt; onPageStarted(String url);
      List&lt;Action&gt; onPageFinished(String url);
  
      List&lt;Action&gt; onClicked(String url);
  
      List&lt;Action&gt; onUserConfirm(boolean cancelled);
      List&lt;Action&gt; onUserInput(String input, boolean cancelled);  
  
  }
  </code></pre>
  
  <p>In my remote service, I want to this: </p>
  
  <pre><code>@Override
  public List&lt;Action&gt; onClicked(String url) {   
    httpRequest() =&gt; onFinish() =&gt; showToastInClient(result)
    //shows toasts in main app
  }
  </code></pre>