26,39 €
A step-by-step introductory guide to mobile app development with App Inventor 2
App Inventor 2 Essentials is for anyone who wants to learn to make mobile apps for Android devices – no prior coding experience is necessary.
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
Every topic in this book is explained in step-by-step and easy-to-follow fashion, accompanied with screenshots of the interface that will make it easier for you to understand the processes.
Sie lesen das E-Book in den Legimi-Apps auf:
Seitenzahl: 253
Veröffentlichungsjahr: 2016
Copyright © 2016 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2016
Production reference: 1050416
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-110-5
www.packtpub.com
Authors
Felicia Kamriani
Krishnendu Roy
Reviewer
Sergio Martínez-Losa del Rincón
Commissioning Editor
Veena Pagare
Acquisition Editor
Reshma Raman
Content Development Editor
Anish Dhurat
Technical Editors
Chinmay Puranik
Parag Topre
Copy Editor
Akshata Lobo
Project Coordinator
Bijal Patel
Proofreader
Safis Editing
Indexer
Monica Ajmera Mehta
Graphics
Disha Haria
Production Coordinator
Conidon Miranda
Cover Work
Conidon Miranda
Felicia Kamriani is passionate about global education, empowering people with technology and closing the gender gap in STEM education. As Education and Business Development Manager, she evangelized the MIT App Inventor Project in the U.S. and abroad at the Google Rise Summit, the UNESCO YouthMobile conference, Guangzhou Educational Information Center, Hong Kong Polytech University, Guilin University, Samsung App Academy, MERLOT and MOSTEC. She also lead a team of Master Trainers for the Verizon Innovative App Challenge and spearheaded the inaugural MIT App Inventor Master Trainers Program for Mobile Computing Education. Other global endeavors include MOOC research and course development at HarvardX and with The Felittle Group, LLC, as Creative Director (www.felittlepeople.com). She is an avid TEDx organizer and proud alum of Harvard University, Stanford University and the University of California, Berkeley.
Krishnendu Roy is an associate professor of computer science at Valdosta State University. Prior to joining VSU, Krishnendu completed his PhD. and M.S. in computer engineering at Louisiana State University, Baton Rouge, LA in 2009 and 2005, respectively. As an MIT App Inventor Master Trainer, Krishnendu taught computing using App Inventor in summer camps for middle and high school students and in CS0 courses at his university. He has conducted in-person App Inventor workshops for teachers, including Google CS4HS and the University of Massachusetts at Boston's BATEC Summer Institute. He has also organized online App Inventor workshops for teachers who were involved in AAUW's Tech Trek camps and mentored national winning teams of Verizon's Innovative App Challenge.
Sergio Martínez-Losa del Rincón lives in Spain. He is a software engineer and an entrepreneur.
He always likes to write technical documents as well as programming in several languages. He is always learning new programming languages and facing new challenges. Currently, he is creating applications and games for iPhone, Macintosh, Android, GoogleGlass, Unity3D, and Cocos2D-X. He likes VR technologies and all kinds of challenges. He also likes web programming and designing good APIs for mobile applications.
So far, he has developed all kinds of applications in Java, C++, Objective-C, PHP, and other languages. He is now developing products inside the IoT field using SaaS technologies. He likes to explore cloud services to expand application possibilities. He also likes machine learning technologies and natural language processing to study new ways to use big data.
You can see part of his work here: http://goo.gl/k5tOSX.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
Almost everyone has had an idea for an app or perhaps declared, "I wish there were an app for that!" But until recently, taking an idea and building it into a fully functional app would have required hiring an expert software programmer and paying thousands and thousands of dollars. The world of mobile app development had been the domain of an elite group of people with highly specialized skills—proficient coders. The App Inventor project sought to change this reality by democratizing software development. App Inventor 2 is a free, blocks-based, drag-and-drop visual programming language that makes it possible for anyone, even people with no prior coding experience, to turn an idea into a fully functional Android app.
As educators, our passion for promoting global education and empowering people to move from being users of technology to becoming creators of technology were the inspirations for writing this book. With App Inventor, a 12-year-old, a speech therapist, a baseball coach, or anyone else for that matter, can develop an app that is personal, meaningful, and useful to them. People from all backgrounds and levels of education can develop a digital solution to a problem they see in their community. Any App Inventor app, such as an educational game, a music tutorial, or a garbage recycling program can be published or sold in app markets, and thus, have a global impact or spurn opportunities for entrepreneurship, collaboration, and community building.
App Inventor offers an alternative entry point to Computer Science that is more user-friendly and less intimidating than traditional cryptic white-text-on-a-black-screen programming. The colorful blocks that snap together like puzzle pieces along with a design tools enable users to learn both coding and user experience design skills. Furthermore, with a wide gender gap in computer science—males dominating both classes and jobs—we are also passionate about using App Inventor to introduce more girls and women to mobile computing opportunities, such as app contests with Technovation (www.technovationchallenge.org) and coding clubs with Girls Who Code (www.girlswhocode.com).
Because you can take any idea and turn it into a mobile app, the opportunities for imagination, creativity, and innovation are indeed endless. The purpose of this book is to help spark such creativity while introducing you to basic computer science principles, computational thinking, and programming. This book teaches you to navigate the App Inventor platform and helps you become familiar with its features through step-by-step tutorials on building three different mobile apps. Throughout the book, we offer design tools and tips as a pathway to user experience design, since the user interface is such an integral part of any mobile app. Ultimately, by the end of this book, you will be equipped with enough skills to embark on developing your own mobile app from scratch. We are excited to see the apps you are inspired to create and hope that you will share them with us.
We are so excited to share our passion for mobile app development with you and hope that this book awakens a creative spark to make technology that is personal, meaningful, and useful to you. We are thankful to Hal Abelson, Mark Friedman, and all of the original App Inventor developers and visionaries who created the platform that has evolved into App Inventor 2. We are proud to be furthering the App Inventor mission and encourage all of you budding software programmers to, in turn, share App Inventor with other noncoders. Together we can empower others to become part of a growing movement to connect and impact the world with digital creativity.
"We look forward to hearing about the digital solutions you devise or your evolution in the mobile computing space. Good luck and keep connecting!"
--Felicia Kamriani and Krishsnendu RoyChapter 1, Unleashing Creativity with MIT App Inventor 2, introduces you to the MIT App Inventor software and explores the multifaceted role of the mobile app developer by examining design processes and techniques used to turn an app idea into a prototype. By showing a variety of apps that people just like you have already made, this chapter reveals the range of learning outcomes and skills developed by using App Inventor.
Chapter 2, Setting Up MIT App Inventor 2, walks you through setting up a Google Account to log into App Inventor, downloading software, and connecting your computer to your mobile device via Wi-Fi or USB with Mac, Windows, or GNU/Linux. MIT App Inventor 2 is a free online application that runs in a web browser on your computer and saves your projects in the cloud. The magical part of App Inventor is live testing your app as you build it with the Integrated Development Environment (IDE). If you don't have a mobile device, don't worry, there are instructions on how to use App Inventor with the onscreen emulator. While we provide a step-by-step guide to getting started, we acknowledge that sometimes establishing connectivity can be a challenge. Therefore, we include plenty of troubleshooting and help options.
Chapter 3, Navigating the App Inventor Platform, familiarizes you with the App Inventor Projects View, Designer screen, and Blocks Editor. This chapter teaches you how to build a game app called Fling. The step-by-step tutorial integrates components and properties to design the user interface and colorful puzzle-like blocks to code the behavior of the game. You learn how to create buttons that start or reset play, move a ball, change the ball's direction by touching it, bounce the ball off the edges of the screen, and end game play. During each step of the development process, we show you how to view the changes on your mobile device. By the end of the chapter, you will have built a functional app! However, we have just gotten started on our app development journey.
Chapter 4, Fling App – Part 2, uses the basic app that we built in Chapter 3 as a launching pad for further skill development: debugging and expanding the app with more complex features. Since most games keep score and have increasing levels and difficulty, we augment the Fling tutorial to make a more intermediate app. You learn how to make a scoring mechanism, display the score, increase the speed of the ball, create levels, increase the difficulty of play, and debug by updating the Play and Reset buttons.
Chapter 5, Building an Event App, provides a tutorial for building a second app—this time, an intermediate event-planning app. An app like this can be useful for anyone who is gathering people together for meetings, parties, or events. It gathers information from people who would like to attend, namely, their name, the number of guests, and the pot-luck items to be brought. In return, the app displays to users a guest list and the event information, such as the address and a map. The tutorial teaches you how to include images and artwork, create a navigation menu, use the Backpack tool, add multiple screens, expand your use of labels, and include a map component. By the end of the chapter, you will have accomplished a great deal, but will only be halfway through the Event App development.
Chapter 6, Introduction to Databases, will cover databases that are an essential part of app designing because they store persistent data, meaning that when the app closes and reopens, the previously entered data will remain in the App. Without a database, any data entered by the user when the app is running would be lost once the app is closed. In order to collect user-inputted information for the Event app, this chapter's tutorial demonstrates how to create an RSVP form, establish Google API credentials, store and request information in a database using Google Fusion Tables, and display a guest list.
Chapter 7, Learning About Loops with a Raffle App, will cover a third tutorial—this time, for a Raffle App that includes the computer science principles of lists, loops, and variables. The Raffle App (a digital version of a regular raffle) can be used at a party, meeting break, or as an ice-breaker to involve participants in a short fun activity. Participants text a specific message to the Raffle organizer's phone and the app randomly selects a winner from the list of incoming numbers and then notifies the winner he or she has won and texts the rest of the participants that they did not win. Here, you will learn to code efficiently with variables and a loop, as the app repeats the same behavior (texting a "Sorry you did not win!" message) for a list of many people.
Chapter 8, Expanding Your Mobile App Development Skills, includes more design principles and App Inventor tips to broaden your skill set for your transition from app building with guided tutorials to creating mobile apps from scratch. Also included are app sharing tools that enable you to contribute your creativity and learn from other app developers. Since all the App Inventor apps can be uploaded, shared, and even sold in app markets, the apps you develop can make a global social impact or trigger your path as an entrepreneur. The world awaits your contribution!
This book is for anyone wanting to learn how to create mobile apps for Android. No prior coding experience is necessary.
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The file is named appinventor2-setup_1.1.tar.gz and it is a GZIP compressed TAR file."
Any command-line input or output is written as follows:
New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "There are five games to choose from, including Refocus, True Color, Quick Pick, Sum It Up, and Expression Puzzle."
Warnings or important notes appear in a box like this.
Tips and tricks appear like this.
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or found challenging. Reader feedback is important to us as it helps us develop resources that you will find useful and educational.
To send us general feedback, simply e-mail <[email protected]>, and mention the book's title in the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.
To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.
Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]> with a link to the suspected pirated material.
We appreciate your help in protecting our authors and our ability to bring you valuable content.
If you have an issue with any aspect of this book, you can contact us at <[email protected]>, and we will do our best to address the problem.
Mobile applications are ubiquitous. There are apps for just about everything—entertainment, socializing, dining, travel, philanthropy, shopping, education, navigation, and so on. And just about everyone with a smartphone or tablet is using them to make their lives easier or better. But you have decided to move from just using mobile apps to creating mobile apps. Congratulations! Thanks to MIT App Inventor 2, mobile app development is no longer exclusively the realm of experienced software programmers. The software empowers anyone with an idea to create mobile technology. This book offers people of all ages a step-by-step guide to creating mobile apps with MIT App Inventer 2. While this visual programming language is an ideal tool for people who have little or no coding experience, don't be fooled into thinking that the software's capabilities are basic! The simple drag-and-drop blocks format is actually a powerful programming language capable of creating complex and sophisticated mobile apps.
The purpose of this chapter is to provide an overview of MIT App Inventor 2, and of your new role as a mobile app developer. You are in for more skill development than you ever imagined! Of course, you will learn to code mobile apps, but there are countless other valuable skills weaved into the mobile app building process. Most significantly, you will learn to think differently, discover the design-thinking process, become a problem solver, and be resourceful. This chapter also offers tips on design principles and brainstorming app ideas. Lastly, it reveals the potential of MIT App Inventor 2 and showcases an array of mobile apps so that you, a budding app designer, can begin thinking about the full spectrum of possibilities. These mobile app examples not only display the capabilities and functionalities of MIT App Inventor 2, but also serve to spark ideas, foster innovative thinking, and help create visual goals as you embark on the mobile app-making process in the next chapters.
This chapter covers the following topics:
MIT App Inventor 2 is a free, drag-and-drop, blocks-based visual programming language that enables people, regardless of their coding experience, to create mobile apps for Android devices. In 2008, iPhones and Android phones had just hit the market. MIT professor Hal Abelson had the idea to create an easy-to-use programming language to make mobile apps that would harness the power of the emerging smartphone technology. Equipped with fast processors, large memory storage, and sensors, smartphones were enabling people to monitor and interact with their environment like never before. Abelson's goal was to democratize the mobile app development process by making it easy for anyone to create mobile apps that were meaningful and important to them. While on sabbatical at Google in Mountain View, CA, Abelson worked with Engineer Mark Friedman and many of other developers to create App Inventor (yes, it was originally called Google App Inventor).
In 2011, Abelson brought App Inventor to MIT and, together with the Media Lab and the CSAIL (Computer Science and Artificial Intelligence Lab), created the Center for Mobile Learning. In December 2013, Abelson and his team of developers launched MIT App Inventor 2 (from here on referred to as MIT App Inventor), an even easier to use web-based application version featuring an Integrated Development Environment (IDE). IDE means that you as you build your mobile app online, you can see it come to life on a connected mobile device. All you need is a computer (Mac or PC), an Internet connection (or a USB connection), a Google account, and an Android device (phone or tablet). But, if you don't have an Android device, don't worry! You can still create apps with the onscreen emulator and utilize the live development mode.
The MIT App Inventor (http://appinventor.mit.edu/) interface includes two main screens, a Designer Screen, which is a graphical user interface (GUI) where you can create the look and feel of the app (choosing the components you want the app to include), and the Blocks Editor, where you can add behavior to the app by coding it with colorful blocks. Users build apps by dragging components and blocks from the menu bars onto a workspaces (called Viewers) and a connected Android device (or emulator) displays the progress in real time. All the apps are saved on the MIT server; once completed, they can be can be shared on the MIT App Inventor Gallery, submitted to app contests (such as MIT App of the Month), or uploaded to the Google Play Store (or other app marketplaces) for sharing or selling.
To date, MIT App Inventor has empowered millions of people to become creators of technology by learning to be mobile app developers. And now, you will become one of them!
Since you are reading this book, it is safe to assume that not only do you regularly use mobile apps, but on occasion, you have also had the thought, "I wish there were an app for that!" Now, with the help of MIT App Inventor and this guidebook to mobile app development, you will soon be able to say, "I can create an app for that!"
While embracing your new role as a mobile app developer, you will not just be learning how to code; you will learn an array of other valuable skills. You will learn to think differently. Every time you open an app, you will start looking at it from the developer's perspective rather than just as a user. You will start noticing what functions are logical and simple and which are complicated and unintuitive. You will learn to get inspiration from your environment. What type of app could make the attendance process at my club/class/meeting more streamlined or efficient? What app idea could help solve the inaccurate inventory problem at the gym? You will learn to become a data gatherer without even realizing it. When people make comments about apps, your ears will perk up and you will take note. You will start asking questions like, why do you prefer Waze over Google Maps?
You will learn to become a problem solver. You will learn to think logically so that you can tell the computer in a step-by-step manner how to perform an operation. Any software developer will confirm that programming is an iterative process. It's a continual cycle of coding, troubleshooting, and debugging. Trial and error will become second nature, as will taking a step back to figure out why something that just worked a minute ago now seems broken. And, you will learn to assume the role of a designer. It is no longer accurate to merely depict programmers holed up by themselves at a computer, creating white text-based code on black screens. Developers of mobile apps are also designers who think about and create attractive and intuitive user interfaces (UIs). Much of the design work happens not at the computer; it includes conversations with potential users, involves pens, paper, and post-it notes, and uses storyboards or sketches. Only once you have your app designed on paper do you sit down at the computer to begin coding. And then, you will not find the traditional black and white interface, as the MIT App Inventor platform is interactive and full of colorful blocks that snap together.
Chances
