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 Adding a Different Icon for Older Menus

Gamal Ali
seal-mask
.a{fill-rule:evenodd;}techdegree
Gamal Ali
Front End Web Development Techdegree Student 4,907 Points

Blog Reader

I have uploaded the application to my phone, and I have noticed that my blog reader application does not work when I am not using wi-fi. Is there a reason for this @benjakuben?

1 Answer

Guilherme Mendonca
Guilherme Mendonca
3,064 Points

Hello Gamal,

If its not to late to answer your question, I think I have it.

In the Android Documentation (http://developer.android.com/reference/android/net/ConnectivityManager.html)

if you go to the method "getActiveNetworkInfo()", used in the Blog Reader project, it says that this method returns details about the currently active DEFAULT data network.

I think you can't use the app because your Wi-Fi is the default network, so when its offline, it returns "null" details.

Probably to use this app with either Wi-fi and 3G, you should use the method "getAllNetworkInfo()".

Hope I helped =)