Chapter 6. Paris Map Tour
In this chapter, you’ll build a tour guide app for a trip to Paris. Creating a fully functioning map app might seem really complicated, but App Inventor provides two high-level components to help: the ActivityStarter
, which makes it possible for you to launch another app from your app, including Google Maps, and the WebViewer
, which shows any web page you want within a subpanel of your app. You’ll explore both of these components and build two different versions of a tour guide.
What You’ll Learn
This chapter introduces the following App Inventor components and concepts:
- The
Activity Starter
component for launching other Android apps from your app. - The
WebViewer
component for showing web pages within your app. - How to use list variables to store information for your app.
- The
ListPicker
component to give the user the ability to choose from a list of locations. - How to build a
URL
dynamically to show different maps.
Designing the Components
Create a new project in App Inventor and call it “ParisMapTour”. The user interface for the app has an Image
component with a picture of Paris, a Label
component with some text, a ListPicker
component that comes with an associated button, and in this first version, an ActivityStarter
(non-visible) component. You can design the components using the snapshot in Figure 6-1.
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.