Android App Development. Ahmad Tayeb

Similar documents
SD Module- Android Programming

Android App Development

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

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

Minds-on: Android. Session 1

Android Development Tutorial. Yi Huang

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

Introduction To Android

Mobile development initiation

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

CS260 Intro to Java & Android 04.Android Intro

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

Syllabus- Java + Android. Java Fundamentals

ANDROID SYLLABUS. Advanced Android

Android Online Training

Introduction to Android

Mobile Computing. Introduction to Android

Introduction to Android

Lecture 2 Android SDK

COSC 3P97 Mobile Computing

Android App Development Workshop

IJRDTM Kailash ISBN No Vol.17 Issue

Introduction to Android development

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.

Mobile and Wireless Systems Programming

PAPER ON ANDROID ESWAR COLLEGE OF ENGINEERING SUBMITTED BY:

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

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

Mobile Programming Lecture 1. Getting Started

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

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Chapter 1 Hello, Android

Introduction to Android Application Development. Mike Kvintus Principal Engineer JDSU

Lecture 1 - Introduction to Android

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

Android Overview. Francesco Mercaldo, PhD

Android Training Overview (For Demo Classes Call Us )

Introduction to Android

Android App Development

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

ATC Android Application Development

Software Development & Education Center ANDROID. Application Development

Security Philosophy. Humans have difficulty understanding risk

Required Core Java for Android application development

Mobile and Ubiquitous Computing: Android Programming (part 1)

Questions and Answers. Q.1) Which of the following is the most ^aeuroeresource hungry ^aeuroepart of dealing with activities on android?

Android" Application Development SAMS. Sams Teach Yourself. Shane Conder. Lauren Darcey. Second Edition

Open Mobile Platforms. EE 392I, Lecture-6 May 4 th, 2010

Android. (XKE Mars 2009) Erwan Alliaume.

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

Android Application Development Course 28 Contact Hours

Mobile OS. Symbian. BlackBerry. ios. Window mobile. Android

DROID. By S.Gokulakrishnan AP/CSE SCSVMV

GUJARAT TECHNOLOGICAL UNIVERSITY

ITG Software Engineering

Android Essentials with Java

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

Android Application Sandbox. Thomas Bläsing DAI-Labor TU Berlin

Android Programming in Bluetooth Cochlea Group

Chapter 2. Operating-System Structures

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

IGEEKS TECHNOLOGIES. Software Training Division. Academic Live Projects For BE,ME,MCA,BCA and PHD Students

UNIT:2 Introduction to Android

SHWETANK KUMAR GUPTA Only For Education Purpose

(Refer Slide Time: 0:48)

Developer s overview of the Android platform

Chapter 2: Operating-System Structures

Android Ecosystem and. Revised v4presenter. What s New

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

CS 528 Mobile and Ubiquitous Computing Lecture 4a: Fragments, Camera Emmanuel Agu

Four Components of a Computer System

ANDROID NATIVE APP: INTRODUCTION TO ANDROID. Roberto Beraldi

Android Apps Development

Mobile Computing LECTURE # 2

ANDROID DEVELOPMENT. Course Details

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

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

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

ORACLE UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

android application development CONTENTS 1.1 INTRODUCTION TO O ANDROID OPERATING SYSTEM... TURES Understanding the Android Software Stack...

1. What are the key components of Android Architecture? 2. What are the advantages of having an emulator within the Android environment?

Introduction to Mobile Application and Development

ANDROID COURSE BROCHURE

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

Android Software Development Kit (Part I)

Diploma in Android Programming (DAP)

BCA 6. Question Bank

Developing Applications for ios

ECOM 5341 Mobile Computing(Android) Eng.Ruba A. Salamah

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

CS378 -Mobile Computing. Intents

CMSC436: Fall 2013 Week 4 Lab

COLLEGE OF ENGINEERING, NASHIK-4

MARATHI TEXT-TO-SPEECH SYNTHESISYSTEM FOR ANDROID PHONES

Chapter 2: System Structures

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

Android - open source mobile platform

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

Mobile Programming. Two Scenarios Web sites, like Tuubi where you read/write/download/ upload material

Java And Android Application Development For Dummies Ebook Set

Transcription:

Android App Development Ahmad Tayeb

Ahmad Tayeb Lecturer @ Department of Information Technology, Faculty of Computing and Information Technology, KAU Master degree from Information Sciences and Technologies, B. Thomas Golisano College of Computing and Information Sciences, Rochester Institute of Technology, Rochester, NY, USA http://ahmadt.com Twitter: @ahmad_tayeb

Android Android is a software package and Linux based operating system for mobile devices such as tablet computers and smartphones. It is developed by Google and later the OHA (Open Handset Alliance). Java language is mainly used to write the android code even though other languages can be used. What is Open Handset Alliance (OHA)? It's a consortium of 84 companies such as google, samsung, AKM, synaptics, KDDI, Garmin, Teleca, Ebay, Intel etc.

Features of Android It is open-source. Anyone can customize the Android Platform. There are a lot of mobile applications that can be chosen by the consumer.

Android Architecture Linux kernel Native libraries (middleware) Android Runtime Application Framework Applications

Android Architecture 1) Linux kernel It is the heart of android architecture that exists at the root of android architecture. Linux kernel is responsible for device drivers, power management, memory management, device management and resource access.

Android Architecture 2) Native Libraries On the top of Linux kernel, their are Native libraries such as WebKit, OpenGL, FreeType, SQLite, Media, C runtime library (libc) etc. The WebKit library is responsible for browser support, SQLite is for database, FreeType for font support, Media for playing and recording audio and video formats.

Android Architecture 3) Android Runtime In android runtime, there are core libraries and DVM (Dalvik Virtual Machine) which is responsible to run android application. DVM is like JVM but it is optimized for mobile devices. It consumes less memory and provides fast performance.

Android Architecture 4) Android Framework On the top of Native libraries and android runtime, there is android framework. Android framework includes Android API's such as UI (User Interface), telephony, resources, locations, Content Providers (data) and package managers. It provides a lot of classes and interfaces for android application development.

Android Architecture 5) Applications On the top of android framework, there are applications. All applications such as home, contact, settings, games, browsers are using android framework that uses android runtime and libraries. Android runtime and native libraries are using Linux kernel.

Android Core Building Blocks An android component is simply a piece of code that has a well defined life cycle e.g. Activity, Receiver, Service etc. The core building blocks or fundamental components of android are activities, views, intents, services, content providers, fragments and AndroidManifest.xml.

Android Core Building Blocks Activity An activity is a class that represents a single screen. It is like a Frame in AWT.

Android Core Building Blocks View A view is the UI element such as button, label, text field etc. Anything that you see is a view.

Android Core Building Blocks Intent Intent is used to invoke components. It is mainly used to: Start the service Launch an activity Display a web page Display a list of contacts Broadcast a message Dial a phone call etc.

Android Core Building Blocks Service Service is a background process that can run for a long time. There are two types of services local and remote. Local service is accessed from within the application whereas remote service is accessed remotely from other applications running on the same device.

Android Core Building Blocks Broadcast Receiver Broadcast Receiver handles communication between Android OS and applications. Broadcast Receivers simply respond to broadcast messages from other applications or from the system. For example, applications can also initiate broadcasts to let other applications know that some data has been downloaded to the device and is available for them to use, so this is broadcast receiver who will intercept this communication and will initiate appropriate action.

Android Core Building Blocks Content Provider Content Providers are used to share data between the applications.

Android Core Building Blocks Fragment Fragments are like parts of activity. An activity can display one or more fragments on the screen at the same time.

Android Core Building Blocks AndroidManifest.xml It contains informations about activities, content providers, permissions etc. It is like the web.xml file in Java EE.

Android Core Building Blocks Android Virtual Device (AVD) It is used to test the android application without the need for mobile or tablet etc. It can be created in different configurations to emulate different types of real devices.

Prerequisites Android programming is based on Java programming language so if you have basic understanding on Java programming then it will be a fun to learn Android application development.

Android Studio Android Studio is the official IDE for android application development. It works based on IntelliJ IDEA. https://developer.android.com/studio/

Your First Android App

Directory & Resource Type

Directory & Resource Type

Directory & Resource Type

Directory & Resource Type

Alternative Resources Your application should provide alternative resources to support specific device configurations. For example, you should include alternative drawable resources ( i.e.images ) for different screen resolution and alternative string resources for different languages. At runtime, Android detects the current device configuration and loads the appropriate resources for your application.

Alternative Resources Steps To specify configuration-specific alternatives for a set of resources, follow the following steps: Create a new directory in res/ named in the form <resources_name>- <config_qualifier>. Here resources_name will be any of the resources mentioned in the above table, like layout, drawable etc. The qualifier will specify an individual configuration for which these resources are to be used. Save the respective alternative resources in this new directory. The resource files must be named exactly the same as the default resource files, but these files will have content specific to the alternative. For example though image file name will be same but for high resolution screen, its resolution will be high.

Alternative Resources Configuration Qualifier Names Android supports several configuration qualifiers and you can add multiple qualifiers to one directory name, by separating each qualifier with a dash. https://developer.android.com/guide/topics/resources/providing-resources

Android Activity Lifecycle

Intents An Intent is a messaging object you can use to request an action from another app component. Although intents facilitate communication between components in several ways, there are three fundamental use cases: Starting an activity Starting a service Delivering a broadcast There are two types of intents: Explicit intents Implicit intents

Intents Types Explicit Intents Explicit intents specify which application will satisfy the intent, by supplying either the target app's package name or a fully-qualified component class name. You'll typically use an explicit intent to start a component in your own app, because you know the class name of the activity or service you want to start. For example, you might start a new activity within your app in response to a user action, or start a service to download a file in the background.

Intents Types Implicit Intents Implicit intents do not name a specific component, but instead declare a general action to perform, which allows a component from another app to handle it. For example, if you want to show the user a location on a map, you can use an implicit intent to request that another capable app show a specified location on a map.

References https://www.techotopia.com/index.php/handling_android_activity_state_change s https://developer.android.com/guide/topics/resources/providing-resources https://developer.android.com/guide/components/intents-filters http://donkcowan.com/blog/2013/4/21/android-activity-lifecycle-methodtypical-uses https://www.javatpoint.com/android-tutorial https://www.tutorialspoint.com/android https://www.devglan.com/android/android-service-example https://devcfgc.com/introduction-to-android-content-providers-685ed2468935 Head First Android Development: A Brain-Friendly Guide 1st Edition, By Dawn Griffiths.