title: flutter - background listener of MethodChannel
body: <p>My app sends file to ftp server. I am sending file with java on android via MethodChannel. </p>
  
  <p>These parts are okay for doing all the stuff in single thread. But I would like to send file with AsyncTask (java) and background. </p>
  
  <p>Also I need to send result of file upload result to Flutter with MethodChannel. </p>
  
  <p>How can I do that?
  I tried to user MethodChannel.Result on AsyncTask's doInBackground but it gaves me this error:</p>
  
  <pre><code> Caused by: java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: AsyncTask #2
  </code></pre>