Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Professional Android 4 Application Development
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Android 4 Application Development
This is the forum to discuss the Wrox book Professional Android 4 Application Development Reto Meier; ISBN: 978-1-1181-0227-5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android 4 Application Development section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 5th, 2014, 06:07 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 6 Earthquake NetworkOnMainThread exception using code from book

Like a lot of people I've encountered a NetworkOnMainThread exception. However, this is still occurring for me even after using the code from the book with the Thread and the Handler.

I've posted a question about this on StackOverflow at http://stackoverflow.com/questions/2...xample-in-prof (but couldn't tag it with PA4AD as Reto suggested since I don't have enough reputation).

Why is this still happening even though the code is doing the XML download and parsing on a separate thread?
Reply With Quote
  #2 (permalink)  
Old August 5th, 2014, 06:10 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

My mistake!

I accidentally typed t.run() instead of t.start()!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 7 Earthquake 2, Earthquake.java, error onActivityResult dbomberg BOOK: Professional Android 2 Application Development 2 November 30th, 2012 05:52 AM
chapter 7, earthquake, NullPointer Exception Mounika BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 4 February 3rd, 2012 03:09 AM
Bug: Code Example Chapter 10 Earthquake 3 keling BOOK: Professional Android 2 Application Development 1 January 12th, 2012 05:03 PM
Chapter 7 Part 2 Earthquake Exception clombardo BOOK: Professional Android 2 Application Development 3 April 29th, 2010 11:46 AM
Getting Exception after the Correction -for Chapter 6 Part 2 Earthquake project clombardo BOOK: Professional Android 2 Application Development 1 April 26th, 2010 07:03 AM



All times are GMT -4. The time now is 04:36 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.