Android introduced a new user interface language to the world, one that is gradually evolving in flexibility and expressiveness. The first application we will build exhibits range of new concepts you will not have come across before. Here we tour this app in detail, exploring each of the artifacts we have composed, and attempt to get a sense of how they fit together to form a running app.
Android, like IOS, has introduced a new visual language for interaction on the devices it supports. This language is different from previous graphical environments (Windows, OSX), and is optimised for touch based interaction. In the second version of the donation app we start to get a sense of this language and the programming paradigms to support it.
We continue developing the Donation app, providing solutions to the exercises set in the previous lab. Additional widgets are introduced as well as a model class and simple authentication.
This first application is already composed of a range of classes related to each other in via different types of relationships. We can capture this design graphically in UML, exploring the true nature of the structure of the app. We then move on to a new app though which we will explore the major features of the SDK.
Android is a sophisticated, multi-layered operating system encompassing a wide range of features, capabilities and components. This is organised into a 'Stack', whereby each layer communicates with the layer immediately below. Here we review this stack and briefly examine the primary components at each layer. We also press on with exploring the SDK.
The Activity is at the heart of almost all android applications. You have already experience in designing and implementing a number of simple ones. Here we review the general nature of activities and define the principle the concerns of the programmer has to bear in mind. In particular, we review navigation principles in Android and the visual language that it provides.
We conclude our treatment of navigation with instructions on how to implement the up button. We also briefly explore some of the features newly introduced in Java 8, in particular lambdas, the implementation of which we demonstrate with some simple examples.
We review the file I/O implemented previously where we incorporated a serialization mechanism to write Java objects to a Json file format. This required some significant enhancements to the models package, including a completely new Serializer class. Experience is provided in the use of implicit intents in two new features which facilitate selecting a contact from the phone's contact lists and sending an email to the selected user.
Modern Android Activities tend to be composed of one or more Fragments - as opposed to consisting of a single layout. This introduces a slightly more complicated creation process. However, using fragments opens up other opportunities we will explore in later labs.
Two new features are introduced - the ability to delete a subset of the list view and the ability to swipe horizontally in either direction and display each details view in turn.
Our application allows storage of configuration data in the form key-value pairs. Menu access is provided to a layout that allows input of credentials and other settings that will be used later when cloud access capability is added. We avail of a number of Android types such as the PreferenceFragment class and SharedPreference interface.
Here we discuss app design in general, the frameworks available to the app developer and the different approaches that can be followed in the design and development of a mobile app. We begin with some of the more common widgets used in the design of android apps, focusing on the android UI guidelines for effective navigation.
Here we cover some of the more advanced UI artifacts used in the design of android apps, specifically the Navigation Drawer while continuing to focus on the android UI guidelines for effective navigation.
In this section we take a brief look at persistence within an Android app (via SQLite) but focus mainly on how the Android OS implements multithreading and deals with running tasks in the background. We also investigate the different approaches available to the developer for making http calls and API requests.
Google Services is a layer of services Android apps can use. This includes location services, google sign-in, cloud, contacts, maps etc. Here we focus on just 3 of the services - Google Sign-in, Location and Maps.
Firebase is a Backend-as-a-Service — BaaS — that began as a startup and grew into a next-generation app-development platform on Google Cloud Platform. Here we look at the main services provided by the platform and ultimately build our CoffeeMate app with Firebase support.
Using the java classes already built using retrofit, enable the donation android app with the facility to access the donation web API.
Explore how our JWT security mechansim can be incorporated into the android client
A service is an application component that can perform a background task. A receiver is a component that allows registration for system or application events. We use both as a means of automatically refreshing cache data from the service. A BroadcastReceiver listens for a particular intent, sent either in response to booting the device or when our application starts. It then sets an alarm that triggers the refresh service at either default or user-define intervals. We also demonstrate how to manually refresh data by making a direct call to service.