Book Image

App Inventor 2 Essentials

Book Image

App Inventor 2 Essentials

Overview of this book

App Inventor 2 will take you on a journey of mobile app development. We begin by introducing you to the functionalities of App Inventor and giving you an idea about the types of apps you can develop using it. We walk you through the technical set up so you can take advantage of the interactive development environment (live testing). You will get hands-on, practical experience building three different apps using tutorials. Along the way, you will learn computer science principles as well as tips to help you prepare for the creative process of building an app from scratch. By the end of the journey, you will learn how to package an app and deploy it to app markets. App Inventor 2 Essentials prepares you to amass a resource of skills, knowledge and experience to become a mobile app developer
Table of Contents (15 chapters)
App Inventor 2 Essentials
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

Adding the ActivityStarter


Our app will feature a map, because anytime you host an event, guests will need to know the address and it is helpful to provide the location via GPS. For the EventApp app to launch Google Maps when a user presses the Map button, we will use the ActivityStarter Component. Go to the Designer, and in the Connectivity Palette, drag ActivityStarter onto the Viewer and notice how it drops down below the Viewer (see the following screenshot) unlike all of the other components we have used so far. This is because ActivityStarter is a nonvisible component; the user won't see it on the screen or even know that they have launched it:

For the app to launch the correct map, you will need to input some instructions in the Properties panel. Insert the following text into the blank text boxes beneath each property heading Action, ActivityClass, ActivityPackage, and DataUri, as follows:

  • Action: android.intent.action.VIEW

  • ActivityClass: com.google.android.maps.MapsActivity

  • ActivityPackage...