Practice parsing data from the internet

Overview

InspirationalQuotesExercise

A small Android project to practice executing network requests and parsing the network response

This app uses the ZenQuotes API to generate an inspirational quote. Specifically, we will be using the https://zenquotes.io/api/random endpoint. Note that on a free account, you can only call the API 5 times every 30 seconds. Once you've reached that limit, you will no longer receive a valid response.

The app currently doesn't work and requires a few fixes. This exercise takes you through the steps to produce a fully working app as pictured below.

  1. Clone this repo and import the project into Android Studio
  2. Launch the project on your Android device or emulator. Notice that the app is crashing on launch right now!
    a) Fix the crash by looking at the logs to see what caused the crash. (Hint: There's a TODO in ZenQuotesApiService)
    b) See solution for fixing crash here
  3. Notice that unfortunately, there are still no quotes being displayed in the app. This is because the Quote class is currently incomplete. It should be parsing the JSON object for a Quote. The documentation for the response object is here: https://premium.zenquotes.io/zenquotes-documentation/#api-response. Use the documentation to complete the Quote class.
    a) See how this is done in the Android Basics codelab on Step 8 for the @Json Annotation section
    b) See solution here
  4. The last step is to set up an onClickListener for the button in the app to display a new quote.
    a) See solution here
  5. Bonus step: Right now the app only displays the quote. But part of the response also includes the author of the quote. Display the author of the quote along with the quote itself!
You might also like...
Practice on connecting to internet and getting data from internet app. This gets Mars photos

MarsPhotos - Starter Code Starter code for Android Basics in Kotlin. Introduction Using this stater code you will create MarsPhotos is a demo app that

General purpose parsing framework. Simplify parsing of text

General purpose parsing framework. Simplify parsing of text. Allows capture complex nested formats with simple and human-readable syntax.

A small Android project to practice executing network requests and parsing the network response
A small Android project to practice executing network requests and parsing the network response

InspirationalQuotesExercise A small Android project to practice executing network requests and parsing the network response This app uses the ZenQuote

A simple library for parsing and playing links from YouTube, YouTube Music, Vimeo and Rutube is WebView without the need to connect api data services. Request caching is available now
A simple library for parsing and playing links from YouTube, YouTube Music, Vimeo and Rutube is WebView without the need to connect api data services. Request caching is available now

Android Oembed Video A simple library for parsing and playing links from YouTube, YouTube Music, Vimeo and Rutube and others in the WebView without th

A Kotlin-based testing/scraping/parsing library providing the ability to analyze and extract data from HTML
A Kotlin-based testing/scraping/parsing library providing the ability to analyze and extract data from HTML

A Kotlin-based testing/scraping/parsing library providing the ability to analyze and extract data from HTML (server & client-side rendered). It places particular emphasis on ease of use and a high level of readability by providing an intuitive DSL. It aims to be a testing lib, but can also be used to scrape websites in a convenient fashion.

an easy to use android library to let devs know how much internet-data their app is consuming
an easy to use android library to let devs know how much internet-data their app is consuming

EasyAnalytics! an easy to use android library to let developers know how much internet-data their app is consuming. We can identify this as we want ba

Starter code for getting and saving data from the Internet using Kotlin.

Doggos Description Doggos is an app that fetches (pun intended) information from a third party API. The API returns data about a random dog that conta

An easy to use android library to let devs know how much internet-data their app is consuming
An easy to use android library to let devs know how much internet-data their app is consuming

EasyAnalytics! an easy to use android library to let developers know how much internet-data their app is consuming. We can identify this as we want ba

Starter code for Android Kotlin Fundamentals Codelab 8.1 Getting data from the internet

MarsRealEstate - Starter Code Starter code for Android Kotlin Fundamentals Codelab 8.1 Getting data from the internet Introduction MarsRealEstate is a

Solution code for Android Kotlin Fundamentals Codelab 8.1 Getting data from the internet

MarsRealEstateNetwork - Solution Code Solution code for Android Kotlin Fundamentals Codelab 8.1 Getting data from the internet Introduction MarsRealEs

Generic AST parsing library for kotlin multiplatform

kotlinx.ast kotlinx.ast is a generic AST (Abstract Syntax Tree) parsing library, Kotlin is currently the only supported language. The library is desig

High level parsing to ensure your input is in the right shape and satisfies all constraints that business logic requires.

Parsix High level parsing to ensure your input is in the right shape and satisfies all constraints that business logic requires. It is highly inspired

Plugin and Desktop app for parsing layout xml into Composable code

composed-xml Inspired by - Recompose composed-xml is a tool for parsing Android layouts into Jetpack Compose code. It can work as both Desktop app or

KtRssReader is a Kotlin library for parsing RSS feed.

KtRssReader is a Kotlin library for parsing RSS feed.

Parsing and re-packing Android boot.img/vbmeta.img, supporting Android 12(preview)
Parsing and re-packing Android boot.img/vbmeta.img, supporting Android 12(preview)

Android_boot_image_editor A tool for reverse engineering Android ROM images. Getting Started install required packages Mac: brew install lz4 xz dtc Li

An advanced environment variable parsing library for Kotlin.

EnvSchema An advanced environment variable parsing library for Kotlin. Features Supported features Parsing of objects Parsing of nested objects Custom

Tired of manually setup test data of Kotlin data classes or POJOs? Instantiator creates Instances of any class for you so that you can focus on writing tests instead of spending time and effort to setup test data

Instantiator Tired of manually setup test data of Kotlin data classes or POJOs? Instantiator creates Instances of any class for you so that you can fo

A Clean Architecture App that uses clean Architecture (app, presentation, domain, data) packages to use coffee items API using MVVM Architecture, Coroutines, Retrofit2, Pagination, Live Data, Data Binding, Hilt , SOLID Principles , Navigation Component , RoomDb. An app that is a one-stop destination for all the CS enthusiasts, providing resources like Information scrapping techniques, best YT channels, courses available free-of-cost, etc.  & knowledge about every domain and field that exists on the Internet related to Computer Science along with News, Jobs, and Internships opportunities in these domains along with valuable tips and hacks from mentors for a particular domain.
An app that is a one-stop destination for all the CS enthusiasts, providing resources like Information scrapping techniques, best YT channels, courses available free-of-cost, etc. & knowledge about every domain and field that exists on the Internet related to Computer Science along with News, Jobs, and Internships opportunities in these domains along with valuable tips and hacks from mentors for a particular domain.

An app that is a one-stop destination for all the CS enthusiasts, providing resources like Information scrapping techniques, best YT channels, courses available free-of-cost, etc. & knowledge about every domain and field that exists on the Internet related to Computer Science along with News, Jobs, and Internships opportunities in these domains along with valuable tips and hacks from mentors for a particular domain.

Owner
Ayana Bando
Career transitioner and mother of 4
Ayana Bando
A small Android project to practice executing network requests and parsing the network response

InspirationalQuotesExercise A small Android project to practice executing network requests and parsing the network response This app uses the ZenQuote

Caren 0 Oct 13, 2021
Starter code for getting and saving data from the Internet using Kotlin.

Doggos Description Doggos is an app that fetches (pun intended) information from a third party API. The API returns data about a random dog that conta

Latifah President 0 Nov 4, 2021
No Internet Layout Library 2.5 0.0 Java #layout #check_internet

No Internet Layout Library Library to check internet connection and change layout to no internet layout if there is no internet. Gradle: allprojects {

Mohamed Wessam 116 Dec 20, 2022
Light library to check internet connection in android apps easily.

check-internet-android Light library to check internet connection in android apps easily. It checks real internet connection by connecting to Google's

Raheem 7 Nov 15, 2022
consumo de internet cortesia de google developers

MarsRealEstateFinal - Solution Code Solution code for Android Kotlin Fundamentals Codelab 8.3 Filtering and detail views with internet data. Introduct

null 0 Nov 3, 2021
CheckInternetConnection - CheckInternetConnection helps to find out if user`s Android device is connected to Internet or not

Check Internet Connection CheckInternetConnection helps to find out if user`s An

Hamed.D 1 Jan 16, 2022
WideFi - Internet sharing without Root

widefi Internet sharing without Root What Share your Android device's Internet connection with other devices without needing Root. WideFi works by cre

pyamsoft 18 Dec 28, 2022
An App to download a file from Internet by clicking on a custom-built button

LoadApp LoadApp is an app to download a file from the Internet by clicking on a custom-built button where: Width of the button gets animated from left

Anas Tariq 2 Aug 29, 2022
Pluto is a on-device debugger for Android applications, which helps in inspection of HTTP requests/responses, capture Crashes and ANRs and manipulating application data on-the-go.

Pluto Pluto is a on-device debugger for Android applications, which helps in inspection of HTTP requests/responses, capture Crashes and ANRs and manip

Mocklets 8 Aug 22, 2022
Monitoring water tanker level using NodeMCU ESP8266 and HC-SR04P Ultrasonic Sensor and broadcasting it using a simple HTTP server inside NodeMCU ESP8266 and show data in an Android App

WaterLevel Preface This project aims to finding a tanker water level using NodeMCU with ESP8266 core and HC-SR04P Ultrasonic sensor and broadcasting i

YaMiN 12 Dec 20, 2022