Skip to main content

Learning Mobile App Development A Hands-on Guide to Building Apps with iOS and Android Jakob Iversen

Page 1

Learning Mobile App Development A Hands-on Guide to Building Apps with iOS and Android BY Jakob Iversen

Email: Richard@qwconsultancy.com


Chapter 1: Why Mobile Apps? Overview of Chapter This chapter provides an overview of some of the common issues involved with developing mobile apps. Much of the focus is on the business aspects of developing apps as well as how businesses can employ a mobile strategy to improve business processes. Even for students who may have a lot of experience using their own mobile devices, these business discussions are likely to prove enlightening.

Learning Objectives After completing this chapter, students should be able to do the following: • Discuss the advantages of a mobile device compared to traditional desktops and laptops. • Explain the major features of mobile devices that distinguish them from traditional computers (small size, hardware sensors, network capability). • Understand why mobile devices have the potential to disrupt most business sectors. • Discuss different ways that a mobile app can be used to reach consumers. • Discuss different ways that an app can create revenue for its developer. • Explain how a mobile app can be a part of business process transformations.

Suggested Teaching Approaches for the Chapter The chapter introduces a few app examples, but this is a chapter where examples can help illustrate the various concepts. For the discussion on business disruption, a good example is Amazon’s shopping app that enables scanning of bar codes in a regular store—be sure to introduce the term “showrooming” for this. As you discuss disruption, be sure to consider it from both a constructive and destructive perspective: Some businesses/industries stand to lose, while others stand to benefit. Encourage students to come up with examples of both. If you can get a guest speaker to talk about how his/her company is thinking about mobile strategy, this would be a great place to fit it in the course. For students with little business exposure, you should spend some time discussing the business process implications, including Business Process Reengineering and the Productivity Paradox. If you assign the end-of-chapter exercises as individual homework, you should have students present some of their findings and discuss them as a class.

Answers to End-of-Chapter Exercises 1. Students will provide many different examples. Some obvious candidates include navigation apps, apps such as Instagram that combine hardware features with network connectivity, and games that take advantage of hardware features like the accelerometer. There are also some interesting augmented reality experiments going on. You might also accept apps that can exist on a traditional platform but are vastly more useful in the mobile space, such as weather apps, travel assistance apps (currency


convertors, language translators, and the like), and e-book reader apps. 2. Students will provide different examples, although this may be more challenging than the first exercise. Savvy students may ask parents and other relatives for input (you might even encourage this). Apps such as Fence Builder Pro and Bossy from the chapter are good examples of this kind of app. 3. Students will provide different examples. If this is difficult for them, you might suggest they look around them. Perhaps their family has a shared wall calendar that could be digitized and put on everyone’s phones. Or they might get assignments at school that can be completed, turned in, and graded using mobile devices.

Suggested Additional Exercises The purpose of exercises in this chapter should be to get students thinking about and discussing the world of apps beyond what is important to their own world. 1. In a small group, brainstorm different ways that a mobile strategy might change the way "business" is done at your school. What would a mobile app for your school do? Who would use it? 2. Research sales statistics of mobile devices compared to PCs. What did you learn from these statistics?

Solutions to Additional Exercises 1. A variation on Exercise 3 in the chapter. 2. Many of the statistics are readily available through Google searches and reported at websites like Engadget and Gizmodo. They should show that Smartphone sales are several times higher than traditional computer sales, and tablets will surpass them in a few years.


Chapter 2: App Design Issues and Considerations Overview of Chapter This chapter discusses issues associated with developing for a mobile platform. It explains the execution life cycle of an app for both Android and iOS and discusses some of the important tasks that should be performed in different phases of the life cycle. The chapter includes the design issues associated with the screen size, connectivity, battery life, and hardware that a successful mobile developer must plan to handle in the app. Major differences between Android and iOS devices are also discussed. The chapter concludes with an introduction to the app that users of this book will build to learn mobile development in both Android and iOS.

Learning Objectives After completing this chapter, students should be able to do the following: • • • • • • •

Explain the phases of the Android and iOS life cycle. Identify the major tasks that should be performed in different phases of the life cycle. Identify the issues associated with designing for a very small screen that can change its orientation at any time. Identify the issues associated with data connections that can be acquired and lost without notice due to changes in the user’s location and configuration of the device. Explain why designing for battery life is important and identify good practices for ensuring that the app doesn’t unnecessarily drain the battery. Identify the issues associated with using the hardware and sensors available on mobile devices. Identify the differences in Android and iOS devices and the potential impact of those differences on an app.

Suggested Teaching Approaches for the Chapter The concept of the app life cycle will likely be new to most students. Careful explanation of each phase is required. Additionally, you may want to have a few small apps available that demonstrate the impact of having code in the wrong phase. For example, to demonstrate the difference between the iOS viewDidLoad: and viewWillAppear: methods, you could have an app that loads a value in a text box in the viewDidLoad: method, which then does not show up in the text box. Then


move the exact code to the viewWillAppear: method. It now shows in the text box. Each of the design issues should be discussed thoroughly because they can have a significant impact on the user’s perception of the app. Showing example apps that violate some aspect of the design consideration is a good idea. For screen size, you could look at an application designed for a desktop machine and talk through or demonstrate how you would deal with redesigning the UI for the very small mobile screen. Be sure to pick an application with a significant amount of complexity in its interface. To demonstrate the impact of orientation changes that are not planned for, create an app with a number of widgets and a Save button below all of them in a vertical orientation. Make the save relative to the widget above it. When you run the app and turn the device, the Save button will not be accessible. Even though the tutorials in the book don’t cover how to code for rotation of the screen, it is important to be aware of the issue. Connectivity issues need a little more coding to demonstrate. We would suggest you perform some operation that gets data from an external source on the main thread. Run the app in airplane mode to demonstrate how the app is blocked. In contrast, battery issues are easier to demo. Have an Android app start the GPS in the onCreate method, but do not stop it when the life cycle changes (onPause, onStop, or onDestroy). Run the app and then navigate to another app. The GPS icon should remain on in the status bar. You won’t be able to turn it off, and it will continue consuming power until the user turns it off manually. The GPS can also be used to demonstrate life cycle issues. Create an app with two activities. Place a button on the main activity to open the second activity. In the onCreate method of the first activity, turn on the GPS and then turn it off in the onPause method. Run the app, and when the GPS icon starts flashing in the status bar, navigate to the second activity, check that the GPS is not flashing, and then press the Back button. The first activity will be displayed, but the GPS will not start. It should be turned on and off in the onResume method. Finally, use the GPS to demonstrate accuracy issues. Code your demo app to display the accuracy of the GPS on the main screen. Run the app and watch how long it takes to acquire a 5-meter accuracy reading versus a much larger error figure. Demonstrate what a 5-meter accuracy reading means by having four students stand 5 meters from you on four sides. Note that the reading may place the device location anywhere in the area bound by the students. Because accuracies are given in meters and kilometers in the mobile platforms, if you are in the United States, you may need to include a mini-lecture or activity to reinforce how long a few meters and a kilometer are, respectively. Designing properly for device constraints is extremely important for successful apps. Don’t rush through this chapter, and be sure to reinforce the ideas as you teach the other chapters through the semester.


Turn static files into dynamic content formats.

Create a flipbook
Learning Mobile App Development A Hands-on Guide to Building Apps with iOS and Android Jakob Iversen by Ace Test Banks - Issuu