nokia asha app development - part 1
DESCRIPTION
Nokia Developer Training for development on Asha Devices with JavaME languageTRANSCRIPT
![Page 1: Nokia Asha App Development - Part 1](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/1.jpg)
App Development for Nokia Asha Devices with Java ME
Marlon Luz - INdTNokia Developer Evangelist
@marlonluz
![Page 2: Nokia Asha App Development - Part 1](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/2.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/3.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/4.jpg)
Nokia App Store
![Page 5: Nokia Asha App Development - Part 1](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/5.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/6.jpg)
Nokia Platforms
Silverlight, XNA
Java apps PhonesSeries 40
![Page 7: Nokia Asha App Development - Part 1](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/7.jpg)
Mobile Platforms
http://gs.statcounter.com/#mobile_os-ww-monthly-201201-201212
![Page 8: Nokia Asha App Development - Part 1](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/8.jpg)
Mobile Platforms
http://gs.statcounter.com/#mobile_os-af-monthly-201201-201212
![Page 9: Nokia Asha App Development - Part 1](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/9.jpg)
Mobile Platforms
http://gs.statcounter.com/#mobile_os-as-monthly-201201-201212
![Page 10: Nokia Asha App Development - Part 1](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/10.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/11.jpg)
Development• IDE Installation• Overview JavaME• First Project
![Page 12: Nokia Asha App Development - Part 1](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/12.jpg)
• 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](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/13.jpg)
• 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](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/14.jpg)
• 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](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/15.jpg)
• Needed APIs to develop applications for a specific set of devices• MIDP• IMP• PBP• ...
Profiles
![Page 16: Nokia Asha App Development - Part 1](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/16.jpg)
• 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](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/17.jpg)
• 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](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/18.jpg)
• 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](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/19.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/20.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/21.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/22.jpg)
MIDlets• Let´s see how to code a MIDlet
#stopTalking#startCoding
![Page 23: Nokia Asha App Development - Part 1](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/23.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022061208/548bb969b479590e668b4617/html5/thumbnails/24.jpg)
Development processDevelopment Station
MyMIDlet.java
javac
MyMIDlet.class
MyMIDlet.class
MyMIDlet.jar
MyMIDlet.jad
Target Devices
preverify
jar
Download/deploy
Download/deploy