Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is...

16
Introduction to Android Android Smartphone Programming University of Freiburg Matthias Keil Institute for Computer Science Faculty of Engineering University of Freiburg October 19, 2015

Transcript of Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is...

Page 1: Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is very well developed and useful. Application Development Fundamentals and Principles

Introduction to AndroidAndroid Smartphone Programming

University of Freiburg

Matthias KeilInstitute for Computer ScienceFaculty of EngineeringUniversity of Freiburg

October 19, 2015

Page 2: Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is very well developed and useful. Application Development Fundamentals and Principles

OutlineUniversity of Freiburg

1 What is Android?

2 Development on Android

3 Applications: A Quick Glimpse

4 Summary

Matthias Keil Introduction to Android October 19, 2015 2 / 16

Page 3: Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is very well developed and useful. Application Development Fundamentals and Principles

What is Android?BackgroundUniversity of Freiburg

Mobile platform (More than an OS, has middle ware, keyapplications...)

Owned by Google/ developed by Open Handset Alliance

Linux kernel

Latest version: 6.0 ”Marshmallow” (October 2015)

Matthias Keil Introduction to Android October 19, 2015 3 / 16

Page 4: Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is very well developed and useful. Application Development Fundamentals and Principles

What is Android?SpecificationsUniversity of Freiburg

Media and Graphics Support.

Telecommunication and Location Access Support.

Very rich development environment:

Software Development Kit (an Application Framework).Plug-in for the Eclipse IDE.Debugging tools.

A new instance of the Dalvik Virtual machine for everyapplication on runtime.

Since 5.0 Android uses ART/ Ahead-of-time-CompilerAndroid Runtime (ART)

Matthias Keil Introduction to Android October 19, 2015 4 / 16

Page 5: Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is very well developed and useful. Application Development Fundamentals and Principles

Development on AndroidAndroid SDKUniversity of Freiburg

Enables manipulation of all device aspects in application.

Build applications from scratch or use existing APIs

Rich and Innovative aspects maintained.

Matthias Keil Introduction to Android October 19, 2015 5 / 16

Page 6: Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is very well developed and useful. Application Development Fundamentals and Principles

Development on AndroidAndroid SDKUniversity of Freiburg

Several libraries are included (written in C/C++) in the system’score components and are exposed to the developer in theapplication framework:

System C library

Media Libraries

Surface Manager

LibWebCore

SGL

3D libraries

FreeType

SQLite

Matthias Keil Introduction to Android October 19, 2015 6 / 16

Page 7: Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is very well developed and useful. Application Development Fundamentals and Principles

Android ArchitectureUniversity of Freiburg

[2]

Matthias Keil Introduction to Android October 19, 2015 7 / 16

Page 8: Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is very well developed and useful. Application Development Fundamentals and Principles

Development on AndroidApplication ComponentsUniversity of Freiburg

An Android Application is built by the following components:

Activities: Single screen with user interface. Result in a finaloutput for the user by working together, howevereach is independent of the other in terms ofimplementation and usability.

Services: Background component without user interface.Performs long-running operations or work forremote processes.

Content providers: Manages a shared set of application data.

Broadcast receivers: Responds to system-wide broadcastannouncements.

Matthias Keil Introduction to Android October 19, 2015 8 / 16

Page 9: Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is very well developed and useful. Application Development Fundamentals and Principles

Development on AndroidUnderlying ProcessesUniversity of Freiburg

During the runtime of applications a set of services and systemsare running:

Views: Basically different ways for data representation touser.

Resource Managers: Provides access to graphics, strings, andlayout files.

Notification Manager: Allows applications to display alerts instatus bar to interact with user.

Activity Manager: Manages Application Life Cycle.

Matthias Keil Introduction to Android October 19, 2015 9 / 16

Page 10: Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is very well developed and useful. Application Development Fundamentals and Principles

Applications: A Quick GlimpseThe Activity Life CycleUniversity of Freiburg

[1]

Matthias Keil Introduction to Android October 19, 2015 10 / 16

Page 11: Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is very well developed and useful. Application Development Fundamentals and Principles

Applications: A Quick GlimpseInteracting with the OutsideUniversity of Freiburg

[3]

Matthias Keil Introduction to Android October 19, 2015 11 / 16

Page 12: Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is very well developed and useful. Application Development Fundamentals and Principles

Applications: A Quick GlimpseInteracting with the OutsideUniversity of Freiburg

Interacting with Android System or other applications.

Use Intent Object, includes source, destination and type ofinteraction.

Broadcast Receiver handles incoming Intents.

Effective for real-time interaction.

Matthias Keil Introduction to Android October 19, 2015 12 / 16

Page 13: Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is very well developed and useful. Application Development Fundamentals and Principles

Applications: A Quick GlimpseDeclaring ContentUniversity of Freiburg

AndroidManifest.xml

Identify application requirements for user permissions.

Declare Hardware and Software features required to run.

Declare minimum API Level to run, and API Levels to belinked to if any.

Matthias Keil Introduction to Android October 19, 2015 13 / 16

Page 14: Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is very well developed and useful. Application Development Fundamentals and Principles

Applications: A Quick GlimpseDeclaring ContentUniversity of Freiburg

Content is not only limited to the previously mentionscomponents, other methods are used for further declarations.

drawable Directory: Contains images and drawings to beaccessed by AndroinManifest.xml.

strings.xml : Contains application-specific andinternationalization strings. Accessed byAndroinManifest.xml.

R.Java : Auto-generated file that keeps up with theAndroinManifest.xml. This makes an easy interfacewhile writing the Application’s source code.

Matthias Keil Introduction to Android October 19, 2015 14 / 16

Page 15: Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is very well developed and useful. Application Development Fundamentals and Principles

SummarySummaryUniversity of Freiburg

Android is a Software Stack not only an Operating System.

Application Framework on Android is very well developedand useful.

Application Development Fundamentals and Principlesprovide for an organised and rich environment for developers.

The Android Architecture makes for a very secure and stablesystem for all sorts of Applications to run on.

Matthias Keil Introduction to Android October 19, 2015 15 / 16

Page 16: Introduction to Android - uni-freiburg.de · 2019-10-22 · Application Framework on Android is very well developed and useful. Application Development Fundamentals and Principles

BibliographyUniversity of Freiburg

Android Developers.

Activity Life Cycle.http://developer.android.com/guide/topics/fundamentals/activities.html.

Android Developers.

Android Architecure.http://developer.android.com/guide/basics/what-is-android.html.

Android Developers.

Interacting Using Intents.http://developer.android.com/guide/topics/fundamentals/activities.html.

Matthias Keil Introduction to Android October 19, 2015 16 / 16