Hi,

i have a big problem with my Service.
My Service-Class overrides the onStart method inherited from Service.
I can not create a socket with a specific address and port inside this
Service. Every time my application hangs there and the emulator shows
a message box that there is no response from my application.

All i want to do is to create a socket in the OnStart-method:

        public void onStart(Intent intent, int startId) {
                SetServerAndPort();
                try {
                        this.tcpListener = new Socket(this.serverAddress, 
portNumber);
                } catch (UnknownHostException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
        }

Internet permission for the application and especially for the service
are set.
Can you tell me what´s wrong here?

Thanks in advance
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to