Why Learn Android? Largest installation base of any operating system Over 20,000 Android devices exist Businesses will likely move more to device-based.

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 DEVELOPMENT KELLY MCBEAN. DEVELOPMENT ENVIRONMENT OVERVIEW Eclipse Standard IDE for Developing Android Applications Install: 1.Java (JDK) – Since.
Android OS : Core Concepts Dr. Jeyakesavan Veerasamy Sr. Lecturer University of Texas at Dallas
Android architecture overview
INTRO TO MOBILE APP DEVELOPMENT CMSC 150: Lecture 34.
Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna.
Amanda Silver Director of Program Management Visual Studio Tools for Client Applications Cross-Platform Development using Visual Studio.
Unlocking Android Chapter 4.  Understanding activities and views  Exploring the Activity lifecycle  Working with resources  Defining the AndroidManifest.xml.
Filip Debelić What is it? Android is a mobile operating system (OS) based on the Linux kernel and currently developed by Google Android,
Mobile Application Development
Google Android as a mobile development platform T Internet Technologies for Mobile Computing Olli Mäkinen.
Android Tutorial Android Written in Java Utilizes Dalvik VM – Just in time (JIT) compilation since Android 2.2.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
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.
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.
About me Yichuan Wang Android Basics Credit goes to Google and UMBC.
Android: versions Note that: Honeycomb (Android v3.0) A tablet-only release Jelly Bean (Android v4.1) Released on July 09, 2012.
CS5103 Software Engineering Lecture 08 Android Development II.
© 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.
Intro to Android Development Ben Lafreniere. Getting up and running Don’t use the VM! ials/hello-world.html.
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
DUE Hello World on the Android Platform.
1 Java Inheritance. 2 Inheritance On the surface, inheritance is a code re-use issue. –we can extend code that is already written in a manageable manner.
Android for Java Developers Denver Java Users Group Jan 11, Mike
ANDROID 응용 프로그래밍 과정 – 목차 - 안드로이드란 - 안드로이드가 만들어지게 된배경 - 안드로이드의 철학 - 안드로이드 환경설정 ( SDK download, eclipse plug-in 설정, 간단한 프로그램 실행 ) - 안드로이드 동작원리 - 안드로이드 핵심.
Overview of Android Application Development
First Venture into the Android World Chapter 1 Part 2.
HW#9 Clues CSCI 571 Fall, HW#9 Prototype
1 Android Introduction Platform Overview. 2 What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware.
Recap of Part 1 Terminology Windows FormsAndroidMVP FormActivityView? ControlViewView? ?ServiceModel? Activities Views / ViewGroups Intents Services.
1 Android Development Lean and mean introduction Based on a presentation by Mihail L. Sichitiu.
.NET Mobile Application Development XML Web Services.
Android apps development - Eclipse, Android SDK, and ADT plugin Introduction of.
*DT Project Model Leo Treggiari Intel Corp. Dec, 2005.
CHAPTER 1 part 1 Introduction. Chapter objectives: Understand Android Learn the differences between Java and Android Java Examine the Android project.
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.
Introduction to Object-oriented Programming
Android Mobile Application Development
Open Handset Alliance.
Android Application Development 1 6 May 2018
Visit for more Learning Resources
Android.
Development-Introduction
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
CA16R405 - Mobile Application Development (Theory)
CMPE419 Mobile Application Development
HUJI Post PC Workshop 1 Introduction to Android Development Ari Sprung
Android SDK & App Development
CS5103 Software Engineering
Application Development A Tutorial Driven Course
CA16R405 - Mobile Application Development (Theory)
Android Introduction Platform Mihail L. Sichitiu.
Android Platform, Android App Basic Components
Emerging Platform#3 Android & Programming an App
Mobile Programming Dr. Mohsin Ali Memon.
Introduction to Android
Android Development Introduction to Android Development 2011/01/16
CMPE419 Mobile Application Development
CA16R405 - Mobile Application Development (Theory)
CA16R405 - Mobile Application Development (Theory)
CA16R405 - Mobile Application Development (Theory)
Presentation transcript:

Why Learn Android? Largest installation base of any operating system Over 20,000 Android devices exist Businesses will likely move more to device-based software (and away from PCs) Understand the basic mechanics of coding for mobile platforms IIL context

The Project Implement an Android version of Oracle Permission Generator software Uses MVP (Model View Presenter) design pattern Business logic is already implemented and can be reused Understand how a business application could be ported to a mobile platform

Benefits of MVP Clear separation between business logic and presentation of data Easier to unit test Simple to refactor and add additional functionality Much easier to reuse existing code

System Architecture

Building the Model Layer C# code already contained a class OraclePermissionGeneratorDataInterfaceLayer (facade of Model functionality) Required ability to support multiple users Created a Dictionary object whose key was the user identifier, and value was an OraclePermissionGeneratorDataInterfaceLayer private Dictionary userDataRepository; No thread safety, no persistence

Exposing the Model Layer ‘ServiceContract’ and ‘OperationContract’ attributes [ServiceContract] public interface IOraclePermissionGeneratorWebServiceAPI { [OperationContract] String GetDefaultObjectOwner(String authenticationContext, String trackingData); [OperationContract] void SetDefaultObjectOwner(String defaultObjectOwner, String authenticationContext, String trackingData); Container classes must specify the ‘DataContract’ and ‘DataMember’ attributes Using the ServiceHost class to run the Web Service Defaults to exposing via SOAP protocol, but supports REST and others In this project, use SOAP as protocol, but JSON for serialization

Android Basics - Language Language looks and works exactly like Java Runs on Google ‘Dalvik’ VM, not Oracle VM Some parts of standard Java class library are not included (e.g. java.x namespace) C/C++ possible via Android NDK, C# possible via Xamarin

Android Basics – Development Environment Previously Eclipse was the recommended platform using ADT (Android Development Tools) plug-in Recently Google have released Android Studio, and are encouraging migration to that Started project more than one year ago, and hence developed using Eclipse

Android Basics – Emulator Android application must be run on real device or emulator Emulator comes with the Android Development Tools package, and includes multiple emulated devices

Android Basics – Project Setup Project in Eclipse is similar to standard Java project with some additions… Android libraries Generated Java code ‘res’ folder – binary resources and application XML settings ‘AndroidManifest’ file

Android Basics – Terminology Android vs MVP vs Windows Forms terminology Windows FormsAndroidMVP FormActivityView? ControlViewView? ?ServiceModel?

Android Basics – Activity Activity is a class in Android which represents a single screen in an application Android definition – ‘A single focused thing the user can do’ Derive from Activity class to create your own Activities Activity life-cycle

Android Basics – Service ‘Started’ service vs ‘Bound’ service For MVP context, a bound service can be used to provide the Model layer of the application “A Service is an application component that can perform long- running operations in the background and does not provide a user interface” “A Service is an application component representing either an application's desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use”

Android Basics – Views / ViewGroups Components that allow you to display and interact with data (text, images, etc…) in an Activity… TextView ListView EditText Spinner Button Many subclasses of View included in Android API ViewGroups allow collection and arrangement of other views LinearLayout RelativeLayout

Android Basics – ‘R’ class and XML ‘R’ class is generated by compiler, and used to provide a reference between items defined in XML (e.g. layouts, views), and Java code Essentially a list of constant definitions ‘res’ folder in project contains XML definitions Layouts Menus Strings Dimensions Colors Styles

Android Basics – Intents Naming is somewhat generic… “An intent is an abstract description of an operation to be performed” Has many uses, but used in this context to… Start / show other Activities Start Services Send data to other applications (permission scripts)

Android Basics – Unit Testing Android tests based around JUnit Mock frameworks like Mockito can be used Recently switched to JUnit 4, but earlier versions of the Development Tools use JUnit 3 (has some minor differences) Earlier Android unit testing received quite a lot of criticism (may have improved in later versions and in Android Studio)… A lot of dependency on Android OS and core components which can be difficult to mock Creation of classes ‘hidden’ by Android (Activities, Services) Tests on the emulator – much slower than standard Java unit tests

Android Basics – Difficulties Context class – is a parent class of Activity Required as a parameter for many fundamental method calls (e.g. starting Intents) As Activity is considered to be the ‘View’ part of MVP it should not be referenced/used by the Model… however sometimes this cannot be avoided Was particularly problematic where there were dependencies on Android OS (saving data, sending to other applications, getting location data)

Next Session MVP implementation in detail Details of Android components and classes Interaction with.NET / WCF Implementing an application screen end-to-end Collecting user behavior data