46
Android Tech Track Mobile App development 24 February 2011 Sogeti, Evere Ben Stroobants, Kenneth Van Rumste, Alexis Mathieux, Geoffroy Mispelaere, Tom Pluym

Sogeti - Android tech track presentation - 24 february 2011

Embed Size (px)

DESCRIPTION

Presentation of the Android Tech Track by Sogeti.Presentation by: * Ben Stroobants* Kenneth Van Rumste* Mark Fonteyne* Mikhail Panshenskov* Alexis Mathieux* Geoffroy Mispelaere* Tom Pluym

Citation preview

Page 1: Sogeti - Android tech track presentation - 24 february 2011

Android Tech Track

Mobile App development24 February 2011

Sogeti, Evere

Ben Stroobants, Kenneth Van Rumste, Alexis Mathieux, Geoffroy Mispelaere, Tom Pluym

Page 2: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Agenda

• Introduction

• Demonstration

• Set up

• Track Actions

• Conclusion

Page 3: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Introduction

• Smartphones & Mobile Apps

• Android

• Case: Antalis

Page 4: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Introduction: Smartphones & Mobile Apps

Page 5: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Mobile Apps

• Communication is already multi/cross-channel

• New channel

Page 6: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Mobile Apps vs Mobile Website

• Mobile Website– One single design for all devices– No obligation to download new versions– Save on the cost of development– Independence with regard to app stores and operators: not

subject to market place checks– No commission to pay to an app store– Instantly available to the public (automatic indexation in

search engines).

Page 7: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Mobile Apps vs Mobile Website

• Mobile App– Format perfectly suited to the device– One-click access (no searching as on a mobile site)– Can work offline– Look and feel is more accessible to the general public– Can offer more advanced functions: integration of device

features like geolocation, camera, accelerometer– Modern image– Direct shortcut to the ‘brand’: users tend to spend more time

on an application than to spend on a website. Also, a person downloading an application reflects already trust and interest in the ‘brand’.

Page 8: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Mobile Apps vs Mobile website

• Consultant’s answer: ‘It depends’

• Important to ensure – consistent image– consistent cross-channel experience.

Page 9: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Android

1. What is Android?2. The Open Handset Alliance3. Recent version history4. Features5. Architecture6. Apps on Android7. Global market importance

Overview

Page 10: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Android

• A software platform and operating system for mobile devices

• Initially developed by Android, inc. (bought by Google in 2005)

• Since 2007, result of collaboration by Open Handset Alliance

• Open platform, released under the Apache license

What is Android?

Page 11: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Android

The Open Handset Alliance (OHA)

Page 12: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Android

• Established on November 5, 2007• Led by Google. Initially 34 enterprises joined (number still

growing)• Enterprises include major players from different sectors:

– Mobile operators: T-Mobile, Vodafone,…– Software companies: Google, eBay, Nuance,…– Commercialization companies: Accenture,…– Semiconductor companies: Intel, Nvidia,…– Handset manufacturers: HTC, Motorola,…

• Goal: Develop technologies that will significantly lower the cost of developing and distributing mobile devices and services

The Open Handset Alliance (OHA)

Page 13: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Android

• Android 2.1 - Eclair: Released January 2010• Android 2.2 – Froyo: Released May 2010

– General OS, speed, memory improvements– Support for Adobe Flash 10.1

• Android 2.3 Gingerbread: Released December 2010– Improved hardware support and power management

• Android 3.0 Honeycomb: Preview release January 2011– Support for multicore processors– For now: only tablet-support– Improved user interface– Today? Launch of Motorola Xoom, first tablet with Android 3.0

Recent version history

Page 14: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Android

Recent version history- market share

Page 15: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Android

• Integrated browser based on open-source WebKit engine, coupled with Chrome JS engine v8.

• SQLite: RDBMS• Wide range of media support• Multitasking possible• Dalvik Virtual Machine: optimized for mobile devices

Software features

Page 16: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Android

• connectivity technologies: GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth, Wi-Fi, LTE, and WiMAX.

• Wide range of hardware support:– Touchscreen (multitouch)– Cameras– GPS– Accelerometers– Gyroscopes– Proximity and pressure sensors

• Accelerated 3D graphics

Hardware features

Page 17: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

AndroidArchitecture

Page 18: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Android

• Android SDK or native code• Android Market (Google’s appStore)

– Made available in October 2008– Support for paid applications since February 2009– Since december 2010: +200,000 apps available– Est. 2.5 billion downloads so far– Not the only place where you can find apps!

• Alternative markets: Andspot, Handango,…• Install the apps yourself by use of the APK-file (Android

package)

Apps on android

Page 19: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Android

• 300,000 android-based devices are activated each day• Best-selling mobile platform at this moment• On daily-use basis, there’s still heavy competition from iOS,

Symbian and Blackberry, but Android’s usage is rising rapidly

Global market importance

Page 20: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Android

Global market importance

Page 21: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Case Antalis

• Long user session: collect products to order during the day

• Fast order flow: users know their product codes

Page 22: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Demonstration

• Android App

Page 23: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Set Up

• Android SDK + Eclipse ADT plugin

• Source control : private repository in GitHub

• Server Application

Page 24: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Android Tech Track

Page 25: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: BeJUG

What is BeJUG?• Belgian Java User Group• Official mission statement; “The primary focus of The

Belgium Java User Group (founded in 1997) is to inform our members about the Java ecosystem.”

• When? Every two weeks.• Where? Several location in Belgium (Ghent, Antwerp,

Leuven and Louvain-la-Neuve).• More information on www.bejug.org

Page 26: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: BeJUG

BeJUG and Sogeti• 5 silver subscriptions; 5 persons from Sogeti can join BeJUG

sessions.• Check your mailbox for proposals or make your own.

(… and don’t forget the free drinks and the free pizzas!)

Page 27: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: BeJUG

BeJUG and the Android Tech Track• Regular session

– The “usual” conference,– One or several gurus present a technology or framework,– In the case of Android, the conference was about presenting

the most important components of an Android application, as well as the interesting “buzzwords” to look into when making an application.

• Dojo session– A much more technical approach,– A small contextual idea is given at the beginning of the

session,– Everyone, one person after another, is invited to add a little

brick to the whole.

Page 28: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: Initial App

A hello-world applicationA hello-world application

• Create a hello world app

• Structure

• Information

http://developer.android.com/

Page 29: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: Initial App

Antalis projectAntalis project

• Notepad tutorial

• CRUD on Products and User Account

• SQLite

Page 30: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: Authentication

• Oauth2: protocol for secure API authorization

• Tokens over credentials

• Scenario

• Client Credentials flow

• Implementation– Server: Spring Security + Spring Mobile Security– Client: leeloo

Page 31: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: Promotions

Goal : A way to display promotions to customers.

Page 32: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: Promotions

Idea : Usage of a list that shows different banners and details.

Expandable List

Page 33: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: Promotions

Server side

Two webservices :

• getPromotions to retrieve all the promotions as a JSON object.

• getPicture to download the banner linked to a promotion.

Page 34: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: Promotions

Client side

• ExpandableListActivity It’s an activity that displays an expandable list of items by binding to a data source and exposes event handlers when the user selects an item.

• ExpandableListAdapterAn adapter that links an ExpandableListView with the underlying data. This adapter will provide access to the data of the children (categorized by groups) and also instantiate Views for children and groups.

Page 35: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: Promotions

Problems :

• Refresh of the list of promotions when the application is running.

• Latency to display the list due to the download of the pictures.

Page 36: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: Promotions

Promotions – Services - Introduction•Services are used to;

– Perform a longer-running operation while not interacting with the user

– Supply functionalities for other applications to use

•It has its own lifecycle and can be bound to an activity or any other component having an Android context.

Page 37: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: Promotions

Promotions – Services - Specifications•Although it can be set up to have its own process, it is by default managed by the main application thread.•Binding to a service is an asynchronous operation, meaning that you have to first use a callback method before calling specific operations on your service.

Page 38: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: Promotions

Promotions – Asynchronous tasks•An easy way to execute one-shot background operations without blocking the UI.•Used by subclassing the AsyncTask class and running the execute(…) method.•The system keeps a link to the UI thread to allow easier update of the progress in the interface.

Page 39: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: Barcode scanning

• Integration of other functionality by Intents

• Handle the response: ‘onActivityResult’

• Barcode scanner ZXing

Page 40: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: Layout

• Activity class– Lifecycle– start Activities and get

results

• XML-configuration

Page 41: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: iPhone

Page 42: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: iPhone

Android• Java

(subset of J2SE)• Component reuse,

Activity, Intents• JUnit tests• Open source

Iphone• Objective-C (C with

extensions for OO)• MVC model, Controller,

Sharing Data• Unit tests

Language, Programming model and platform.

Page 43: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: iPhone

Android• Guide and API

reference (online and offline).

• Videos, tutorials• Open source Android

projects• ApiDemos section

www.android.com

Iphone• Starting guide• videos• Some open source

projects

http://developer.apple.com

Documentations

Page 44: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: iPhone

Android• Eclipse Plugin• Android UIBuilder• Eclipse debugger• Trace view• Emulator• Debug on real device

Iphone• XCode• UIBuilder• Debugger• Profiler• Emulator• Debug on real device (need to pay for that)

Tooling

Page 45: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Approach / Actions: iPhone

Android• Android market• Available in a few

minutes• Take 30% of your

app price.

Iphone• App Store• Need to be

approved by Apple• Take 30% of your

app price.

App Store

Page 46: Sogeti - Android tech track presentation - 24 february 2011

© Sogeti

Conclusions

• Know how

• Confidence

• Track approach worked