Android Platform, Android App Basic Components

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Android Application Development A Tutorial Driven Course.
Google Android Introduction to Mobile Computing. Android is part of the build a better phone process Open Handset Alliance produces Android Comprises.
Introduction.  Professor  Adam Porter 
Android architecture overview
DEPARTMENT OF COMPUTER ENGINEERING
ANDROID OPERATING SYSTEM Guided By,Presented By, Ajay B.N Somashekar B.T Asst Professor MTech 2 nd Sem (CE)Dept of CS & E.
Mobile Application Development
Google Android as a mobile development platform T Internet Technologies for Mobile Computing Olli Mäkinen.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
Introduction to Android Platform Overview
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
Android Programming Day best Android Apps Lzo&feature=fvwrel.
Android Introduction Platform Overview.
One day Workshop on "Android Application Development"
Mobile Application Development with ANDROID Tejas Lagvankar UMBC 29 April 2009.
About me Yichuan Wang Android Basics Credit goes to Google and UMBC.
Introduction to Android Swapnil Pathak Advanced Malware Analysis Training Series.
Android Introduction Based on slides made by
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Android Programming By Mohsen Biglari Android Programming, Part1: Introduction 1 Part1: Introduction By Mohsen Biglari.
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
ANDROID Presented By Mastan Vali.SK. © artesis 2008 | 2 1. Introduction 2. Platform 3. Software development 4. Advantages Main topics.
Android for Java Developers Denver Java Users Group Jan 11, Mike
ANDROID 응용 프로그래밍 과정 – 목차 - 안드로이드란 - 안드로이드가 만들어지게 된배경 - 안드로이드의 철학 - 안드로이드 환경설정 ( SDK download, eclipse plug-in 설정, 간단한 프로그램 실행 ) - 안드로이드 동작원리 - 안드로이드 핵심.
ANDROID BY:-AANCHAL MEHTA MNW-880-2K11. Introduction to Android Open software platform for mobile development A complete stack – OS, Middleware, Applications.
Created By. Jainik B Patel Prashant A Goswami Gujarat Vidyapith Computer Department Ahmedabad.
1 Android Introduction Platform Overview. 2 What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware.
ANDROID APPLICATION DEVELOPMENT. ANDROID DEVELOPMENT DEVELOPER.ANDROID.COM/INDEX.HTML THE OFFICIAL SITE FOR ANDROID DEVELOPERS. PROVIDES THE ANDROID SDK.
CHAPTER 1 Introduction. Chapter objectives: Understand what Android is Learn the differences between Java and Android Java Examine the Android project.
1 Android Workshop Platform Overview. 2 What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware.
Android operating system N. Sravani M. Tech(CSE) (09251D5804)
By Adam Reimel. Outline Introduction Platform Architecture Future Conclusion.
Java & The Android Stack: A Security Analysis Pragati Ogal Rai Mobile Technology Evangelist PayPal, eBay Java.
ANDROID OS Ravi Soni MTech (CS) III Sem. W HAT IS A NDROID ? Android is a software stack for mobile devices that includes an operating system, middleware.
Android. Android An Open Handset Alliance Project A software platform and operating system for mobile devices Based on the Linux kernel Developed by Google.
Presented by: Saurabh Kumar Sinha (MRT07UGBIT 186) IT VII Semester, Shobhit University Meerut.
Introduction to Android Programming
Introduction to Android Chapter 1 1. Objectives Understand what Android is Learn the differences between Java and Android Java Examine the Android project.
The Basics of Android App Development Sankarshan Mridha Satadal Sengupta.
Intro To Android Programming
Computer System Structures
Android Mobile Application Development
Android Application -Architecture.
INFO 448: Android Development
Lecture 2: Android Concepts
Visit for more Learning Resources
Architecture of Android
ANDROID AN OPEN HANDSET ALLIANCE PROJECT
Android Runtime – Dalvik VM
Android Studio, Android System Basics and Git
Android.
Topic: Difference b/w JDK, JRE, JIT, JVM
CASE STUDY 1: Linux and Android
Java programming lecture one
Contents: Introduction Different Mobile Operating Systems
CMPE419 Mobile Application Development
Mobile Handset Virtual Machine
Application Development A Tutorial Driven Course
CHAPTER 1 Introduction Chapter objectives: Understand what Android is
Android Developer Fundamentals V2
Java Programming Introduction
Android Application Development
Android Introduction Platform Mihail L. Sichitiu.
Emerging Platform#3 Android & Programming an App
Getting Started with Android…
Lecture 2: Android Concepts
CMPE419 Mobile Application Development
Presentation transcript:

Android Platform, Android App Basic Components Mobile Programming Android Platform, Android App Basic Components

What is Android? Android is an operating system and programming platform for smartphones and other mobile devices (such as tablets). Android includes a software development kit for writing original code and assembling software modules to create apps for Android users. It also provides a marketplace to distribute apps. All together, Android represents an ecosystem for mobile apps.

Android Open Source Project Android is a widely-adopted open-source project. Owned by Open Handset Alliance Google formed a group of hardware, software, and telecommunication companies called the Open Handset Alliance with the goal of contributing to Android development.  Made up of 84 companies

Android Architecture

Contd. Applications Your apps live at this level, along with core system apps for email, SMS messaging, calendars, Internet browsing, or contacts.

Contd. Java API Framework/Android Framework All features of Android are available to developers through application programming interfaces (APIs) written in the Java language. Like: View System used to build an app's UI, including lists, buttons, and menus. Resource Manager used to access to non-code resources such as localized strings, graphics, and layout files. Notification Manager used to display custom alerts in the status bar. Activity Manager that manages the lifecycle of apps, etc.

Contd. Libraries and Android Runtime Each app runs in its own process and with its own instance of the Android Runtime, which enables multiple virtual machines on low-memory devices. Android also includes a set of core runtime libraries. Many core Android system components and services are built from native code that require native libraries written in C and C++. These native libraries are available to apps through the Java API framework.

Contd. Hardware Abstraction Layer (HAL) This layer provides standard interfaces that expose device hardware capabilities to the higher-level Java API framework. The HAL consists of multiple library modules, each of which implements an interface for a specific type of hardware component, such as the camera or bluetooth module.

Contd. Linux Kernel At it’s base, Android runs on a Linux kernel for interacting with the device’s processor, memory, etc. Thus an Android device can be seen as a Linux computer.

What is Android SDK? The Android SDK (software development kit) is a set of development tools used to develop applications for Android platform. The Android SDK includes the following: adb, the “Android Debug Bridge”, which is a connection between your computer and the device (physical or virtual). This tool is used for console output! Required libraries Debugger An emulator Relevant documentation for the Android application program interfaces (APIs) Sample source code Tutorials for the Android OS

What is Android NDK? Native Development Kit The Android NDK is a toolset that lets you implement parts of your app in native code, using languages such as C and C++. For certain types of apps, this can help you reuse code libraries written in those languages.

What is Android Runtime? An application runtime environment used by the Android operating system. Replacing Dalvik, the process virtual machine originally used by Android, ART performs the translation of the application's bytecode into native instructions that are later executed by the device's runtime environment. Pre-Lollipop (5.0), Android code ran on Dalvik: a virtual machine similar to the JVM used by Java SE. A developer would write Java code, which would then be compiled into JVM bytecode, which would then be translated into DVM (Dalvik virtual machine) bytecode, that could be run on Android devices. This DVM bytecode was stored in .dex or .odex (“[Optimized] Dalvik Executable”) files, which is what was loaded onto the device. Dalvik does include JIT (“Just In Time”) compilation to native code that runs much faster than the code interpreted by the virtual machine. This navite code is faster because no translation step is needed to talk to the actual hardware (the OS). From Lollipop (5.0) on, Android instead uses Android Runtime (ART) to run code. ART’s biggest benefit is that it compiles the .dex bytecode into native code on installation using AOT (“Ahead of Time”) compilation. ART continues to accept .dex bytecode for backwards compatibility (so the same dexing process occurs), but the code that is actually installed and run on a device is native. This allows for applications to have faster execution, but at the cost of longer install times—but since you only install an application once, this is a pretty good trade.

Building an App Write code in JAVA and XML Generate Java source files (e.g., from resource files, which are written XML used to generate Java code) Compile Java code into JVM bytecode “dex” the JVM bytecode into Dalvik bytecode Pack in assets and graphics into an APK Cryptographically sign the APK file to verify it Load it onto the device

Gradle An automated build System They let you specify a single command that will do a bunch of steps at once (e.g., compile files, dex files, move files, etc). These are how we make the “build script” that does the build steps listed above. The build system automatically takes all the source files (.java or .xml), then applies the appropriate tool (e.g. takes java class files and converts them to dex files), and groups all of them into one compressed file, our beloved APK. Android Studio uses Gradle, an advanced build toolkit, to automate and manage the build process, while allowing you to define flexible custom build configurations.

Languages Used Java: Android code (program control and logic, as well as data storage and manipulation) is written in Java. Writing Android code will feel a lot writing any other Java program: you create classes, define methods, instantiate objects, and call methods on those objects. But because you’re working within a framework, there is a set of code that already exists to call specific methods. As a developer, your task will be to fill in what these methods do in order to run your specific application. XML: Android user interfaces and resources are specified in XML (Extensible Markup Language). XML is just like HTML, but you get to make up your own tags. Except we’ll be using the ones that Android made up; so it’s like defining web pages, except with a new set of elements. 

Android Application Fundamentals Android apps can be written using Kotlin, Java, and C++ languages. The Android SDK tools compile your code along with any data and resource files into an APK, an Android package, which is an archive file with an .apk suffix. One APK file contains all the contents of an Android app and is the file that Android-powered devices use to install the app. Each Android app lives in its own security sandbox, protected by the following Android security features: The Android operating system is a multi-user Linux system in which each app is a different user. By default, the system assigns each app a unique Linux user ID (the ID is used only by the system and is unknown to the app). The system sets permissions for all the files in an app so that only the user ID assigned to that app can access them. Each process has its own virtual machine (VM), so an app's code runs in isolation from other apps. By default, every app runs in its own Linux process. The Android system starts the process when any of the app's components need to be executed, and then shuts down the process when it's no longer needed or when the system must recover memory for other apps.

Basic App Components

App Components App components are the essential building blocks of an Android app There are four basic app components: Activities Services Broadcast receivers Content providers Each type serves a distinct purpose and has a distinct lifecycle that defines how the component is created and destroyed.

Activity Activity is the entry point in an Android application that a user can interact with. To be more clear, an Activity is each and every single screen that you look at your Android device to interact with.

Services A component that runs in the background so that it can perform long, running operations or perform work for remote processes Bound Type Service Started Type Service Scheduled Type Service

Broadcast Receivers Broadcast Receiver” is self-explanatory. It is used to receive Broadcast Messages from the System. Let’s make it more clear, when you plug in the charger, then the charging sign will automatically get displayed on the battery icon. In whichever activity you are, when the phone is charging, then the sign will automatically come up. Let’s have another scenario, when you set alarms to give you notifications, the system will tell inform it to you in the form of a notification. Much of the broadcasting is done by the system, like when your battery is low or when the download is done or when the screen is locked, etc.

Content Provider Used to provide the content(data) or to access the data by other applications which is stored by itself. The most important use of content provider is that you can configure a content provider to allow other applications to securely access and modify your app data as listed in the figure.

Thank You!