Introduction to Android

Similar documents
Android App Development. Muhammad Sharjeel COMSATS Institute of Information Technology, Lahore

Activities. Repo:

Lecture 1 Introduction to Android. App Development for Mobile Devices. App Development for Mobile Devices. Announcement.

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Introduction to Android Android Smartphone Programming. Outline University of Freiburg. What is Android? Background University of Freiburg.

SD Module- Android Programming

Android. Operating System and Architecture. Android. Screens. Main features

Android Overview. Most of the material in this section comes from

Understand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml

CSCU9YH Development with Android

Android Software Development Kit (Part I)

Introduction to Android

Another difference is that the kernel includes only the suspend to memory mechanism, and not the suspend to hard disk, which is used on PCs.

Android Overview. Francesco Mercaldo, PhD

Android. Mobile operating system developed by Google A complete stack. Based on the Linux kernel Open source under the Apache 2 license

Android - open source mobile platform

Introduction to Android Application Development. Mike Kvintus Principal Engineer JDSU

Introduction to Android

CS260 Intro to Java & Android 04.Android Intro

COLLEGE OF ENGINEERING, NASHIK-4

Introduction To Android

Programming with Android: System Architecture. Luca Bedogni. Dipartimento di Scienze dell Informazione Università di Bologna

Programming with Android: System Architecture. Dipartimento di Scienze dell Informazione Università di Bologna

SHWETANK KUMAR GUPTA Only For Education Purpose

Introduction. Lecture 1. Operating Systems Practical. 5 October 2016

Real-Time Embedded Systems

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Embedded Systems Programming - PA8001

Chapter 1 Hello, Android

Programming with Android: System Architecture. Dipartimento di Scienze dell Informazione Università di Bologna

Android Application Development

Mobile and Wireless Systems Programming

Android Basics. - Bhaumik Shukla Android Application STEALTH FLASH

DROID. By S.Gokulakrishnan AP/CSE SCSVMV

Android App Development

An Introduction to Android. Jason Chen Developer Advocate Google I/O 2008

Android App Development. Ahmad Tayeb

IJRDTM Kailash ISBN No Vol.17 Issue

Mobile and Ubiquitous Computing: Android Programming (part 1)

UNDERSTANDING ACTIVITIES

Android Fundamentals - Part 1

Mobile Computing. Introduction to Android

Android Development Tutorial. Yi Huang

Android OS. Operating System based on Linux [ ] [Jonas Teuscher, Alex Cuordileone, Cédric Glaus]

Lecture 1 - Introduction to Android

COSC 3P97 Mobile Computing

Overview of Activities

Android. (XKE Mars 2009) Erwan Alliaume.

Android Ecosystem and. Revised v4presenter. What s New

Computer Science E-76 Building Mobile Applications

Smartphones Market Share 2011 Q2

Introduction to Android Development

Android Internals and the Dalvik VM!

Developer s overview of the Android platform

Why Android? Why Android? Android Overview. Why Mobile App Development? 20-Nov-18

PHONE ALERT SYSTEM ANISHA RAYAPATI. B. Tech., Jawaharlal Technological University, 2010 A REPORT

EMBEDDED SYSTEMS PROGRAMMING Application Basics

ios vs Android By: Group 2

Operating System Services. User Services. System Operation Services. User Operating System Interface - CLI. A View of Operating System Services

Android Programmierung leichtgemacht. Lars Vogel

Android. Lesson 1. Introduction. Android Developer Fundamentals. Android Developer Fundamentals. to Android 1

IJMIE Volume 2, Issue 4 ISSN:

Xin Pan. CSCI Fall

Android-Basics. Praktikum Mobile und Verteilte Systeme. Prof. Dr. Claudia Linnhoff-Popien André Ebert, Sebastian Feld

Vienos veiklos būsena. Theory

Android Activities. Akhilesh Tyagi

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edit9on

Chapter 2. Operating-System Structures

ATC Android Application Development

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi

Praktikum Mobile und Verteilte Systeme. Android-Basics. Prof. Dr. Claudia Linnhoff-Popien André Ebert, Sebastian Feld

Introduction to Android development

CS378 - Mobile Computing. Anatomy of an Android App and the App Lifecycle

States of Activities. Active Pause Stop Inactive

Android Programming in Bluetooth Cochlea Group

CHAPTER 2: SYSTEM STRUCTURES. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

Android System Architecture. Android Application Fundamentals. Applications in Android. Apps in the Android OS. Program Model 8/31/2015

Praktikum Entwicklung von Mediensystemen mit Android

LECTURE 12 BROADCAST RECEIVERS

What is Android? Mobile Device Application Development COMPSCI 345

ANDROID NATIVE APP: INTRODUCTION TO ANDROID. Roberto Beraldi

PAPER ON ANDROID ESWAR COLLEGE OF ENGINEERING SUBMITTED BY:

ANDRIOD APPLICATION: FOR MONITORING AVAILABILITY OF FACULTY

MODULE 2: GETTING STARTED WITH ANDROID PROGRAMMING

IJREAT International Journal of Research in Engineering & Advanced Technology, Volume 1, Issue 5, Oct-Nov, 2013 ISSN:

Analysis of Android Applications & Missed Call Alerts to Registered Address

ANDROID SYLLABUS. Advanced Android

Chapter 2: Operating-System Structures

Abstract. 1. Introduction

UNIT:2 Introduction to Android

Infrastructure Middleware (Part 3): Android Runtime Core & Native Libraries

Android In Industrial Applications. A Field Report

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edition

CS 4518 Mobile and Ubiquitous Computing Lecture 4: Data-Driven Views, Android Components & Android Activity Lifecycle Emmanuel Agu

Mobile development initiation

ABSTRACT I. INTRODUCTION. E. Susmitha, M. Himabindu M.Tech Academic Assistant, IIIT Rk Valley, Rgukt, Andhra Pradesh, India

Mobile Computing LECTURE # 2

Theme 2 Program Design. MVC and MVP

Have a development environment in 256 or 255 Be familiar with the application lifecycle

Android Application Development Course Code: AND-401 Version 7 Duration: 05 days

Transcription:

Introduction to Android

http://myphonedeals.co.uk/blog/33-the-smartphone-os-complete-comparison-chart www.techradar.com/news/phone-and-communications/mobile-phones/ios7-vs-android-jelly-bean-vs-windows-phone-8-vs-bb10-1159893

An operating system based on the Linux kernel and philosophy, adapted for mobile devices. Developed by the "Open Handset Alliance" (including Google). An Open Source project.

2003 Creation of Android Inc. Andy Rubin, Rich Miner, Nick Sears, Chris White 2005 Android Inc. taken over by Google Google wanted to create a flexible and upgradable system 2007 The world has seen the iphone Creation of Open Handset Alliance First Android presentation 2008 First Android device HTC Dream What was Android for?

Target which Android version? https://developer.android.com/about/dashboards/index.html

http://opensignal.com/reports/2015/08/android-fragmentation/

http://opensignal.com/reports/2015/08/android-fragmentation/

http://opensignal.com/reports/2015/08/android-fragmentation/

https://developer.android.com/about/dashboards/index.html

https://developer.android.com/guide/practices/screens_support.html

http://www.youtube.com/watch?v=qbgfus9mqyy

Android kernel = Linux kernel after minor modifications Kernel provides: Hardware abstraction layer Memory management Process management Network Management Power management Linux shell: adb shell Why the Linux kernel?

Code written in C or C ++ Examples: Surfaces Manager screen management OpenGL ES 2D and 3D graphics Media Framework codecs (MPEG 4, H.264, MP3, AAC) FreeType font rendering SQLite data storage Webkit web browser s engine

Android Runtime adaptation to mobile device conditions (limited CPU, memory, battery resources) Dalvik custom Java Virtual Machine implementation Differences between JVM: Dalvik uses.dex files Different set of libraries than JDK More compact and efficient implementation Dalvik is a register-based VM Why create a custom VM?

To turn on: In Android 4.4 ART (Android Runtime) has to be enabled in Settings -> Developer options. Advantages: (AOT) Ahead-of-time compilation Improved garbage collector mechanism Improved debugger java.lang.nullpointerexception: Attempt to write to field 'int android.accessibilityservice.accessibilityserviceinfo.flags' on a null object reference java.lang.nullpointerexception: Attempt to invoke virtual method 'java.lang.string java.lang.object.tostring()' on a null object reference Disadvantages: Some very old apps may not work correctly

Changes in application permissions - the system asks for permission (the first time) exactly when it is needed. Support for fingerprint readers USB Type C support Improved voice assistant Android Pay payments Improvements in the energy saving system

Split screen mode Notification priorities Improved doze mode DPI changing possible Newer Do not disturb mode Support for Vulkan API, Java 8

Why is the Java code not directly compiled into Dalvik Byte Code? http://markfaction.wordpress.com/2012/07/15/stack-based-vs-register-based-virtual-machine-architecture-and-the-dalvik-vm/

Main components: Activity Manager Life cycle management (and navigation) of the application Package Manager Management of installed applications Content Providers Manages data sharing between applications View System GUI layer management https://sites.google.com/site/io/inside-the-android-application-framework

Dalvik executable file + resources = APK Applications must be signed There is a debug key Multiple app stores: Google Play, Amazon AppStore, GetJar, AppBrain, F-Droid etc. = dex resources

adb shell

telnet localhost 5554 sms send <number> <text> gsm call <number>

The Android app consists of one or more components. Such an element can be: 1. Activity 2. Service 3. Broadcast receiver 4. Content provider

Activity 1 Activity 2 Activity 3

A service is a component that runs in the background to perform long-running operations or to perform work for remote processes. A service does not provide a user interface. For example, a service might play music in the background while the user is in a different app, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to it in order to interact with it. A service is implemented as a subclass of Service

A broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. Apps can also initiate broadcasts for example, to let other apps know that some data has been downloaded to the device and is available for them to use. Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs.

A Content Provider is a wrapper that hides the actual physical data. Users interact with their data through a common object interface. A content provider manages a shared set of app data. You can store the data in the file system, an SQLite database, on the web, or any other persistent storage location your app can access. Through the content provider, other apps can query or even modify the data (if the content provider allows it). For example, the Android system provides a content provider that manages the user's contact information. As such, any app with the proper permissions can query part of the content provider (such as ContactsContract.Data) to read and write information about a particular person.

http://wwwsimpleandroid.blogspot.com/2013/05/activity-stack-in-android.html

public class ExampleActivity extends Activity { @Override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); // It is created } @Override protected void onstart() { super.onstart(); // It is visible (eg. partially) } @Override protected void onresume() { super.onresume(); // Activity is visible (in foreground) } @Override protected void onpause() { super.onpause(); // Other activity has focus } @Override protected void onstop() { super.onstop(); // Activity is no longer visible } @Override protected void ondestroy() { super.ondestroy(); // The activity will be deleted } }