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.
The app does the following:
- Fetch the books from the OpenLibrary Search API in JSON format
- Deserialize the JSON data for each of the books into
Book
objects - Build an array of
Book
objects and create anArrayAdapter
for those books - Define
getView
to define how to inflate a layout for each book row and display each book's data. - 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:
BookClient
- Responsible for executing the API requests and retrieving the JSONBook
- Model object responsible for encapsulating the attributes for each individual bookBookAdapter
- Responsible for mapping eachBook
to a particular view layoutBookListActivity
- Responsible for fetching and deserializing the data and configuring the adapter
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:
- Use SearchView to search for books with a title
- Show ProgressBar before each network request
- Add a detail view to display more information about the selected book from the list
- Use a share intent to recommend a book to friends
This app leverages two third-party libraries:
- Android AsyncHTTPClient - For asynchronous network requests
- Picasso - For remote image loading