Skip to content

michlimlim/BookSearch

Repository files navigation

Book Search App

Android app that leverages the OpenLibrary API to search books and display cover images. This app is to be used as the base app for adding suggested extensions.

Imgur

Overview

The app does the following:

  1. Fetch the books from the OpenLibrary Search API in JSON format
  2. Deserialize the JSON data for each of the books into Book objects
  3. Build an array of Book objects and create an ArrayAdapter for those books
  4. Define getView to define how to inflate a layout for each book row and display each book's data.
  5. Attach the adapter for the books to a ListView to display the data on screen

To achieve this, there are four different components in this app:

  1. BookClient - Responsible for executing the API requests and retrieving the JSON
  2. Book - Model object responsible for encapsulating the attributes for each individual book
  3. BookAdapter - Responsible for mapping each Book to a particular view layout
  4. BookListActivity - Responsible for fetching and deserializing the data and configuring the adapter

Usage

This app is intended to be the base project on top of which new features can be added. To use it, clone the project and import it using the following steps:

Imgur

Suggested Extensions

  1. Use SearchView to search for books with a title
  2. Show ProgressBar before each network request
  3. Add a detail view to display more information about the selected book from the list
  4. Use a share intent to recommend a book to friends

Libraries

This app leverages two third-party libraries:

About

Search books

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages