I'm trying to catch socket errors (invalid ip, wrong port, etc.). It
seems like the ActivityManager is shutting me down before I have time
to catch these errors. I really have no idea what's going on here. My
splash screen Haus attempts to start the service from a thread,
however when the thread get's to the "about to create socket", it
simply locks up. It locks up the entire app until the Force Close
dialog box arrives.
I have Log.i all the way into the class that makes the connection...
04-07 22:15:29.286: INFO/CONNECTION(19053): 4368
04-07 22:15:29.296: INFO/CONNECTION(19053): establishConnection()
04-07 22:15:29.446: INFO/CONNNECTION(19053): about to create socket
04-07 22:15:34.036: INFO/ActivityManager(76): Displayed activity
com.scs.haus/.Haus: 8545 ms (total 8545 ms)
04-07 22:15:38.989: WARN/ActivityManager(76): Launch timeout has
expired, giving up wake lock!
I never see any of these Logs, except of course for the one that tells
me I'm inside the method.
public void establishConnection(){
Log.i("CONNECTION","establishConnection()");
try{
c = new Connection(adr,SERVERPORT,key);
} catch (UnknownHostException e) {
e.printStackTrace();
Log.e("CONNECTION","Exception:"+e);
} catch (IOException e) {
e.printStackTrace();
Log.e("CONNECTION","Exception:"+e);
} catch (Exception e) {
e.printStackTrace();
Log.e("CONNECTION","Exception:"+e);
}
}
Here is a snippet from the Connection class. I never see the"done
making socket" Log (unless of course I have a vaild ip and/or port).
Log.i("CONNNECTION","about to instanciate socket");
socket = new Socket(address,port);
Log.i("CONNNECTION","done making socket");
Any ideas what I've done wrong here?
Thanks,
J
--
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
To unsubscribe, reply using "remove me" as the subject.