title: Android: ArrayList from Message
body: <p>My problem is convert a Message type in a ArrayList type.
  The code that i use is:</p>
  
  <pre><code>private final ResponseHandler&lt;String&gt; myResponseHandlerTopTen = new ResponseHandler&lt;String&gt;()
      {
      @Override
      public String handleResponse(HttpResponse response)
      throws ClientProtocolException, IOException
          {
          ...
          ArrayList arrayRow = new ArrayList();
          ...
          toMainThread(arrayRow);
          ...
          }
      }
  
  
  private void toMainThread(ArrayList message)
      {
      Message messageToSend = myHandlerTopTen.obtainMessage();
      messageToSend.obj = message;
      myHandlerCode.sendMessage(messageToSend);
      }
  
  myHandlerCode = new Handler()
      {
      @Override
      public void handleMessage(Message msg) {
          /* ## if msg is string: ##
          String ExtractData=msg.obj.toString();
          */
          /* msg is an ArrayList */
          ArrayList ExtractData=msg.obj. ?????
          }
      };
  </code></pre>
  
  <p>Using:</p>
  
  <pre><code>private void toMainThread(String message)
  </code></pre>
  
  <p>I can use</p>
  
  <pre><code>String ExtractData=msg.obj.toString();
  </code></pre>
  
  <p>but using:</p>
  
  <pre><code>private void toMainThread(ArrayList message)
  </code></pre>
  
  <p>I must use ??</p>
  
  <p>Thank's, very very thank's for answer ;-)
  Daniele.</p>