Android Tutorial Android Written in Java Utilizes Dalvik VM – Just in time (JIT) compilation since Android 2.2.

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.
Ando-it-yourself droid Praveen Kumar Pendyala. Outline Brief intro to the Droid developement Setting up the Life saviors - Development tools Hello Droid.
Android OS : Core Concepts Dr. Jeyakesavan Veerasamy Sr. Lecturer University of Texas at Dallas
CE881: Mobile and Social Application Programming Simon M. Lucas Menus and Dialogs.
Intro to Android Chris Risner. About Me Mobile Team Leader at Quicken Loans Co-Founder of Detroit GTUG
Android architecture overview
Joemarie Comeros Amparo Android Development Orientation for Starters.
Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna.
Android and Project Structure. Android Android OS – Built on Linux Kernel – Phones – Netbooks – Readers – Other???
Google Android as a mobile development platform T Internet Technologies for Mobile Computing Olli Mäkinen.
Android Application Development Stephen Diniz Computer/Electrical Engineer Lecture 01 Introduction.
Android Programming Beomjoo Seo Sep., 12 CS5248 Fall 2012.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
INTERNATIONAL SUMMER ACADEMIC COURSE UNIVESITY OF NIS ISAC – Android programming.
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
Android Application Development 2013 PClassic Chris Murphy 1.
Introduction to Android Programming Content Basic environmental structure Building a simple app Debugging.
Intro to Android Programming George Nychis Srinivasan Seshan.
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.
About me Yichuan Wang Android Basics Credit goes to Google and UMBC.
© 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.
Take a leap towards the most promising technology
Operating system for mobile devices with a Java programming interface. Provides tools, e.g. a compiler, debugger, device emulator, and its own Java Virtual.
Android Info mostly based on Pro Android 3.  User Applications  Java Libraries – most of Java standard edition ◦ Activities/Services ◦ UI/Graphics/View.
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
Ali Shahrokni Application Components Activities Services Content providers Broadcast receivers.
Tip Calculator App Building an Android App with Java © by Pearson Education, Inc. All Rights Reserved.
ANDROID Presented By Mastan Vali.SK. © artesis 2008 | 2 1. Introduction 2. Platform 3. Software development 4. Advantages Main topics.
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.
Roopa.T PESIT, Bangalore. Source and Credits Dalvik VM, Dan Bornstein Google IO 2008 The Dalvik virtual machine Architecture by David Ehringer.
Overview of Android Application Development
Configuring Android Development Environment Nilesh Singh.
Introduction to Android
 Installation of Android Development Environment  Creating the App with OpenGL ES API  Running the App on Emulator Android App Development.
MOBILE COMPUTING D10K-7D02 MC05: Android UI Design Dr. Setiawan Hadi, M.Sc.CS. Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran.
1 Android Introduction Platform Overview. 2 What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware.
Intoduction to Andriod studio Environment With a hello world program.
Introduction to Android OS Димитър Н. Димитров Astea Solutions AD.
Android apps development - Eclipse, Android SDK, and ADT plugin Introduction of.
Why Learn Android? Largest installation base of any operating system Over 20,000 Android devices exist Businesses will likely move more to device-based.
CHAPTER 1 part 1 Introduction. Chapter objectives: Understand Android Learn the differences between Java and Android Java Examine the Android project.
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.
Computer System Structures
Android Mobile Application Development
Android 01: Fundamentals
Android Application Development 1 6 May 2018
Android Runtime – Dalvik VM
Android Studio, Android System Basics and Git
Android.
MAD.
Development-Introduction
CMPE419 Mobile Application Development
CS323 Android Getting Started
Application Development A Tutorial Driven Course
Android Topics UI Thread and Limited processing resources
CHAPTER 1 Introduction Chapter objectives: Understand what Android is
Android Developer Fundamentals V2
Android Platform, Android App Basic Components
Emerging Platform#3 Android & Programming an App
Mobile Programming Dr. Mohsin Ali Memon.
Android Development Introduction to Android Development 2011/01/16
CMPE419 Mobile Application Development
Presentation transcript:

Android Tutorial

Android Written in Java Utilizes Dalvik VM – Just in time (JIT) compilation since Android 2.2

Java Tips Similar syntax to C/C++ All function/procedure arguments passed in by value – Class objects are references that are passed by value No support for multiple inheritance Does support multiple interfaces Garbage collected (Hooray!) – Beware! Can still create memory leaks!

Java Tips All methods are virtual by default Java naming convention

Java Memory Leaks Every class object is a reference to the object Java VM keeps track of reference counts to every object Once nothing refers to an object anymore it gets garbage collected Once finished with an object, set it to null to release the memory

Android Components Activity – Code that has a user interface associated with it – Implemented as a stack Service – Code that runs in the background without a user interface Broadcast Receiver – Code that runs in response to Android OS or Application intents(messages)

Android Components (cont.) Content Providers – Database that is exposed to all applications to consume Intents – Messages that are passed throughout the Android OS/ other applications

Building Android Applications Create UI using XML – New UI dev tools make building UIs awesome Once an xml file is saved, the Eclipse ADT tools create an R.java DO NOT MODIFY R.java!! – Never a good idea, ever like fo realz

Building Android Applications Reference UI elements by utilizing findViewById(int) member method on View object – Ex. – Button b = (Button)findViewById(R.id.myButton); findViewById is expensive!

Starting New Activities Intent i = new Intent(); i.setClass(callingActivity.this, calleeActivity.this); startActivity(i);

Passing objects to Activities Easiest way, just create a static data structure – Accessible to all activities within an application Pass objects through bundles in an intent – Intent i = new Intent(); – i.putExtra(key, stringValue); Retreive object – Bundle b = getIntent().getExtras(); – String o = b.getString(key);

Passing values to Activities Can pass primitive types through bundles – char, int, float, double, String Can pass custom objects by implementing Parcelable interface – os/Parcelable.html os/Parcelable.html

Be careful of ANRs! ANR = Application Not Responding Occurs when application is not responsive to touch events for ~5 seconds All major computation should be done on a separate thread – Use threads Need a runnable object to update the UI thread – AsyncTask ask.html ask.html

Running Android Apps Can use Android emulator – Obnoxiously slow – Better emulator coming soon, not quite sure when Debugging on device is king!

Building Apps for Varying Devices Java code same (mostly) Add additional xml layout files for each device Save in corresponding directories – layout-land Folder for landscape view – layout-mdpi Folder for layouts for devices with medium density displays

Building Apps for Varying Devices Save copies of same image in different resolutions in drawable folders – drawable-hdpi – drawable-mdpi – drawable-ldpi

Android Extra Fun Stuff Renderscript – New library of APIs that allows for easy animation creation – Also useful for complex computation ADK – Accessory Development Kit – Allows for development of accessories that interface with devices through USB – Based off of Arduino NDK (native development kit) – JNI (Java Native Interface) – Allows for glue between Java and C code for extra performance – Note just writing your application in C++ using the NDK doesn’t make it faster than normal Java implementation

Hints Tips Tricks Android.com Google IO Sessions – html html Android developer blog – Stackoverflow google