intentService : why my onHandleIntent is never called?
<p>I'm working with android xml rpc to mount a server. For that I'm using and intentService. The only problem is that when the server class is launched, my onHandleIntent which contains the server is never called. </p>

<p>I've made some research and I found someone who had the same problem, he managed solving it by using <strong><em>super class</em></strong> but I'm new in programming and didn't manage to do what he did ==> <a href="http://groups.google.com/group/android-beginners/browse_thread/thread/eedecfdd0ddac430/f1c52d3a2e798bc6#f1c52d3a2e798bc6">link</a></p>

<p>Here is my code:</p>

<pre><code>package tfe.rma.ciss.be;

import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.DefaultHandler;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlrpc.android.MethodCall;
import org.xmlrpc.android.XMLRPCServer;

import android.app.IntentService;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;

import java.io.IOException;
import java.io.StringReader;
import java.net.MalformedURLException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

public class Server extends IntentService {
   public String myData="";
   public String streamTitle = "",path="";

   public void onCreate() {

        Log.d("Server", "&gt;&gt;&gt;onCreate()");

    }

    public Server() {
        super("Server");


    }
    public void onStart (Intent intent, int startId) {
        Log.d("Server", "&gt;&gt;&gt;Started()");    }
    @Override
    protected void onHandleIntent(Intent intent) {
        Log.d("Server", "&gt;&gt;&gt;handlingIntent()");
        try {
            ServerSocket socket = new ServerSocket(8214);
            XMLRPCServer server = new XMLRPCServer();
            Log.d("Server", "&gt;&gt;&gt;opening on port" + socket);
            while (true) {
                Socket client = socket.accept();
                MethodCall call = server.readMethodCall(client);
                String name = call.getMethodName();
                if (name.equals("newImage")) {
                    ArrayList&lt;Object&gt; params = call.getParams();
                    // assume "add" method has two Integer params, so no checks done
                   myData = (String)( params.get(0));
                    //int i1 = (Integer) params.get(1);
                    server.respond(client, new Object[] {200});
                    /*intent = new Intent (this, ParseFunction.class);
                 startService (intent);  */

                    Toast.makeText(this, myData, Toast.LENGTH_SHORT).show();  
                    Log.d("ParseFunction", "&gt;&gt;&gt;Started()"); 

                    Intent i = new Intent( this, B.class );

                    i.putExtra( "Azo", myData);


                   i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    startActivity( i );

                } else {
                    server.respond(client, null);
                }
            }
        } catch (IOException e) {
            e.printStackTrace();
        } catch (XmlPullParserException e) {
            e.printStackTrace();
        }

    }

  }
</code></pre>
