Chapter 13. Amazon at the Bookstore

Figure 13-0.
Amazon at the Bookstore

Suppose that you’re browsing books at your favorite bookstore and want to know how much a book costs on Amazon.com. With the Amazon at the Bookstore app, you can scan a book or enter an ISBN, and the app will tell you the current lowest price of the book at Amazon.com. You can also search for books on a particular topic.

Amazon at the Bookstore demonstrates how you can use App Inventor to create apps that talk to web services (aka, application programming interfaces, or APIs). This app will get data from a web service created by one of the authors of this book. By the end of this chapter, you’ll be able to create your own custom app for talking to Amazon. The application has a simple user interface with which the user can enter keywords or a book’s ISBN (international standard book number—a 10- or 13-digit code that uniquely identifies a book) and then lists the title, ISBN, and lowest price for a new copy at Amazon. It also uses the BarcodeScanner component so that the user can scan a book to trigger a search instead of entering text (technically, the scanner just inputs the book’s ISBN for you).

What You’ll Learn

“Amazon at the Bookstore” running in the emulator
Figure 13-1. Amazon at the Bookstore running in the emulator

In this app (shown in Figure 13-1), you’ll learn:

Get App Inventor 2, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.