Monday, March 7

Android Development - Android Lists and Adapters

Yesterday, I completed the course 'Android lists and adapters' on Treehouse. Thank you to my teacher Ben. He is really good. I got to learn new concepts and ways. And thank you to my cool husband who told me about Treehouse.
This also means that I completed developing the three-page Android App 'Stormy'. In the process, I used a third-party API (Forecast API), learned parsing JSON, learned networking (getting data from the web), using Listview, using Recycler view.
And I got to write a good amount of code.
I feel grateful, blessed :)

okhttp - http://eyesoftanushree.blogspot.in/2016/02/android-notes.html

Building 'Stormy':
1. First we need the URL from forecast. After login, copy your personalized URL.
2. Create an OkHttpClient object.
3. Build a request that the client will send to the server (forecast).
4. Put this request inside a Call object. We have a request wrapped up in a call.
5. Execute the call. The execute method returns a response object.
6. Check whether network is available or down, using an Android class called ConnectivityManager, and NetworkInfo class.

Errors: 1. NetworkOnMainThread error.
2. Permission denied: Missing Internet Permission.

p.s.: Attaching one of the snapshots below.

No comments:

Post a Comment