Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Blog Reader Android App Using Intents to Display and Share Posts Opening a Webpage in the Browser

Tom Simkins
Tom Simkins
2,486 Points

Stage 5 of BlogReader for Android issues getting data from web

So I was going along it was all working okay then i get to stage 5 and add the part that opens the webpage when one of the items is clicked when this code is added whenever the app fetches data it replies it is unable to get data and logcat gives this error message...

1219-1233/com.teamtreehouse.blogreader E/MainListActivity﹕ Exception caught org.json.JSONException: Unterminated string at character 2949 of {"status":"ok","count":10,"count_total":1800,"pages":180,"posts":[{"id":23911,"url":"http:\/\/blog.teamtreehouse.com\/jquery-plugins-html-tables","title":"jQuery Plugins for HTML Tables","date":"2014-07-29 12:24:28","author":"Nick Pettit","thumbnail":"http:\/\/blog.teamtreehouse.com\/wp-content\/uploads\/2014\/07\/stackable-150x150.png"},{"id":23906,"url":"http:\/\/blog.teamtreehouse.com\/developer-interview-paul-irish","title":"Developer Interview: Paul Irish","date":"2014-07-28 09:41:52","author":"Gill Carson","thumbnail":"http:\/\/blog.teamtreehouse.com\/wp-content\/uploads\/2014\/07\/paul_irish-150x150.jpg"},{"id":23930,"url":"http:\/\/blog.teamtreehouse.com\/treehouse-show-bloopers","title":"Sneak Peek: Behind the Scenes of the Treehouse Show","date":"2014-07-25 09:39:55","author":"Gill Carson","thumbnail":"http:\/\/blog.teamtreehouse.com\/wp-content\/uploads\/2014\/07\/bloopers-150x150.jpg"},{"id":23460,"url":"http:\/\/blog.teamtreehouse.com\/handle�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

This happens on allot of different plaforms HTC One Galaxy S4 Nexus 4

The nexus 5 also has the same problem but gives no error message

It fetches and displays data on the Galaxy S5 but when items on the list are clicked you get the error

1281-1281/com.teamtreehouse.blogreader E/MainListActivity﹕ Exception caught org.json.JSONException: No value for Url

On a nexus 4 clicking on the list items does nothing but there are no error messages

This is very very weird and i feel completly lost on what to do to get it working any wizzkids got some ideas?

1 Answer

Harry James
Harry James
14,780 Points

Hello!

I also had this problem.

The solution is here: https://teamtreehouse.com/forum/trying-to-retrieve-data-from-my-own-blog-help

Take a look at Huberts fix for an explanation :)