Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
App Inventor 2 Essentials

You're reading from  App Inventor 2 Essentials

Product type Book
Published in Apr 2016
Publisher
ISBN-13 9781785281105
Pages 248 pages
Edition 1st Edition
Languages

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}