Presentation is loading. Please wait.

Presentation is loading. Please wait.

SE4S701 Mobile Application Development

Similar presentations


Presentation on theme: "SE4S701 Mobile Application Development"— Presentation transcript:

1 SE4S701 Mobile Application Development
Android introduction Based on Material by Ross Davies and Marius Miknis

2 Mobile Applications Android What are they? Types
Any application that runs on a mobile device Types Web apps: run in a web browser HTML, JavaScript, Flash, server-side components, etc. Virtual Machine apps: Written in Java (rarely C# e.g. using Xamarin) Native: compiled binaries for the device Android

3 Brief History - Android
2005 Google acquires startup Android Inc. to start Android platform Work on Dalvik VM begins 2007 Open Handset Alliance announced Early look at SDK 2008 Google sponsors 1st  Android Developer Challenge T-Mobile G1 announced SDK 1.0 released Android released open source (Apache License) Android Dev Phone 1 released  Open Handset Alliance, a consortium of 47 hardware, software, and telecom companies devoted to advancing open standards for mobile devices. Includes Texas Instruments, Broadcom Corporation, Google, HTC, Intel, LG, Marvell Technology Group, Motorola, Nvidia, Qualcomm, Samsung Electronics, Sprint Nextel and T-Mobile

4 Brief History cont. 2009 2010 SDK 1.5 (Cupcake) SDK 1.6 (Donut)
New soft keyboard with “autocomplete” feature SDK 1.6 (Donut) Support Wide VGA SDK 2.0/2.0.1/2.1 (Eclair) Revamped UI, browser 2010 Nexus One released to the public SDK 2.2 (Froyo, API 8) Flash support, tethering SDK 2.3 (Gingerbread, API 10) UI update, system-wide copy-paste Gingerbread Android 2.3

5 Brief History cont. 2011 2012 SDK 3.x (Honeycomb)
Android 2011 SDK 3.x (Honeycomb) Optimized for tablet support SDK 4.0 (Ice Cream Sandwich, API 15) Virtual UI buttons 2012 SDK (Jelly Bean, API 16 to 18) Triple buffered graphics pipeline Ice cream Sandwich Android 4.0+ Jelly Bean Android 4.1.1

6 Brief History cont. 2014 SDK 4.4 to (KitKat, API 19) New UI for tablets, support multi-core processors 2015 SDK 5.0 to 5.1.1(Lollipop, API 21 & 22) Added ART (Android RunTime, a new environment with ahead-of-time compilation) to replace the older Dalvik VM SDK 6.0 (Marshmallow, API, 23) 2016 SDK 7.0 to 7.01 (Nougat, API 24 & 25) 2017 SDK 8.0 and 8.1 (Oreo, API 26 & 27) KitKat Android 4.4 Lollipop Android 5.0 Marshmallow Android 6.0 Oreo Android 8.0

7 Android Versions: API Reference
1.0 Honeycomb Marshmallow [API 1] 3.0 [API 11] 6.0 [API 23] 1.1 3.1 [API 12] Nougat [API 2] 3.2 [API 13] 7.0 [API 24] Cupcake Ice Cream Sandwich 7.01 [API 25] 1.5 [API 3] Oreo Donut 4.0 [API 14] 8.0 [API 26] 1.6 [API 4] 4.03 [API 15] 8.1 [API 27] Éclair Jelly Bean 2.0 [API 5] 4.1 [API 16] 2.0.1 [API 6] 4.2 [API 17] 2.1 [API 7] 4.3 [API 18] Froyo Kitkat 2.2 [API 8] 4.4 [API 19] Gingerbread 4.4+ [API 20] 2.3 [API 9] Lollipop 2.4 [API 10] 5.0 [API 21] 5.1 [API 22] Source:

8 So, what is Google Android?
A software stack for mobile devices that includes An operating system Middleware Key Applications (the stuff you can’t uninstall) Uses Linux to provide core system services Security Memory management Process management Power management Hardware drivers

9 Application Framework
Android Architecture Applications Application Framework Libraries Android Runtime Android Runtime Linux Kernel More details at:

10 Android S/W Stack – Linux Kernel
Relying on Linux Kernel for core system services Memory and Process Management Network Stack Driver Model Security Providing an abstraction layer between the H/W and the rest of the S/W stack The Linux kernel is the hardware abstraction layer (HAL) between the hardware and the android software stack. The base of Android is a Kernel that's built around Linux. It's a version of Linux that's highly optimized for mobile operating systems made as small as possible so that it works well on devices that have very seriously constrained CPU and memory capabilities. On top of the Kernel is the Android Runtime. And a set of libraries that enable the behaviour of the operating system itself. The next level is the Application Framework which sits on top of the Android Runtime and the associated libraries. And then finally, at the top are the apps including those that are included with the operating system. And custom apps, that you might download from the Google Play store or build yourself. Let's break down each of these layers. The Linux Kernel, again, starts with Linux itself, but then also has a set of drivers. And each driver is designed to interface with an element of the hardware. A phone, or a tablet for example. You'll have drivers for audio, camera, display, the keypad, to manage flash memory, power, wi-fi, and so on. It's up to the OEMs, that is, the manufacturers of the devices themselves, to customize these drivers, and make them work for those devices. So if you're holding an Android device in your hand, the version of Android that's on that device will be a combination of what Google delivers and what the vendor delivers.

11 Android S/W Stack - Libraries
Includes a set of C/C++ libraries used by components of the Android system Exposed to developers through the Android application framework

12 Android S/W Stack - Runtime
ART (from 2015 onwards) Core Libraries Providing most of the functionality available in the core libraries of the Java language APIs Data Structures Utilities File Access Network Access Graphics etc …… Dalvik Virtual Machine Providing environment on which every Android application runs Each Android application runs in its own process, with its own instance of the Dalvik VM. Dalvik has been written such that a device can run multiple VMs efficiently. Register-based virtual machine The next layer is the Android Runtime. And this includes a setup of core libraries and critically, the Dalvik virtual machine. . The Dalvik virtual machine or JVM, replaces the JVM that's used in conventional Java-based applications. Dalvik, again, is highly optimized for very small devices. And the byte code that it reads is different in many ways from the byte code that's generated by conventional Java compilers. So, to get Dalvik byte code, you have to use the Dalvik compatible compiler that's included with the Android developer tools. The associated libraries include libraries to manage all sorts of features of Android, including graphics, databases, encryption, typefaces, and so on. These libraries work at the same level of the software stack as the core Runtime, but they're expandable. And so, device makers can add their own libraries to this layer. Android Runtime (ART) More on next slide

13 Android Apps Built using Java and Google’s SDK libraries
No support for some Java libraries like Swing & AWT Java code compiled into Dalvik byte code (runs on VM) or ART byte code (converted to native machine code at install) Both optimised for mobile devices (better memory management, battery utilisation, etc.)

14 Take Your Pick Optional through development menu in 4.4
ART is used by default in version 5 of Android and above Gains upwards of: 50% in speed 30% in battery life

15 Android S/W Stack – App Framework
Feature Role View System Used to build an application, including lists, grids, text, boxes, buttons, and embedded web browser Content Provider Enabling applications to access data from other applications or to share their own data Resource Manager Providing access to non-code resources (localized strings, graphics, and layout files) Notification Manager Enabling all applications to display customer alerts in the status bar Activity Managing the lifecycle of applications and providing a common navigation backstack

16 Android S/W Stack - Application
Android provides a set of core applications: Client SMS Program Calendar Maps Browser Contacts etc ... All applications are written using the Java language.

17 Workflow Development process for an Android App
All included in Android Studio The basic steps for developing applications (with or without Eclipse) are shown in figure 1. The development steps encompass four development phases, which include: Setup During this phase you install and set up your development environment. You also create Android Virtual Devices (AVDs) and connect hardware devices on which you can install your applications. See Managing Virtual Devices and Using Hardware Devices for more information. Development During this phase you set up and develop your Android project, which contains all of the source code and resource files for your application. For more information, see Create an Android project. Debugging and Testing During this phase you build your project into a debuggable .apk package that you can install and run on the emulator or an Android-powered device. If you are using Eclipse, builds are generated each time you project is saved. If you're using another IDE, you can build your project using Ant and install it on a device using adb. For more information, see Build and run your application. Next, you debug your application using a JDWP-compliant debugger along with the debugging and logging tools that are provided with the Android SDK. Eclipse already comes packaged with a compatible debugger. For more information see, Debug your application with the SDK debugging and logging tools. Last, you test your application using various Android SDK testing tools. For more information, see Test your application with the Testing and Instrumentation framework. Publishing During this phase you configure and build your application for release and distribute your application to users. For more information, see Publishing Overview.

18 Publishing to Google Play
Requires Google Developer Account $25 fee once (Apple: $99 yearly) Link to a Merchant Account Google Checkout Link to your account Google takes 30% of App purchase price

19 Google Play SERVICES Not to be confused with Google Play Why?
‘Play’ = app store ‘Play Services’ = a background application (always running) Why? Reduce dependence on Android updates (Google got frustrated with slow phone vendors), all Google apps get now updated by Google (Maps, Drive, Wallet, …). Strange, however …. It can’t be stopped or disabled (see screen shot above) Is closed source (Android is open source)

20 Google Play SERVICES Minor Problems Major Problem
Increases battery consumption and is very large Mandatory for increasing number of apps (e.g. YouTube)  difficult to uninstall Major Problem It has 80 (!) permissions – that’s pretty much all. (including reading your s, text messages, recording your conversations, transmitting your contact list, you location, etc.) In other words: spyware (opinion). Why? “Don’t be Evil” – that was yesterday (dropped 2015)

21 That’s it for today Let’s start coding.....
Based on Material by Ross Davies and Marius Miknis


Download ppt "SE4S701 Mobile Application Development"

Similar presentations


Ads by Google