Introduction To Android

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

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

Group B: Assignment No 8. Title of Assignment: To verify the operating system name and version of Mobile devices.

COPYRIGHTED MATERIAL. 1Getting Started with Android Programming

BCA 6. Question Bank

UNIT:2 Introduction to Android

CSCU9YH Development with Android

Android Development Tools = Eclipse + ADT + SDK

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

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

Android Development Tutorial. Yi Huang

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

SD Module- Android Programming

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

SHWETANK KUMAR GUPTA Only For Education Purpose

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

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

Android Software Development Kit (Part I)

MODULE 2: GETTING STARTED WITH ANDROID PROGRAMMING

IJRDTM Kailash ISBN No Vol.17 Issue

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

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

Configuring the Android Manifest File

Android In Industrial Applications. A Field Report

Programming Concepts and Skills. Creating an Android Project

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

Using Eclipse for Android Development

Mobile Application Development

Embedded Systems Programming - PA8001

Android App Development. Ahmad Tayeb

CS 4518 Mobile and Ubiquitous Computing Lecture 2: Introduction to Android. Emmanuel Agu

Real-Time Embedded Systems

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

Applications. Marco Ronchetti Università degli Studi di Trento

PAPER ON ANDROID ESWAR COLLEGE OF ENGINEERING SUBMITTED BY:

Android Overview. Francesco Mercaldo, PhD

ANDROID SYLLABUS. Advanced Android

Minds-on: Android. Session 1

Chapter 1 Hello, Android

XML Tutorial. NOTE: This course is for basic concepts of XML in line with our existing Android Studio project.

Android App Development

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

Android App Development

Started with Android Programming for Tablets

Mobile Application Development - Android

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

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

Ahmed Ali Big fan of Android

Introduction to Android Development

LECTURE NOTES OF APPLICATION ACTIVITIES

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

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

LECTURE NOTES ON MOBILE APPLICATION DEVELOPMENT

Lecture 7: Data Persistence : shared preferences. Lecturer : Ali Kadhim Al-Bermani Mobile Fundamentals and Programming

ANDROID APPS (NOW WITH JELLY BEANS!) Jordan Jozwiak November 11, 2012

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

COSC 3P97 Mobile Computing

Mobile Programming Lecture 1. Getting Started

Android for Ubiquitous Computing Researchers. Andrew Rice University of Cambridge 17-Sep-2011

Mobile development initiation

Android. Michael Greifeneder. Image source: Android homepage

Getting Started with Android Development Zebra Android Link-OS SDK Android Studio

Mobile and Wireless Systems Programming

Android. (XKE Mars 2009) Erwan Alliaume.

CS 234/334 Lab 1: Android Jump Start

Introduction to Android

CS 528 Mobile and Ubiquitous Computing Lecture 1b: Introduction to Android. Emmanuel Agu

Android Basics. - Bhaumik Shukla Android Application STEALTH FLASH

CS 403X Mobile and Ubiquitous Computing Lecture 3: Introduction to Android Programming Emmanuel Agu

University of Stirling Computing Science Telecommunications Systems and Services CSCU9YH: Android Practical 1 Hello World

CS260 Intro to Java & Android 04.Android Intro

Introduction to Android Application Development. Mike Kvintus Principal Engineer JDSU

Mobile Devices and Smartphones

Android-Basics. Praktikum Mobile und Verteilte Systeme

Building MyFirstApp Android Application Step by Step. Sang Shin Learn with Passion!

Mobile Computing. Introduction to Android

UNDERSTANDING ACTIVITIES

Introduction to Android

Android Ecosystem and. Revised v4presenter. What s New

Android Application Development. By : Shibaji Debnath

Introduction to Mobile Application and Development

COMP4521 EMBEDDED SYSTEMS SOFTWARE

What is Android? Mobile Device Application Development COMPSCI 345

EMBEDDED SYSTEMS PROGRAMMING Application Basics

ORACLE UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

ECE 1778: Creative Applications for Mobile Devices

Android Application Development

Abstract. 1. Introduction

Android Online Training

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

M O B I L E T R A I N I N G. Beginning Your Android Programming Journey

Developer s overview of the Android platform

Mobile and Ubiquitous Computing: Android Programming (part 1)

Required Core Java for Android application development

Android Programmierung leichtgemacht. Lars Vogel

COLLEGE OF ENGINEERING, NASHIK-4

Tutorial on Basic Android Setup

User Interface Design & Development

Introduction to Android

Programmazione di sistemi mobili e tablet

Transcription:

Introduction To Android

Mobile Technologies Symbian OS ios BlackBerry OS Windows Android

Introduction to Android Android is an operating system for mobile devices such as smart phones and tablet computers. It is developed by the Open Handset Alliance led by Google. Android is a mobile operating system that is based on a modified version of Linux.

OHA (Open Handset Alliance) A business alliance consisting of 47 companies to develop open standards for mobile devices

Introduction Google wanted Android to be open and free; hence, most of the Android code was released under the open source Apache License. Different vendors design their own hardware and use Android as the operating system that powers it. Developers need only develop for Android, and their applications should be able to run on numerous different devices which are powered using Android.

Android Versions Android Version Release Date Code Name 1.1 9 th Feb 2009 1.5 30 th April 2009 Cupcake 1.6 15 th September 2009 Donut 2.0 / 2.1 26 th October 2009 Éclair 2.2 20 th May 2010 Froyo 2.3 6 December 2010 Gingerbread 3.0 / 3.1 / 3.2 22 nd Feb 2011 Honeycomb 4.0 19 th October 2011 Ice Cream Sandwich 4.1 / 4.2 / 4.3 27 th June 2012 Jelly Bean 4.4 3 rd September 2013 Kitkat 5.0 2014 Lollipop 6.0 2015 Marshmallows 7.0 22 nd August 2016 Nougat

Features of Android Storage : Uses SQLite Connectivity : Supports GSM/EDGE, Bluetooth, Wi-Fi etc Messaging : Supports SMS, MMS Web browser : Based on the open source WebKit + Chrome Media support : MP3, MP4, WAV, JPEG, etc Hardware support : Accelerometer Sensor, Camera, Digital Compass, Proximity Sensor, and GPS

Features of Android Multi-touch : Supports multi-touch screens Multi-tasking : Supports multi-tasking applications Flash support : Android 2.3 supports Flash 10.1. Tethering : Supports sharing of Internet connections as a wired/wireless hotspot

Android Architecture The Android OS is roughly divided into five sections in four main layers: Linux kernel Libraries Android runtime Application framework Applications

Android Architecture

Android Architecture Linux kernel This is the kernel on which Android is based. This layer contains all the low level device drivers for the various hardware components. Libraries These contain all the code that provides the main features of an Android OS. SQLite library provides database support. WebKit library provides functionalities for web browsing.

Android Architecture Android runtime Android runtime provides a set of core libraries that enable developers to write Android apps using the Java programming language. It includes the Dalvik Virtual Machine, which enables every Android application to run in its own process with its own instance of the Dalvik virtual machine. Dalvik is a specialized virtual machine designed specifically for Android and optimized for battery-powered mobile devices with limited memory and CPU

Android Architecture Application framework Exposes the various capabilities of the Android OS to application developers so that they can make use of them in their applications. Applications At this top layer, you will find applications that ship with the Android device, as well as applications that you download and install from the Android Market

Obtaining The Required Tools JAVA JDK The Android SDK makes use of the Java SE Development Kit (JDK). Android SDK The Android SDK contains a debugger, libraries, an emulator, documentation, sample code, and tutorials. Eclipse ANDROID STUDIO

Dalvik Virtual Machine The Dalvik Virtual Machine (DVM) is an android virtual machine optimized for mobile devices. Optimizes the virtual machine for memory, battery life and performance. The Dex compiler converts the class files into the.dex file that run on the Dalvik VM. Multiple class files are converted into one dex file.

Dalvik Virtual Machine The javac tool compiles the java source file into the class file. The dx tool takes all the class files of your application and generates a single.dex file. It is a platform-specific tool. The Android Assets Packaging Tool (aapt) handles the packaging process.

Dalvik Virtual Machine

Dalvik Virtual Machine Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimised for minimal memory footprint.

Android Application package Android Package Kit (APK) is the package file format used by the Android OS for distribution and installation of mobile apps. To make an APK file, a program for Android is first compiled, and then all of its parts are packaged into one file. An APK file contains all of that program's code (such as.dex files), resources, assets, certificates, and manifest file. As is the case with many file formats, APK files can have any name needed, provided that the file name ends in ".apk"

ECCLIPSE INSTALLATION

Configuring The Android SDK Manager

Configuring The Android SDK Manager Each version of the Android OS is identified by an API level number. For each level, two platforms are available. SDK Platform Google APIs by Google Inc. Google APIs platform contains additional APIs provided by Google (such as the Google Maps library).

Configuring The Android SDK Manager

Creating Android Virtual Devices (Avds)

Creating Android Virtual Devices (Avds)

Creating Android Virtual Devices (Avds)

Creating Your First Android Application Using Eclipse, create a new project by selecting File New Project

Creating Your First Android Application

Creating Your First Android Application

Creating Your First Android Application

Creating Your First Android Application

Creating Your First Android Application

Creating Your First Android Application

Anatomy Of An Android Application Source code String constants Auto-generated code Configuration UI layout

Anatomy Of An Android Application src: Contains the.java source files for your project You write the code for your application in this file. gen: Contains the R.java file, a compiler-generated file that references all the resources found in your project. All the resources in your project are automatically compiled into this class so that you can refer to them using the class.

Anatomy Of An Android Application assets: This folder contains all the assets used by your application, such as HTML, text files, data bases, etc. bin: This folder contains the files built by the ADT during the build process. In particular, it generates the.apk file (Android Package). An.apk file is the application binary of an Android application. It contains everything needed to run an Android application.

Anatomy Of An Android Application res: This folder contains all the resources used in your application. It also contains a few other subfolders: drawable- <resolution>, layout, and values. AndroidManifest.xml: This is the manifest file for your Android application. Here you specify the permissions needed by your application, as well as other features (such as intent-filters, receivers, etc.).

Anatomy Of An Android Application main.xml file defines the user interface for your activity. <TextView android:layout_width= fill_parent android:layout_height= wrap_content android:text= @string/hello /> The @string in this case refers to the strings.xml file located in the res/values folder. @string/hello refers to the hello string defined in the strings.xml file, which is Hello World, HelloWorldActivity! :

Anatomy Of An Android Application strings.xml: <?xml version= 1.0 encoding= utf-8?> <resources> <string name= hello >Hello World, HelloWorldActivity!</string> <string name= app_name >HelloWorld</string> </resources> It is recommended that you store all the string constants in your application in this strings.xml file and reference these strings using the @string identifier.

Anatomy Of An Android Application AndroidManifest.xml:

AndroidManifest.xml The AndroidManifest.xml file contains information of your package, including components of the application such as activities, services, broadcast receivers, content providers etc. It is responsible to protect the application to access any protected parts by providing the permissions. It also declares the android api that the application is going to use. This is the required xml file for all the android application and located inside the root directory.

Elements of AndroidManifest.xml <manifest> : Manifest is the root element of the AndroidManifest.xml file. It has package attribute that describes the package name of the activity class. <application> : Application is the sub-element of the manifest. It includes the namespace declaration. This element contains several sub-elements that declares the application component such as activity etc. The commonly used attributes are of this element are icon, label, theme etc.

Elements of AndroidManifest.xml <activity> : Activity is the sub-element of application and represents an activity that must be defined in the AndroidManifest.xml file. It has many attributes such as label, name, theme, launch Mode etc. android:label represents a label i.e. displayed on the screen. android:name represents a name for the activity class. It is required attribute. <intent-filter> : Intent Filter is the sub-element of activity that describes the type of intent to which activity, service or broadcast receiver can respond to.

Elements of AndroidManifest.xml <action> : It adds an action for the intent-filter. The intent-filter must have at least one action element. The action for the intent filter is named android.intent.action.main to indicate that this activity serves as the entry point for the application. <category> : It adds a category name to an intentfilter. The category for the intent-filter is named android.intent.category.launcher to indicate that the application can be launched from the device s launcher icon.

Anatomy Of An Android Application HelloWorldActivity.java: import android.app.activity; import android.os.bundle; public class HelloWorldActivity extends Activity { /** Called when the activity is first created. */ @Override public void oncreate(bundle savedinstancestate) { } super.oncreate(savedinstancestate); setcontentview(r.layout.main); }

ANDROID STUDIO

Installing Android Studio

Installing Android Studio

Installing Android Studio

Installing Android Studio

Installing Android Studio

Creating Android Virtual Device AVD Manager

Creating Android Virtual Device

Creating Android Virtual Device

Creating Android Virtual Device

Creating Android Virtual Device

Basic Building Blocks Activities Services Broadcast Receivers Content providers

Activity The building block of the user interface is the Activity. You can think of an activity as being the Android analogue for the window or dialog in a desktop application, or the page in a classic Web app. Normally, an activity will take up most of the screen, leaving space for some chrome bits like the clock, signal strength indicators, and so forth.

Activity

Services Activities are short-lived and can be shut down at any time, such as when the user presses the BACK button. Services, on the other hand, are designed to keep running, if needed, independent of any activity, for a short period of time. You might use a service for checking for updates to an RSS feed, or to play back music even if the controlling activity is no longer operating.

Content Providers Content providers provide a level of abstraction for any data stored on the device that is accessible by multiple applications. The Android development model encourages you to make your own data available to other applications, as well as your own building a content provider lets you do that, while maintaining a degree of control over how your data gets accessed.

Broadcast Receivers The system, or applications, will send out broadcasts from time to time, for everything from the battery getting low, to when the screen turns off, to when connectivity changes from WiFi to mobile data. A broadcast receiver can arrange to listen for these broadcasts and respond accordingly.

THE END