7. Mobile Application Development with Android

Mobile applications backed by cloud-based RESTful services have emerged as the primary face of computing in terms of massive consumer participation. Jason Christensen described this system architecture in his OOPSLA 2009 presentation. Therefore, not only do we find it important to cover this system architecture in the curriculum, but we also see this architecture as a very effective context for teaching various important computer science topics:

  • (real-world) software architecture
    • dependency injection principle (DIP)
    • model-view-adapter architectural pattern (MVA)
    • testability
    • etc.
  • concurrent, parallel, and distributed computing topics (PDC/TCPP/EduPar)
    • events
    • timers
    • background threads
    • offloading tasks to the cloud
  • embedded/resource-conscious computing
    • limitations of the device
    • capabilities of the device (numerous sensors)

Konstantin drew the inspiration to use Android instead of Swing as a context for teaching these topics from the mobile computing session at SIGCSE 2012 in Raleigh.

Furthermore, we have found the cost of switching from, say, Java Swing to Android minimal. Besides, Android matters in the real world: it is a widely used technology, and mobile app development skills are in increasing demand.

While our overall goals are similar to those of the Sofia framework project, we discuss here a language-based approach but are planning to enhance the practice of Android development in Scala through additional support classes.

As mentioned above, current and future focus has been on these courses:

7.1. Examples

The learning objectives of each example are stated in the example’s readme.

7.2. Lab Assignment

Format
Pair project
Time
10 minutes
Deliverable

An enhancement of this clickcounter app that addresses at least one following additional functional requirements:

Nonfunctional requirements
  • You should update the tests and the rest of the existing code accordingly.
  • You should implement the onSaveInstanceState and onRestoreInstanceState application lifecycle methods (see for details. The system passes this method a Bundle in which you can save state information about the activity as name-value pairs, using methods such as putString() and putInt().
Prize
The first pair to add both new requirements wins a pair of T-shirts. If there is no such pair, the first pair to complete one of the requirements wins the T-shirts. Otherwise we will raffle off the T-shirts by throwing them into the crowd.
Memorabilia
Every participant receives stickers and pins. Yay!
Acknowledgments
We thank Gary Brown, sales director at Typesafe, for having provided T-shirts, stickers, and pins on such short notice!