Sogeti - Android tech track presentation - 24 february 2011

Post on 28-Jan-2015

106 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

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

Transcript

Android Tech Track

Mobile App development24 February 2011

Sogeti, Evere

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

© Sogeti

Agenda

• Introduction

• Demonstration

• Set up

• Track Actions

• Conclusion

© Sogeti

Introduction

• Smartphones & Mobile Apps

• Android

• Case: Antalis

© Sogeti

Introduction: Smartphones & Mobile Apps

© Sogeti

Mobile Apps

• Communication is already multi/cross-channel

• New channel

© 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).

© 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’.

© Sogeti

Mobile Apps vs Mobile website

• Consultant’s answer: ‘It depends’

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

© Sogeti

Android

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

Overview

© 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?

© Sogeti

Android

The Open Handset Alliance (OHA)

© 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)

© 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

© Sogeti

Android

Recent version history- market share

© 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

© 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

© Sogeti

AndroidArchitecture

© 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

© 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

© Sogeti

Android

Global market importance

© Sogeti

Case Antalis

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

• Fast order flow: users know their product codes

© Sogeti

Demonstration

• Android App

© Sogeti

Set Up

• Android SDK + Eclipse ADT plugin

• Source control : private repository in GitHub

• Server Application

© Sogeti

Android Tech Track

© 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

© 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!)

© 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.

© Sogeti

Approach / Actions: Initial App

A hello-world applicationA hello-world application

• Create a hello world app

• Structure

• Information

http://developer.android.com/

© Sogeti

Approach / Actions: Initial App

Antalis projectAntalis project

• Notepad tutorial

• CRUD on Products and User Account

• SQLite

© 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

© Sogeti

Approach / Actions: Promotions

Goal : A way to display promotions to customers.

© Sogeti

Approach / Actions: Promotions

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

Expandable List

© 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.

© 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.

© 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.

© 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.

© 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.

© 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.

© Sogeti

Approach / Actions: Barcode scanning

• Integration of other functionality by Intents

• Handle the response: ‘onActivityResult’

• Barcode scanner ZXing

© Sogeti

Approach / Actions: Layout

• Activity class– Lifecycle– start Activities and get

results

• XML-configuration

© Sogeti

Approach / Actions: iPhone

© 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.

© 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

© 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

© 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

© Sogeti

Conclusions

• Know how

• Confidence

• Track approach worked

top related