nokia asha app development - part 1

25
App Development for Nokia Asha Devices with Java ME Marlon Luz - INdT Nokia Developer Evangelist @marlonluz

Upload: marlon-luz

Post on 13-Dec-2014

1.068 views

Category:

Technology


6 download

DESCRIPTION

Nokia Developer Training for development on Asha Devices with JavaME language

TRANSCRIPT

Page 1: Nokia Asha App Development - Part 1

App Development for Nokia Asha Devices with Java ME

Marlon Luz - INdTNokia Developer Evangelist

@marlonluz

Page 2: Nokia Asha App Development - Part 1

WHAT IS THE

INdT?

mobile tecnologies and internet

for areas related to

with focus in development of

new concepts, products & solutions

CENTER OF

RESEARCH & DEVELOPMENT

nonprofit

CENTER OF

RESEARCH & DEVELOPMENT

nonprofit

Page 3: Nokia Asha App Development - Part 1

Training Content

• Nokia App Store• Nokia Platforms• Introduction to Java ME Development• High Level UI components• Data storage• Publishing your App

Page 4: Nokia Asha App Development - Part 1

Nokia App Store

Page 5: Nokia Asha App Development - Part 1

Nokia App Store, Series40 & JavaME

120k+ apps, 15m downloads/day

Brasil: 150m downloads (total),

50m in 2012, 500k per day, 56%

in Series 40, 73% of purchases are JavaME apps

Page 6: Nokia Asha App Development - Part 1

Nokia Platforms

Silverlight, XNA

Java apps PhonesSeries 40

Page 7: Nokia Asha App Development - Part 1

Mobile Platforms

http://gs.statcounter.com/#mobile_os-ww-monthly-201201-201212

Page 8: Nokia Asha App Development - Part 1

Mobile Platforms

http://gs.statcounter.com/#mobile_os-af-monthly-201201-201212

Page 9: Nokia Asha App Development - Part 1

Mobile Platforms

http://gs.statcounter.com/#mobile_os-as-monthly-201201-201212

Page 10: Nokia Asha App Development - Part 1

Nokia SDK 2.0 for Java• Emulates the device

environment• Location, contacts,

etc.• Emulates mobile

events like battery, sms, etc.

• IDE Integration

Page 11: Nokia Asha App Development - Part 1

Development• IDE Installation• Overview JavaME• First Project

Page 12: Nokia Asha App Development - Part 1

• Java Micro Edition (ME) is the Java for devices with limited resources

• Java ME brings a common platform for devices like:• Mobile phones• Pagers• PDAs• Set-top boxes

• Java ME defines a set of configurations, profiles e optional APIs;

• Java ME enables the developers to create applications for a large number of devices;

JavaME Overview

Page 13: Nokia Asha App Development - Part 1

• Support a wide variety of products that fit within the scope of J2ME;

• Defines a Java platform for a wide variety of devices, also defines a JVM (Java Virtual Machine) and the minimum set of class libraries available:• Connected Device Configuration (CDC)• Connected Limited Device Configuration (CLDC)

Configurations

Page 14: Nokia Asha App Development - Part 1

• 128 kilobytes of memory to run Java;• 32 kilobytes for memory allocation in

runtime;• No user interface;• Low power processing, battery enabled

device;• 16-32 Mhz Processor

CLDC

Page 15: Nokia Asha App Development - Part 1

• Needed APIs to develop applications for a specific set of devices• MIDP• IMP• PBP• ...

Profiles

Page 16: Nokia Asha App Development - Part 1

• Mobile Information Device Profile; • MIDP defines the following set of classes:• Application Lifecycle Package• User Interface Package• Persistence Package• Networking Package• Language and Utility Packages

MIDP

CLDC or KVM

CLDC Core classes

Mobile

Info

rmatio

nD

evice

Pro

file

Persiste

nt

Sto

rag

e

Netw

orkin

g

Use

rIn

terfa

ce

MID

let

APIs

Page 17: Nokia Asha App Development - Part 1

• 3 versions available:

MIDP

MIDP 1.0 MIDP 2.0

Memory Requirement At least 200KB At least 256KB

High/Low-Level UI

Network API

Persistent Storage API

Game API

Secure networking

Push Registry

Signed MIDlets

Page 18: Nokia Asha App Development - Part 1

• Apps Java that run on MIDP devices are known as MIDlets

• MIDlets are defined in the javax.microedition.midlet package

• Child of the abstract class javax.microedition.midlet.MIDlet

• Life cycle defined and managed by methods implemented in the MIDlet;

MIDlets

Page 19: Nokia Asha App Development - Part 1

MIDlets• An application manager controls the MIDlet

running• The MIDlet behavior is controlled by a life cycle

through methods that a MIDlet has to implement

Destroyed

Paused ActivestartApp()

pauseApp()

destroyApp() destroyApp()

default constructor()

Page 20: Nokia Asha App Development - Part 1

MIDlets• The platform can change the state from Active

to Paused at any time

Destroyed

Paused Active

startApp()

pauseApp()

destroyApp() destroyApp()

Page 21: Nokia Asha App Development - Part 1

MIDlets• The method destroyApp() of a MIDlet is called

when the platform needs shutdown a MIDlet

Destroyed

Paused Active

startApp()

pauseApp()

destroyApp() destroyApp()

Page 22: Nokia Asha App Development - Part 1

MIDlets• Let´s see how to code a MIDlet

#stopTalking#startCoding

Page 23: Nokia Asha App Development - Part 1

JAD and JAR• JAD (Java Application Descriptor)

• Provides information on the content of a JAR file

• JAR (Java Archive)• Packaging various kinds of information (classes,

images, audio, data)

• Attributes JAR/JAD

Page 24: Nokia Asha App Development - Part 1

Development processDevelopment Station

MyMIDlet.java

javac

MyMIDlet.class

MyMIDlet.class

MyMIDlet.jar

MyMIDlet.jad

Target Devices

preverify

jar

Download/deploy

Download/deploy

Page 25: Nokia Asha App Development - Part 1

Marlon [email protected]

@marlonluz

Thanks