UpdateService - Getting thread exiting with uncaught exception

Forums » Android - Learning Android book > UpdateService - Getting thread exiting with uncaught...
March 5, 2012 3:41:22 PM PST (one year ago). Seen 954 times. One reply.
Photo Sushil Arige
Personal
Member since Mar 5, 2012
Forum Posts: 2
Hi Marko, Thanks for posting Android class online.

While working on updateService I am getting below error msg even though I am running it outside of main thread

UpdateService - Getting thread exiting with uncaught exception, FATAL Exception: Thread-114

--Code --
public int onStartCommand(Intent intent, int flags, int startId) {
//Log.d(TAG, "OnStarted");
//running = true;
new Thread() {
@Override
public void run() {

try {
List<Status> timeline = twitter.getPublicTimeline();
for (Status status : timeline) {
Log.d(TAG, String.format("%s: %s", status.user.name,
status.text));
}

try {
Thread.sleep(DELAY);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} catch (TwitterException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}.start();

------


---
Before that while starting emulator I see below error msg, is it something to do with my network?

I also see NetworkManagementSocketTagger( 91): setKernelCountSet(10009,0) failed with errorno -2

March 5, 2012 4:42:09 PM PST (one year ago)
Photo Sushil Arige
Personal
Member since Mar 5, 2012
Forum Posts: 2
Please ignore above error msg. I figured it out. My twitter object was not getting set correctly. Thanks