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

Joan Guerra Makaren
Joan Guerra Makaren
4,067 Points

Blog Reader app won't work with mobile data only wifi

Is there a reason why the Blog Reader app without modifications doesn't work with mobile data, only Wifi?

I created the app following the track steps, and tried to use it witouth wifi only mobile data and always get the message of error we created (not the toast for network down)

Perhaps Ben Jakuben can give me a hint

3 Answers

Joan Guerra Makaren
Joan Guerra Makaren
4,067 Points

Here's my log cat from when I click the run app icon until i disconnect my device Ben Jakuben

http://pastebin.com/AuJ1WeGj

Ben Jakuben
Ben Jakuben
Treehouse Teacher

Thanks! Check out the error here:

08-05 19:17:19.505: E/MainListActivity(17724): org.json.JSONException: Unterminated string at character 5843 of {"status":"ok","count":20,"count_total":1806,"pages":91,"posts":[{"id":23968,"url":"http:\/\/blog.teamtreehouse.com\/short-introduction-minitest","title":"How to Use MiniTest","date":"2014-08-04 14:07:18","author":"Jason Seifer","thumbnail":"http:\/\/blog.teamtreehouse.com\/wp-content\/uploads\/2014\/08\/clipboard-150x150.jpg"},{"id":23944,"url":"http:\/\/blog.teamtreehouse.com\/kids-learn-play","title":"How Do Kids Learn Tech?","date":"2014-08-01 09:04:05","author":"Joy Kesten","thumbnail":"http:\/\/blog.teamtreehouse.com\/wp-content\/uploads\/2014\/07\/joy_1-150x150.jpg"},{"id":23955,"url":"http:\/\/blog.teamtreehouse.com\/refer-friends-get-treehouse-free","title":"Refer a Friend and Get Treehouse for Free!","date":"2014-07-31 12:00:20","author":"Gill Carson","thumbnail":"http:\/\/blog.teamtreehouse.com\/wp-content\/uploads\/2014\/07\/refer-150x150.jpg"},{"id":23910,"url":"http:\/\/blog.teamtreehouse.com\/modular-pseudo-elements-sass","title":"Modular Pseudo-E???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

This is a known issue with the blog reader code. Check the Teacher's Notes on the video page for a solution. I'll also be refreshing this course next, though it'll be at least a month before it's available.

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

Can you copy and paste details about the error from logcat? It should work over mobile data as well. If there aren't any error details in logcat, can you try stepping through the code using the debugger?

Joan Guerra Makaren
Joan Guerra Makaren
4,067 Points

Awesome! it all works flawlessly now thanks Ben Jakuben I can even request data from other blogs

Now one more little thing:

Do you know if the JSON API for wordpress has changed since the only way i can parse the data from other blogs i own is with the get_recent_posts method and there is no get_recent_summary