Preview - Programming Mobile Services for Android Handheld Systems

This course introduces you to the design and implementation of Android applications for mobile devices. You will develop an app from scratch, assuming a basic knowledge of Java, and learn how to set up Android Studio, work with various Activities and create simple user interfaces to make your apps run smoothly.

教学方

Dr. Adam Porter

Professor

脚本

[MUSIC] Welcome to the module on Android Concurrency Frameworks. Although the standard Java threading, synchronizer, and coordination features, covered in the previous module, provide the foundation for Android's concurrency mechanisms. They can be tedious and error-prone to use, and don't shield application developers from Android's design constraints, such as its non-thread safe GUI libraries, and its limits on the amount of time the one the only user interface thread can block. Therefore, to ensure the concurrency can be used correctly, efficiently and scalably in applications and middleware, as well as to elevate the complexity of its design constraints, Android provides several concurrency frameworks that allow background threads to run in parallel on multiple cause. And communicate in various ways with its user interface thread. This module focuses on two Android concurrency frameworks. First we cover its handlers, runables and messages. Or hammer framework, which provides a loosely connected set of classes, that allow long duration operations to run in one ore more background threads, and then publish the results of these operations to the user interface thread. Second, we cover Androids async task framework, which provides a more tightly connected set of classes, that executes long duration operations in one or more background threads. And publish the results to the user interface thread without manipulating threads, handlers, messages or runables explicitly. We'll explore the structure and functionality of these frameworks, and show how to apply them to develop concurrent programs. Such as a threaded downloads application that implements three concurrency models using the Android Hammer, and AsyncTask frameworks. We also demonstrate how Android concurrency frameworks are applied to its middleware and packaged applications. As well has how its frameworks are enhanced, by the application of Gang of Four patterns, such as template method, strategy, and factory method. And POSA patterns, such as active object, command processor, half sync half async, and threat specific storch. [MUSIC]