The Merits of Mobile App Development for Android Devices

55
© 2012 SAP AG. All rights reserved. 1 Social Media We want to hear from you T http://twitter.com/SAPStore http://twitter.com/SAPMobile http://facebook.com/sapstore (SAP Store) http://www.facebook.com/sapmobility (SAP Mobile) linkedin.com (SAP Store)

description

While mobile technology is recognized as transformational or strategic to businesses, 40 percent of SAP and CIO Magazine survey respondents indicated a lack of time or resources to pursue opportunities mobile may represent. With its easy-to-adopt software architecture, the Android platform is a cost-effective and code-friendly solution for IT managers and developers alike. View the Replay: http://event.on24.com/r.htm?e=485614&s=1&k=6A80319A0B1D6409618E67338E46964C&partnerref=WebsiteSeriesPageOnDemandReplay

Transcript of The Merits of Mobile App Development for Android Devices

Page 1: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 1

Social Media We want to hear from you

T

http://twitter.com/SAPStore

http://twitter.com/SAPMobile

http://facebook.com/sapstore

(SAP Store)

http://www.facebook.com/sapmobility

(SAP Mobile)

linkedin.com (SAP Store)

Page 2: The Merits of Mobile App Development for Android Devices

Webcast Highlights

Participate in today’s TweetChat about mobile app development

#MobileInsights

SAP Mobile Insights Webcast Series

http://bit.ly/sapmobileinsight

Mobile Sense Thought Leadership Series (webcasts & white papers):

http://fm.sap.com/mobilesense

Page 3: The Merits of Mobile App Development for Android Devices

The Merits of Mobile App Development for

Android Devices

Ranjit Mallela Solution Principal, North America Mobility Business Development

Mark Wright Principal Systems Consultant, Sybase, an SAP Company

Page 4: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 4

Legal disclaimer

The information in this presentation is confidential and proprietary to SAP and may not be disclosed without

the permission of SAP. This presentation is not subject to your license agreement or any other service or

subscription agreement with SAP. SAP has no obligation to pursue any course of business outlined in this

document or any related presentation, or to develop or release any functionality mentioned therein. This

document, or any related presentation and SAP's strategy and possible future developments, products and

or platforms directions and functionality are all subject to change and may be changed by SAP at any time

for any reason without notice. The information in this document is not a commitment, promise or legal

obligation to deliver any material, code or functionality. This document is provided without a warranty of any

kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness

for a particular purpose, or non-infringement. This document is for informational purposes and may not be

incorporated into a contract. SAP assumes no responsibility for errors or omissions in this document, except

if such damages were caused by SAP´s willful misconduct or gross negligence.

All forward-looking statements are subject to various risks and uncertainties that could cause actual results

to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-

looking statements, which speak only as of their dates, and they should not be relied upon in making

purchasing decisions.

Page 5: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 5

Today’s Presenter

Ranjit Mallela

Solution Principal, North America Mobility

Business Development

Mark Wright

Principal Systems Consultant, Sybase, an SAP

Company

Page 6: The Merits of Mobile App Development for Android Devices

Introduction

Page 7: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 7

Fastest growing smartphone platform

More than 107 million people in the U.S. owned smartphones during the three months ending in April, up 6

percent versus January. Google Android ranked as the top smartphone platform with 50.8 percent market

share (up 2.2 percentage points). Apple’s share of smartphone market increased 1.9 percentage points to

31.4 percent. RIM ranked third with 11.6 percent share, followed by Microsoft (4.0 percent) and Symbian

(1.3 percent).

Top Smartphone Platforms 3 Month Avg. Ending Apr. 2012 vs. 3 Month Avg. Ending Jan. 2012

Total U.S. Smartphone Subscribers Ages 13+

comScore MobiLens: Share (%) of Smartphone Subscribers

Jan-12 Apr-12 Point Change

Google 48.6% 50.8% 2.2

Apple 29.6% 31.4% 1.9

RIM 15.2% 11.6% -3.6

Microsoft 4.4% 4.0% -0.4

Symbian 1.5% 1.3% -0.2

Page 8: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 8

Fewer Apps crashed compared to iOS

0.15%

0.73%

2.97%

0.51%

1.47%

3.66%

1st Quartile 2nd Quartile 3rd Quartile

Android

iOS

Crittercism

Crashes Per App Launch: iOS and Android

(11/2011-12/2011)

Page 9: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 9

Important factors for mobile development

Mobile Development

Multitasking

Usability

Stability Security

Battery Life

Page 10: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 10

Open Handset Alliance Partners

The first truly open and comprehensive platform for mobile devices, all of the

software to run a mobile phone but without the proprietary obstacles that have

hindered mobile innovation

Android is a software stack for mobile devices that includes an operating system,

middleware and key applications

Development led by Google and it’s Open Handset Alliance Partners. The OHA is

committed to make their vision a reality: to deploy the Android platform for every

mobile operator, handset manufacturers and developers to build innovative devices

Kernel source at http://git.android.com

It is opensource (Apache License).Available at http://code.google.com

Page 11: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 11

Open Handset Alliance Partners

The OHA is a group of hardware and software developers, including Google,

Motorola, Samsung, HTC, NTT DoCoMo, Sprint Nextel and others

Goal

Accelerate innovation in mobile

Offer consumers a richer, less expensive, and better mobile experience

OHA have developed Android, the first complete, open, and free mobile platform

11

Page 12: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 12

Open handset alliance

Handset Manufacturers

Mobile Operators

Semiconductor

Software

Commercialization

Page 13: The Merits of Mobile App Development for Android Devices

Why android application

development?

Page 14: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 14

It is an open source platform which helps the developers to invest more in their

time and understanding clientele needs. Because Android is an open source

system, anyone can access the code that drives the system

Android is based on Linux which facilitates smooth accessibility to a rich

development environment

Performance stability and security is boosted as it is based on Linux Kernel. The

OS is hence very smooth to operate and less chances of crashing down

In case of Android app development, the porting of the application becomes

hassle free

The investment involved is comparatively low along with considerable reduction in

time required for creating an application

Develop for a subset of devices based on form factor, density, screen size

Why android application development?

Page 15: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 15

Why android application development?

Rich and easy to integrate feature sets

Android applications are written in the Java programming language, which is a

powerful, mature and very widely adopted language. Java is a language created

by Sun Microsystems in the 90′s. It drives a wide range of devices from PDAs,

Blu-ray players, smart pens, complex computer software – and even the Amazon

Kindle

Inter-Application communication is easier

Google Play Store — is much more of an open marketplace than Apple‘s iTunes

App Store

No delay for approval of submitted application. So you can reach your users fast

Page 16: The Merits of Mobile App Development for Android Devices

Android architecture

Page 17: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 17

Linux Kernel

Applications

Application Framework

Libraries Android Runtime

Android architecture

Home Contacts Phone Browser …

Package

Manager

Telephony

Manager

Resource

Manager

Location

Manager

Notification

Manager

Activity Manager Window Manager Content

Providers

View

System

Surface Manager Media

Framework SQLite

OpenGL | ES FreeType WebKit

SGL SSL libc

Core Libraries

Dalvik Virtual

Machine

Display Driver

Keypad Driver

Camera Driver

WiFi Driver

Flash Memory

Driver

Audio Drivers

Binder (IPC)

Driver

Power

Management

Page 18: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 18

Linux kernel

Android runs on Linux version 2.6 and relies on it for core system services such as

device drivers, security, memory management ,process management

The kernel also acts as an abstraction layer between the hardware and the rest of

the software stack

18

Linux Kernel

Display Driver

Keypad Driver

Camera Driver

WiFi Driver

Flash Memory

Driver

Audio Drivers

Binder (IPC)

Driver

Power

Management

Page 19: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 19

Linux kernel

Includes a set of C/C++

libraries

Interface through Java

Surface manager –

Handling UI Windows

2D and 3D graphics

Media codecs, SQLite,

Browser engine WebKit

library for fast HTML

rendering

19

Libraries

Surface Manager Media

Framework SQLite

OpenGL | ES FreeType WebKit

SGL SSL libc

Page 20: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 20

Dalvik VM is Google’s

implementation of Java

Optimized for mobile devices

Key Dalvik differences:

– Register-based versus stack-based VM

– Dalvik runs .dex files

– More efficient and compact implementation

than .class files

– Limited memory and battery power

– Different set of Java libraries than SDK

Android Runtime

Core Libraries

Dalvik Virtual

Machine

Java Source

Code

Java Source

Code

Java Compiler Java Compiler

Java Byte

Code

Java Byte

Code

Dex Compiler

Dalvik Byte

Code

Java Byte

Code

Dalvik

Executable

Java VM Dalvik VM

Dalvik VM

Page 21: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 21

Application framework

Activity manager controls the life cycle of the app

Content providers encapsulate data that is shared (e.g. contacts)

Resource manager manages everything that is not the code

Location manager figures out the location of the phone (GPS, GSM, WiFi)

Notification manager keeps track of events such as arriving messages,

appointments, etc.

Application Framework

Package

Manager

Telephony

Manager

Resource

Manager

Location

Manager

Notification

Manager

Activity Manager Window Manager Content

Providers

View

System

Page 22: The Merits of Mobile App Development for Android Devices

Android development

Page 23: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 23

Prerequisites

1 We’ll need at least basic understanding of how to program in Java/C#.

Android programming is done using Java syntax, plus a class library that

resembles a subset of the Java SE library (plus some Android-specific

extensions)

2 We’ll need some basic OOP concept

Page 24: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 24

To set up the development environment, we need:

Java Development Kit

(JDK 1.5+, 1.6 is preferable)

Eclipse IDE Android SDK

Page 25: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 25

Android SDK

An Android Development Tools(ADT) plugin available for Eclipse IDE.

http://developer.android.com/sdk/index.html

Eclipse plugin available: https://dl-ssl.google.com/android/eclipse/

Tools for debugging, compiling and packaging

Page 26: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 26

.

Android SDK

Page 27: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 27

Supported OS

1. Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)

2. Mac OS X 10.5.8 or later (x86 only)

3. Linux (tested on Ubuntu Linux, Lucid Lynx)

Supported Development Environment (Eclipse IDE based)

1. Eclipse 3.4 (Ganymede) or greater/Eclipse Classic (versions 3.5.1 and higher)

2. JDK 1.5 or 1.6

3. ADT Plugin

Android SDK

Page 28: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 28

ADT: Android Development Tool, an Eclipse plugin

Two debuggers

adb: Android Debug Bridge

ddms: Dalvik Debug Monitor Server

aapt: Android Application package tool

All resources are bundled into an archive, called .apk file

dx: java byte code to Dalvik executable translator

*.java *.class *.dex *.apk

run

javac dex aapk

adb

Page 29: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 29

Android Development Tool

Develop application

Sign application

Version application

Publish application

Page 30: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 30

Android released versions

1.5 Cupcake

1.6 Donut

2.0/2.1 Eclair

2.2 Froyo

2.3 Gingerbread

3.0 Honeycomb

4.0 Icecream Sandwich

4.1 Jelly Bean

Page 31: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 31

Application building blocks

Activity IntentReceiver Service Content

Provider

Page 32: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 32

Activity

Represents the presentation layer of an Android application, e.g. a screen

which the user sees. An Android application can have several activities and it

can be switched between them during runtime of the application

User interface 'container' – essentially a screen

Page 33: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 33

IntentReceivers

Components that respond to broadcast ‘Intents’

Way to respond to external notification or alarms

Apps can invent and broadcast their own Intent

Page 34: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 34

Intents

Think of Intents as a verb and object; a description of what you want done

E.g. VIEW, CALL, PLAY etc.

System matches Intent with Activity that can best provide the service

Activities and Intent Receivers describe what Intents they can service

Page 35: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 35

Intents

System picks best component

for that action

Client component makes a

request for a specific action

New components can use

existing functionality

Home

Contacts

GMail

Chat

Blogger

Pick Photo Photo Gallery

Picasa

Page 36: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 36

Services

Non-UI component which provides ancillary functionality

Can be same or different process

Faceless components that run in the background

E.g. music player, network download etc.

Page 37: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 37

Content providers

Enables sharing of data across applications

E.g. address book, photo gallery

Provides uniform APIs for:

querying

delete, update and insert

Content is represented by URI and MIME type

Page 38: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 38

Application structure

Application Manifest

Specifies Activities, Intents and Permissions defined as part of the app

Resources

Drawable: Contains graphics resources

Layout: Contains UI layout information

Values: Contains data content, e.g. string values

Assets

Used to store files accessed in raw form

Page 39: The Merits of Mobile App Development for Android Devices
Page 40: The Merits of Mobile App Development for Android Devices

Signing

Page 41: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 41

Signing

The Android system requires that all installed applications must be digitally

signed with a certificate whose private key is held by the application's

developer

The Android system uses the certificate as a means of identifying the author

of an application and establishing trust relationships between applications

The certificate is not used to control which applications the user can install

The certificate does not need to be signed by a certificate authority

Android has no default keytool available. For Keytool it relies on JDK keytool

Page 42: The Merits of Mobile App Development for Android Devices

Distribution of Android Apps

Page 43: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 43

Open distribution

As an open platform, Android offers choice. You distribute your Android apps

to users in any way you want, using any distribution approach or combination

of approaches that meets your needs. From publishing in an app marketplace

to serving your apps from a web site or emailing them directly users, you are

never locked into any particular distribution platform

Distributing through an App Marketplace using Google Playstore

Distributing your application through email

Distributing through a web site

Page 44: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 44

Is you application ready for release?

Publishing an application means testing it, packaging it appropriately, and

making it available to users of Android-powered mobile devices for download

Before you consider your application ready for release

Test your application on device

add an End User License Agreement

Specify an icon and label in the application's manifest

Turn off logging and debugging

Version your application

Obtain a suitable cryptographic key

Sign your application

Page 45: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 45

Publish App Google Playstore

Google Playstore is a hosted service that makes it easy for:

Android Users to find and download Android applications

Android Developers to publish their applications

To publish your application on Google Playstore you:

First need to register with the service using your Google account

Must agree to the terms of service

$25 registration fee

To register as an Playstore developer visit:

https://play.google.com/apps/publish/signup

Requirements enforced by the Google Playstore server:

Application must be signed with a cryptographic private key whose validity period ends after

22 October 2033

Application must define version code, version name, icon and label attributes in manifest

Page 46: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 46

Publish App Google Playstore

Page 47: The Merits of Mobile App Development for Android Devices

SAP Mobile Platform

Page 48: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 48

Architectural blueprint of the SAP mobile platform

SAP, Partner, and Custom Apps

SAP Mobile Platform

Presentation Frameworks

HTML5 Native-iOS Native-

Android

Native-Win.

Mobile Hybrid

SAP Afaria

SAP Store

Third Party App Dev Tools SAP App Dev Tools

SAP Services

Managed

Mobility

Strategy

Services

Implementation

Services

RDS

SAP NetWeaver Gateway

Native Apps Hybrid Container Apps HTML5 Apps SMS Apps

Application Services

Mobile

Commerce

Mobile

Money Workflow

Content

Manageme

nt

Analytics

Foundation Services

IDM Authenticati

on

oData

Proxy

App

Lifecycle

Manageme

nt

Data Sync

& Caching

App Catalog

Application

Management

Device

Management

SAP Business

Suite

Sybase 365

Messaging

Services

Databases Third Party

Apps

Page 49: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 49

SUP 2.1.1 delivered December 2011

enable productivity apps and full Android support

Enable native apps on all relevant device platforms

SDK toolkits for Android, iOS, Blackberry, Windows Mobile

Enable online and offline apps

Automated user and apps onboarding

Security incl. SSO

Synchronization

Push notifications

Connectivity to SAP and 3rd party

Enable Web developer

Cross device/platform

HTML5/JS/CSS

HWC enabling access to native device libraries (e.g. camera access)

Page 50: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 50

Microapps gallery

Page 51: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 51

One-stop-shop for mobile apps

across all platforms and devices

Customers discover, evaluate and

buy 24x7

Purchase apps, platform

components, services and

accessories

Incorporates customer specific

T&Cs i.e. discounts

Self service procurement by

customers

Standard SAP revenue recognition

rules apply

Visit www.sapstore.com/mobile

Or scan the QR codes:

SAP store The online destination for SAP and certified partner mobile apps

Page 52: The Merits of Mobile App Development for Android Devices

© 2012 SAP AG. All rights reserved. 52

References

http://code.google.com/android/

http://android-developers.blogspot.com

http://code.google.com/p/apps-for-android/

http://sites.google.com/site/io/

http://www.openhandsetalliance.com/

http://source.android.com

http://www.comscore.com/

http://developer.android.com

Page 53: The Merits of Mobile App Development for Android Devices

Questions?

Page 54: The Merits of Mobile App Development for Android Devices

Thank You!

Page 55: The Merits of Mobile App Development for Android Devices

Closing and Q&A

Participate in today’s TweetChat about mobile app development

#MobileInsights

SAP Mobile Insights Webcast Series

http://bit.ly/sapmobileinsight

Sept 19th – Fuel Competitive Advantage in Wholesale Distribution Using

Mobile Solutions

Oct 24th (tentative) – Time Travel: Mobilizing Your HR Processes

Mobile Sense Thought Leadership Series (webcasts & white papers):

http://fm.sap.com/mobilesense