+ All Categories
Home > Documents > Mobile Applications - lecture-notes.tiu.edu.iq

Mobile Applications - lecture-notes.tiu.edu.iq

Date post: 28-Jan-2022
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
29
Mobile Applications (Development Concepts & Android Architecture) Dr. Mohamad Al - Dabbagh 1
Transcript
Page 1: Mobile Applications - lecture-notes.tiu.edu.iq

Mobile Applications(Development Concepts & Android Architecture)

Dr. Mohamad Al-Dabbagh

1

Page 2: Mobile Applications - lecture-notes.tiu.edu.iq

Outline− Introduction

− Android Development Concepts

2

− Android Architecture

− Structure of Android's code

Dr. Mohamad Aldabagh

Page 3: Mobile Applications - lecture-notes.tiu.edu.iq

IntroductionYear Name Services Size (cm) Weight

(Kg)

1983 Motorola DynaTAC8000X (called Brick)

Calling 30 1.13

1989 Motorola Microtac9800X

Calling 23 0.35

1992 Motorola International 3200

Calling (GSM) 19.5 0.5

1993 Nokia 1011 Calling (GSM) 19.5 0.4

1994 IBM Simon Calling 20 0.5

1996 Motorola Strartac Calling 9.4 0.088

1996 Nokia 8810 Calling 14.4 0.145

2019 iPhone and Samsung What you see in them?

3Dr. Mohamad Aldabagh

Page 4: Mobile Applications - lecture-notes.tiu.edu.iq

Introduction− They are applications that specially developed for handy devices,

such as mobiles, tablets, and iPad.

− Operating systems (OS).

− Complexity and simplicity− Free and Paid App− Used memory space.

− Graphical User Interface (GUI)

4

− The differences of applications are:

− There are a lot of mobile platform:

Dr. Mohamad Aldabagh

Page 5: Mobile Applications - lecture-notes.tiu.edu.iq

Introduction− Android: is a mobile operating system developed by Google,

based on a modified version of the Linux kernel and other opensource software and designed primarily for touchscreen mobiledevices such as smartphones and tablets.

− Android runs on a specially adapted version of the Linux operating system.So, Android is a system within a system

− What is Android?

5

− The typical Android user doesn't see the Linux operating system,and most probably doesn't even know it is there.

− One purpose of this is to hide the complexity and diversity of thehardware and software that Android runs on.

Dr. Mohamad Aldabagh

Page 6: Mobile Applications - lecture-notes.tiu.edu.iq

Introduction− Java is the most widely used language for

Android development, but that doesn’tmean it is always the best choice..

− Java is old, verbose, error-prone, and hasbeen slow to modernize. Kotlin is aworthy alternative.

v Why use Kotlin Programming Language ?

6

− Ex: open JDK developers are starting to bridge the gap with Java 8, butAndroid doesn’t use all the features of Java 8. Developers are still stuck in theold Java 7 and 6 worlds, and that's not going to improve much in theforeseeable future.

− Kotlin comes in: This relatively new open source language, based on the JavaVirtual Machine (JVM), is gaining traction with Android software engineers.

Dr. Mohamad Aldabagh

Page 7: Mobile Applications - lecture-notes.tiu.edu.iq

Introduction− There are other JVM languages could try to use on Android, but Kotlin offers

integrations with Android Studio, Google's primary IDE for Android, that nolanguage, has, other than Java.

− Hence, here's why now is the time to start using this modern, sophisticated,pragmatic language for your Android development projects.

v Why use Kotlin Programming Language ?

7

− Kotlin has been Google’s preferred language for Android app developmentsince 7 May 2019

− Kotlin is officially supported by Google formobile development on Android. Since therelease of Android Studio 3.0 in October 2017,Kotlin is included as an alternative to thestandard Java compiler.

Dr. Mohamad Aldabagh

Page 8: Mobile Applications - lecture-notes.tiu.edu.iq

Introduction

− iPhone/iPad development.

− Official (first-class) Android language.

v There are some significant advantages to working with Kotlin:

8

− Kotlin is the most fun language, mainly (faster and with less code).

− Kotlin is the most succinct language (Least error-prone)

− Kotlin is less crashes.

− Can produce innovative and advance app.

Dr. Mohamad Aldabagh

Page 9: Mobile Applications - lecture-notes.tiu.edu.iq

Introductionv Examples:

9Dr. Mohamad Aldabagh

Page 10: Mobile Applications - lecture-notes.tiu.edu.iq

Android Development Concepts

− Android Software Development Kit (SDK):

10

Ø Android Development Concepts:

− Android Application Programming Interface (API).

− Android application package (APK)

− Integrated Development Environment (IDE)

− Dalvik Virtual Machine

− User Interface (UI)

v How Kotlin and Android work together?

Dr. Mohamad Aldabagh

Page 11: Mobile Applications - lecture-notes.tiu.edu.iq

Android Development Concepts

− The Android SDK is a set of development tools used to develop

applications for Android platform. SDK is largely written in Java.

11

v What is Android SDK?

− Whether you have programmed your app in Kotlin or Java, the resulting DEX

code is the same.

− Kotlin is the new kid on the block, it is merged together with the Java from the

SDK in an intermediate form before being converted into a format called DEX

code, which the Android device uses to convert into a running app.

− The Android SDK includes the following:• Required libraries• An emulator• Relevant documentation for the Android application program interfaces (APIs)• Sample source code• Tutorials for the Android OSDr. Mohamad Aldabagh

Page 12: Mobile Applications - lecture-notes.tiu.edu.iq

Android Development Concepts

− The Android API is code that makes it easy to do

exceptional things.

12

v What is Android API?

− The Android API has a whole bunch of code that has already been written for us

to use as we like.

Ex: Car

− How do we use all this code to do cool stuff?

− Kotlin programming language. Kotlin was designed to help programmers

handle complexity, avoid mistakes, and make fast progress via Kotlin and

object-oriented programming (OOP).

Dr. Mohamad Aldabagh

Page 13: Mobile Applications - lecture-notes.tiu.edu.iq

Android Development Concepts

− Android application package is the file format that Android uses to distribute and install apps. It contains all the elements that an app needs to install correctly on your device.

13

v What is Android APK?

− Your own Code/ code of the Android API can be compiled into: • DEX code

• rest is handled by the Android device (underlying Linux OS)

− The DEX code (along with some other resources) are placed in a bundle of files called an Android application package (APK), and this is what the device needs to run our app.

Dr. Mohamad Aldabagh

Page 14: Mobile Applications - lecture-notes.tiu.edu.iq

Android Development Concepts

14

v What is Android APK?

− Where exactly does all this coding and compiling into DEX code, along with APK packaging, take place?

Dr. Mohamad Aldabagh

Page 15: Mobile Applications - lecture-notes.tiu.edu.iq

Android Development Concepts

15

v What is IDE?− A development environment is a term that refers to having everything you need

to develop, set up and ready to go in one place.

− There is an entire range of tools needed to develop for Android, and we also need Android API. This whole suite of requirements is collectively known as the SDK.

− Android Studio is an integrated development environment (IDE) that will take care of all the complexities of compiling our code and linking with the Android API. We can do everything we need inside this single application,

− A single application will give us these things all bundled together. The application is called Android Studio.

Dr. Mohamad Aldabagh

Page 16: Mobile Applications - lecture-notes.tiu.edu.iq

Android Development Concepts

16

v What is UI?− we will also be adding and editing other files that get included

in the final APK. These files are known as Android resources.

− It include resources, such as images, sound, and user interface layouts.

− Android cannot read and recognize text in the same way that a human can. Therefore, we must present our resources in a highly organized and predefined manner.

− the actual User Interface (UI) layout of our apps, despite the option to implement them with a visual designer, are read from text-based files by Android.

− Use Extensible Markup Language (XML). XML is a huge topic; fortunately, its whole purpose is to be both human- and machine- readable. Its filename will end with the .xml extension.

Dr. Mohamad Aldabagh

Page 17: Mobile Applications - lecture-notes.tiu.edu.iq

Android Architecture

17

− Overview of the Android Architecture:

Dr. Mohamad Aldabagh

Page 18: Mobile Applications - lecture-notes.tiu.edu.iq

Android Architecture− Android system architecture

18Dr. Mohamad Aldabagh

Page 19: Mobile Applications - lecture-notes.tiu.edu.iq

Android Architecture− Android system architecture

− The Linux kernel is used to provide some core system services,such as

security, memory management, process management, power management,and hardware drivers.

− These services cannot be called by Android programs directly andis transparent to users.

19

− The Linux Kernel provides a level of abstraction between thedevice hardware and the upper layers of the Android softwarestack.

Dr. Mohamad Aldabagh

Page 20: Mobile Applications - lecture-notes.tiu.edu.iq

Android Architecture− Android system architecture

− The next layer above the kernel is the native libraries, which areall written in C or C++.

20

− They are responsible for handling structured data storage,graphics, audio, video, and network, which only can be called byhigher-level programs.

Dr. Mohamad Aldabagh

Page 21: Mobile Applications - lecture-notes.tiu.edu.iq

Android Architecture− Android system architecture

− Android runtime is also on top of the kernel, and it includes theDalvik virtual machine and the core Java libraries.

21

− Some key core Android libraries:− android.database (SQLite)/− android.graphics (2D graphics)− android.opengl (3D graphics)− android.media (audio and video)− android.net (Network)− android.text (text)

Dr. Mohamad Aldabagh

Page 22: Mobile Applications - lecture-notes.tiu.edu.iq

Android Architecturev What is Dalvik?

− Dalvik is the process virtual machine inGoogle’s Android operating system, whichspecifically executes applications written forAndroid.

− Programs are written in Java and compiledto bytecode for the Java virtual machine,which is then translated to Dalvik bytecodeand stored in .dex and .odex files.

22Dr. Mohamad Aldabagh

Page 23: Mobile Applications - lecture-notes.tiu.edu.iq

Android Architecture− Android Runtime

− Runtime Each Androidapplication runs in a separateprocess

− Each process has its owninstance of the Dalvik(VM).

− Based on the Java VM, theDalvik design has been optimizedfor mobile devices.

− The Dalvik VM has a small memory footprint and optimizedapplication loading, and multiple instances of the Dalvik VM canrun concurrently on a device. 23

Dr. Mohamad Aldabagh

Page 24: Mobile Applications - lecture-notes.tiu.edu.iq

Android Architecture− Android system architecture

− The Application Framework is a set of services that collectivelyform the environment in which Android applications run and aremanaged.

− It comes pre-installed with Android, but can be extended with itsown components as needed.

24

− This framework implements the concept that Androidapplications are constructed from reusable, interchangeable andreplaceable components

Dr. Mohamad Aldabagh

Page 25: Mobile Applications - lecture-notes.tiu.edu.iq

Android Architecture− Application Framework

− The Android application framework provides everythingnecessary to implement an average application.

− All applications are written using Java/ Kotlin

25Dr. Mohamad Aldabagh

Page 26: Mobile Applications - lecture-notes.tiu.edu.iq

Android Architecture− Application Framework

− The Android application lifecycle involves thefollowing key components:− Activities are functions that the application performs.− Groups of views define the application’s layout.− Intents inform the system about an application’s plans.− Services allow for background processing without user

interaction.− Notifications alert the user when something interesting happens.− Content providers facilitate data transmission among different

applications26Dr. Mohamad Aldabagh

Page 27: Mobile Applications - lecture-notes.tiu.edu.iq

Android Architecture− Application and Widgets

− It comprise to:

− Located at the top of the Android software stack are theapplications..

1. The native applications provided with the particular Androidimplementation (for example web browser and emailapplications).

2. The third party applications installed by the user after purchasingthe device.

27Dr. Mohamad Aldabagh

Page 28: Mobile Applications - lecture-notes.tiu.edu.iq

Questions & Answers

36Dr. Mohamad Aldabagh

Page 29: Mobile Applications - lecture-notes.tiu.edu.iq

37Dr. Mohamad Aldabagh


Recommended