Introduction to Android Programming

Slides:



Advertisements
Similar presentations
Android Application Development A Tutorial Driven Course.
Advertisements

Google Android Introduction to Mobile Computing. Android is part of the build a better phone process Open Handset Alliance produces Android Comprises.
Android OS : Core Concepts Dr. Jeyakesavan Veerasamy Sr. Lecturer University of Texas at Dallas
All About Android Introduction to Android 1. Creating a New App “These aren’t the droids we’re looking for.” Obi-wan Kenobi 1. Bring up Eclipse. 2. Click.
Filip Debelić What is it? Android is a mobile operating system (OS) based on the Linux kernel and currently developed by Google Android,
Google Android as a mobile development platform T Internet Technologies for Mobile Computing Olli Mäkinen.
Android Programming Beomjoo Seo Sep., 12 CS5248 Fall 2012.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
UFCFX5-15-3Mobile Device Development Android Development Environments and Windows.
@2011 Mihail L. Sichitiu1 Android Introduction Application Fundamentals.
INTERNATIONAL SUMMER ACADEMIC COURSE UNIVESITY OF NIS ISAC – Android programming.
Android Application Development CSE 5520/4520 Wireless Networks.
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
Mobile Programming Lecture 1 Getting Started. Today's Agenda About the Eclipse IDE Hello, World! Project Android Project Structure Intro to Activities,
Android and Eclipse Thaddeus Diamond CPSC 112. A Quick Introduction Eclipse is an IDE (Integrated Development Environment Open Source Much more full-featured.
Mobile Application Development with ANDROID Tejas Lagvankar UMBC 29 April 2009.
Chapter 3 Navigating a Project Goals & Objectives 1.Get familiar with the navigation of the project. How is everything structured? What settings can you.
© Keren Kalif Intro to Android Development Written by Keren Kalif, Edited by Liron Blecher Contains slides from Google I/O presentation.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Android Programming By Mohsen Biglari Android Programming, Part1: Introduction 1 Part1: Introduction By Mohsen Biglari.
Introduction to Android Programming (CS5248 Fall 2015) Aditya Kulkarni August 26, 2015 *Based on slides from Paresh Mayami.
Android Info mostly based on Pro Android 3.  User Applications  Java Libraries – most of Java standard edition ◦ Activities/Services ◦ UI/Graphics/View.
PARSING FACEBOOK DATA FOR ANDROID 1. Step by Step  Import Android SDK  Get the hash key  Create a new app  Create a new project in Eclipse 
Prerequisites Android Studio – io.html io.html Java.
01. Introduction to Android Prof. Oum Saokosal Master of Engineering in Information Systems, South Korea
Ali Shahrokni Application Components Activities Services Content providers Broadcast receivers.
ANDROID Presented By Mastan Vali.SK. © artesis 2008 | 2 1. Introduction 2. Platform 3. Software development 4. Advantages Main topics.
Rajab Davudov. Agenda Eclipse, ADT and Android SDK APK file Fundamentals – Activity – Service – Content Provider – Broadcast Receiver – Intent Hello World.
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit
Mobile Application Development using Android Lecture 2.
DUE Hello World on the Android Platform.
Android for Java Developers Denver Java Users Group Jan 11, Mike
Presented By: Muhammad Tariq Software Engineer Android Training course.
Overview of Android Application Development
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
COMP 365 Android Development.  Every android application has a manifest file called AndroidManifest.xml  Found in the Project folder  Contains critical.
 Installation of Android Development Environment  Creating the App with OpenGL ES API  Running the App on Emulator Android App Development.
ANDROID APPLICATION DEVELOPMENT. ANDROID DEVELOPMENT DEVELOPER.ANDROID.COM/INDEX.HTML THE OFFICIAL SITE FOR ANDROID DEVELOPERS. PROVIDES THE ANDROID SDK.
TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents.
Intoduction to Andriod studio Environment With a hello world program.
Lecture 2: Android Concepts
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
Mobile Device Development
Android Mobile Application Development
Android Application -Architecture.
Lecture 2: Android Concepts
Android 01: Fundamentals
Android Application Development 1 6 May 2018
Obtaining the Required Tools
Lecture 2 Zablon Ochomo Android Programming Lecture 2 Zablon Ochomo
Android Runtime – Dalvik VM
Android Studio, Android System Basics and Git
Android.
CMPE419 Mobile Application Development
Android Programming Lecture 9
Application Fundamentals
Application Development A Tutorial Driven Course
Android Developer Fundamentals V2
Android Programming Tutorial
The Most Popular Android UI Automation Testing Tool Andrii Voitenko
Android Application Development
Android Platform, Android App Basic Components
Emerging Platform#3 Android & Programming an App
Application Fundamentals
Lecture 2: Android Concepts
Android Development Introduction to Android Development 2011/01/16
CMPE419 Mobile Application Development
CA16R405 - Mobile Application Development (Theory)
Presentation transcript:

Introduction to Android Programming

Contents Basic Concepts Environment Setup Creating and Building Android App

Android Android apps are written in Java The Android OS is a multi-user Linux system Android app lives in its own security sandbox System assigns each app a unique Linux user ID Each process has its own virtual machine Every application runs in its own Linux process

Application Components Android Application .apk : Android package Four Application Components Activity Service Content Provider Broadcast Receiver Communication among components except Content Provider Intent extension

Activity Activity Lifecycle Implement Lifecycle Callbacks

Activity Start an Activity Start an Activity for a Result Caller Activity Callee Activity

Activities and Stack

Services A service is a component that runs in the background to perform long-running operations A service does not provide a user interface Activity can start the service and let it run or bind to it in order to interact with it e.g., a service might play music in the background while the user is in a different app

Broadcast Receivers A broadcast receiver is a component that responds to system-wide broadcast announcements Apps can also initiate broadcasts Although broadcast receivers don't display a UI, they may create a status bar notification to alert the user when a broadcast event occurs

Content Providers A content provider manages a shared set of app data Through the content provider, other apps can query or even modify the data Any app with the proper permissions can query part of the content provider

Intent An intent is an abstract description of an operation to be performed startActivity sendBroadcast startService (bindService) …

Environment Setup Step 1: Install JDK

JDK Installation Can download the JDK for your OS at http://java.oracle.com Alternatively, OS X: Open "Terminal” Type javac at command line Install Java when prompt appears Linux: Type sudo apt–get install default–jdk at command line (Debian, Ubuntu) Other distributions: consult the documentation JDK and JRE are different!

Environment Setup Step 2: Configure the Android SDK

SDK Configuration Download Android SDK from http://developer.android.com Or Simplest: Download and install Android Studio bundle (including Android SDK) Software development kit

Eclipse IDE- Official IDE for Android development Integrated development environment Eclipse IDE- Official IDE for Android development Apache Ant for building projects

Android focused IDE, designed specifically for Android development. Contains all SDK tools for develop, debug, or test.

Android Studio Android Development Environment based on IntelliJ IDEA Software development kit

Android Studio Android uses Gradle Gradle is an open source build system that combines the power of Ant and Maven Software development kit

Android Studio Software development kit

Run Android SDK Manager Recommended: Install Android 2.2, 2.3.3 APIs and 4.x API Do not worry about Intel x86 Atom, MIPS system images Settings

Now you are ready for Android development!

Create New Android Project

Create Activity

The Manifest File Identify any user permissions the application requires Declare the minimum API level required by the application Declare hardware and software features used or required by the application API libraries the application needs to be linked

The Manifest File

The Manifest File Do not forget to declare Components in the Manifest

Permission Add following permissions to the Manifest file

Sample Code

UI – Declaring Layout Initiated when called setContentView() on onCreate() Use Visual Layout Editor for initial layout design Edit XML file extensively

Editing Sample Code “@+id/helloId” Add id to main.xml Edit HelloWorldActivity.java

A Sample Code Important points UI Element has an Id Variables in our code link to UI elements Update UI element content from the program 1 2 Hello world! 3

UI – Handling UI Events onClick, onLongClick, onKey, onTouch, …

Sample Implementation MainActivity Option menu Context menu Capture Play click CaptureActivity Upload Service Capture Button Click PlayerActivity Background Upload

Building Process Running

Running Sample App

App Failure

Debugging, look at DDMS !!! “Dalvik Debug Monitor Service”

Enabling USB Debugging

Thank You! Any questions *These slides are based on the slides from http://www.comp.nus.edu.sg/~cs5248/l03/L3-ProgrammingInAndroid.pdf