SlideShare ist ein Scribd-Unternehmen logo
1 von 68
Downloaden Sie, um offline zu lesen
Developing for the
Nokia Asha
Software Platform
Attila Csipa @achipa
SmartDevCon2
Katowice, 14. 09. 2013
Contents
What is Nokia Asha
Developer Offering
Java ME apps
Web apps
Nokia Asha UX basics
IDE/Tooling
Nokia IDE for Java
Emulator
Performance optimization
Series 40 (which is not Symbian nor S60)
First device in 1999, the Nokia 7110
(but don’t worry, Linux is actually 8 years older)
A Coca Cola company delivery truck in Knoxville, 1909.
A few years later…
- 1.5 billion devices by January 2012
- 650 million active (plenty of even touch devices)
- Freemium and ads DO work
North London Derby between Arsenal and Tottenham Hotspur at Highbury, 1934
But the world changed…
Women on motorcycles in Great Britain, 1930s
New Nokia Asha
=
Series40 Hardware adaptation
+
Smarterphone middleware
+
Swipe UI
Nokia Asha UI
HARDWAREKEYS
HIERARCHICAL BACK BUTTON
The screen is optimized for mobility,
convenience and effectiveness.
UX paradigm
The Nokia Asha UX paradigm
Building the apps
Construction of the Golden Gate Bridge, San Francisco, 1935.
Nokia Asha Developer Offering
Nokia Asha SDK 1.0 (Java ME)
Nokia Asha web app tools 3.0.0
Xpress Web App Builder 1.0
One 3rd PARTY app running at a time!
Roger Bannister becomes the first human to run a mile in under 4 minutes. 1954
Nokia Asha SDK 1.0
Oracle® based Java ME implementation
New Nokia Public APIs
New emulator
Bundled libraries instead of plugins:
Here Maps for Java ME
Nokia Notifications API
LightWeight UI Toolkit (LWUIT)
Tantalum
On-Device Debugging
Nokia Asha Software Platform 1.0
the Java ME story
• Java ME MIDP 2.1, CLDC 1.1
• Optional JSRs
• Nokia APIs
• Max JAR file size: 5 Mb
• Max Java Heap: 3 Mb
• Screen Size: 240 x 320
• Series 40 Binary Compatibility
Yes, this is a resource constrained environment
Which also means that it rewards GOOD code instead of SLOPPY one
JAD Editor
NOKIA IDE FOR JAVA
© 2012 Nokia Asha 2013 technical briefing v1.2 November 14, 2012 Attila Csipa
Device SDK Manager
Integrated SDK +
Toolchain
App TemplatesApp Templates
JAD Editor
Emulator:
The easy/cheap way to practice
Aerial gunnery training, World War I
Emulator:
What can we do with it?
- Speeds up development cycle
- Use for screenshots!
- Customize input
- Keyboard/touch (pinch)
- Sensors (accelerometers, network, location)
- Multimedia (webcam)
- Content is at -
C:NokiaDevicesNokia_Asha_SDK_1_0binStorage10000
- Needs emulator restart if filesystem updated directly
- The number will increase (10002, etc) if multiple
simultaneous emulators run
On Device Debugging – for the nastiest bugs
From Harvard Mark II electromechanical computer's log, featuring a dead moth:
the first bug, 66 years ago
The joy of the first successful run
Annie Edison Taylor
The first person to survive going over Niagara Falls in a barrel, in 1901
2
© Nokia 2013 LCDUI and LWUIT UI components in Nokia Asha.pptx v.1 2013-05-28 Jan Krebber
THE VISUALIZATION CHANGED,
BUTTHE APIS REMAIN LARGELY COMPATIBLE.
Platform approach
Over-the-air push-style updates
New SDK manager
Independent API/library updates
Full binary compatibility from Asha 1.0+
API offering: extending the platform
CLDC 1.1
(JSR-139)
MIDP 2.1
(JSR-118)
File Connection and
PIM API
(JSR-75)
Bluetooth and OBEX
API
(JSR-82)
Wireless Messaging
API 1.0
(JSR-120)
Wireless Messaging
API 2.0
(JSR-205)
Mobile Media API
(JSR-135)
Web Services API
(JSR-172)
SATSA-CRYPTO API
(JSR-177)
Location API
(JSR-179)
Mobile 3D Graphics
API v1.0
(JSR-184)
Content Handler API
(JSR-211)
Scalable Vector
Graphics API
(JSR-226)
Advanced
Multimedia
Supplements
(JSR-234)
Mobile Sensor API
(JSR-256)
com.nokia.mid.medi
a
com.nokia.mid.ui
com.nokia.mid.ui
frameanimator
com.nokia.mid.ui
gestures
com.nokia.mid.ui
locale
com.nokia.mid.ui
orientation
com.nokia.mid.ui
categorybar
Mobile
Internationalization
(JSR-238)
File Select API
Image Scaling API Network State API Phone Info API Contact API
Nokia Notification
API (NNA)
Nokia In-App
Payment
New Nokia Asha Java APIs
ContactFile selectNetwork state Phone settings
Moving from Service APIs to a PUBLIC PLATFORM OFFERING
What if your app is not running/awake?
Before alarm clocks were affordable,
'knocker-ups' were used to wake
people early in the morning.
UK, around 1900
Nokia Notifications API - NNA
Public API
Push notification service
Shared connection
Custom payload
Nokia in-app payment
Device range
Reach
Security
Simplicity
Sign up to the invitational beta:
http://developer.nokia.com/Distribute/In-app_payment/
Largest range of devices
Broadest reach
• Operator billing live with
- 158 operators
- in 59 countries
Live Operators
■ Full Country coverage
■ Partial Country coverage
(status in April 2013)
Internationalization – JSR238
• Strings AND binary data
• Format data (date, currency)
• Compare
• Sort
3
© Nokia 2013 LCDUI and LWUIT UI components in Nokia Asha.pptx v.1 2013-05-28 Jan Krebber
THE VISUALIZATION CHANGED,
BUTTHE APIS REMAIN COMPATIBLE.
Java UI development approaches
Canvas LCDUI LWUIT
Canvas
Completely custom
You OWN every pixel
Fastest
Best suited for games
The key is a native look and feel
3© 2013 Nokia DevelopingForTheNewAshaPlatform.pptx v. 0.2
LCDUI
LCDUI
High-level components
Nokia UI API
Asha look & feel
No customizability
(except CustomItem)
LCDUI is based on few view types
3
© Nokia 2013 LCDUI and LWUIT UI components in Nokia Asha.pptx v.1 2013-05-28 Jan Krebber
Displayable
ScreenCanvas
With chrome Full screen Alert List Form TextBox
Choice
Group
Date
Field
Text
Field
Gauge String
Item
Image
Item
Custom
Item
Spacer
Implicit choice Exclusive choice Multiple choice
LWUIT
More components
More customization
Asha look and feel
Animated
Custom theming
(branded look and feel)
LWUIT for Nokia Asha Software Platform 1.0
• New port of LWUIT, targeting specifically new Asha platform
• Based on the LWUIT for Series 40 v1.0
• Adds Nokia Asha Software Platform 1.0 Theme
• Adds 8 new components
• Changes and adaptations of existing components to new Asha platform
• Improved performance especially in themes memory usage.
• 24 Examples in SDK
• Double-check you’re including the right JAR!
Nokia Asha web apps - Tools
Xpress-Browser powered
Requires a data connection
Web apps != HTML5 (!!!)
Nokia Asha web app tools 3.0
Backwards compatible with Series 40 web apps
Simulator support for Nokia Asha 1.0 devices
USB deployment of web apps on Nokia Asha 1.0 devices
TESTING IS BEST DONE ON
(SOMEBODY ELSE‘S) DEVICE
Testing a bullet proof vest c.1923
Remote Device Access
• Free for Nokia Developer users
• Deploy & Test apps
www.developer.nokia.com/Devices/Remote_device_access/
• Now with the Asha 501(s)!
Performance optimization
A bicycle with 12 rockets mounted on the back wheel. ~1930s
Why Optimize
Most of the development tasks for the typical mobile
application can be done in many different ways.
Different implementation techniques lead to different
application performance and essentially different
responsiveness of user interface.
Responsiveness of UI is one of the important factors for
application success.
• 0.1 second is about the limit for having the user feel that the system is
reacting instantaneously, meaning that no special feedback is necessary
except to display the result.
• 1.0 second is about the limit for the user's flow of thought to stay
uninterrupted, even though the user will notice the delay. Normally, no special
feedback is necessary during delays of more than 0.1 but less than 1.0
second, but the user does lose the feeling of operating directly on the data.
• 10 seconds is about the limit for keeping the user's attention focused on
the dialogue. For longer delays, users will want to perform other tasks while
waiting for the computer to finish, so they should be given feedback indicating
when the computer expects to be done. Feedback during the delay is
especially important if the response time is likely to be highly variable, since
users will then not know what to expect.
Miller, R. B. (1968)
Response time in man-computer conversational transactions.
Proc. AFIPS Fall Joint Computer Conference Vol. 33, 267-277
User Experience Studies
Helmet test, ca 1912
Can looks deceive?
Can looks deceive?
THINGS ARE AS YOU PERCEIVE THEM
Resource constrained environments
Cheese “sandwich” served on the Sao Paolo – Manaus TAM flight
Perception of speed
• Responsiveness – what you believe is more important
than what you actually see
• Visual updates to acknowledge input
• Draw when you can, not when ready
• Speed != throughput
Parallelize! (concurrency)
• 1 core != 1 system
• Threading is needed to unleash maximum potential
• You need to do it Right TM
• Typical failure to do so: slow, unresponsive Uis
• On Ashas, you will want 4-5 threads, depending on use-
case
Threading pitfalls
- Too many long running threads
- Hard to debug
- Complexity
The last four couples standing in a dance marathon. Chicago, c. 1930
NETWORK operation feedback
• Feedback throughout the download cycle
• (but we can do even better!)
NETWORK operation feedback
• User feedback throughout the DL
• GET ->
DOWNLOAD ->
PARSE ->
CACHE WRITE
File io: make it a habit
Write files as you go
…in a Worker thread…
…flush occasionally...
…don’t do it byte by byte
(do outputStream.write(byte[] buffer)
Don’t wait for it to pile up (especially for cases of
destroyApp())
That pesky 5mb jar size limit
• Obfuscate. Always.
• Reduce image quality/size
• Use large(r) images and clip them (w Sprite class)
• Keep text strings in separate files – they compress better
• Keep data in RMS
• Treat your store JAR as an online installer (runs on it’s
own, maybe bundle with first few levels, download rest as
needed)
• Silver lining:
Small JARs mean less failed DLs
User gets to interact with your app sooner
Architecture Changes
• Carefully consider architecture of your drawing loop and
user input loops and decouple them whenever possible.
• Explore WeakReference introduced in CLDC 1.1 for
memory management.
How much memory do we REALLY need?
• 1024 items
• 1KB per item
• Minimum memory required: 1MB
8KB!
WeakReference object Caching
• Best pattern for using all available heap memory, but never running
into the dreaded OutOfMemoryError.
• CLDC 1.1 WeakReference
• When an object is referenced by a WeakReference, and not using
traditional Object pointers, this is a signal to the garbage collector
that is has permission to collect the object if memory is running low.
• You have to maintain own HashTable of Objects
• To understand this pattern better look at Tantalum Mobile:
• https://github.com/TantalumMobile/
Treat the garbage collector as a friend, not
as a slave
• Pay attention to scoping
• Set variables to null manually when they are no longer
needed
• Be careful with hidden references (inner classes on EDT or
workers)
• If you are calling System.gc(), you’re doing it wrong
Render Caching
• One of the common performance needs is to make your
application paint, in particular scroll, smoothly and quickly.
• You can paint items each into their own Image, keeping that
pre-painted Image in a cache, and reusing it as the object
moves around the screen. Essentially, WeakReference cache of
pre-painted Images.
• To understand this pattern better look at Tantalum Mobile:
• http://projects.developer.nokia.com/Tantalum
File System (Flash Memory) Caching
• Flash memory is slow, but faster then Web.
• Cache downloaded data from previous session. Improve startup time
of app, by loading from disk cache instead of new Web requests.
• RMS and File System (JSR-75) same speed, but with RMS no security
prompts.
• Underwater stones: still remember, Flash memory is slow.
• Architect your application to use asynchronous loading /saving of
data from / to disk cache.
Performance summary
•Work with your interaction designer to
find and/or make cheat zones
−Hide activity not just behind splash screens, but also
dialogs, alerts
−Predict user activity to appear “instant-ready”
Summary
• Huge untapped market, plenty of devices even if you
count only touch enabled ones
• (Surprisingly?) Java ME with Canvas, LCDUI or LWUIT UIs
paired with a reasonable amount of APIs allows for rich
functionality
• Coding for Asha will make you more aware of resources,
UX, and thus make you a better developer for all the
other platforms, too
http://developer.nokia.com
Nokia developer resources
Thank you!
Questions?
Attila Csipa
@achipa
All images were from @HistoricalPics or WikiMedia Commons under CC BY-SA

Weitere ähnliche Inhalte

Was ist angesagt?

What’s Going On with the Adobe® Flash® Platform and why it is still Relevant ...
What’s Going On with the Adobe® Flash® Platform and why it is still Relevant ...What’s Going On with the Adobe® Flash® Platform and why it is still Relevant ...
What’s Going On with the Adobe® Flash® Platform and why it is still Relevant ...Joseph Labrecque
 
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 09)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 09)iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 09)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 09)Jonathan Engelsma
 
IT for managers
IT for managersIT for managers
IT for managersShareefAP1
 
India Game Developer Summit 2010 Slides
India Game Developer Summit 2010 SlidesIndia Game Developer Summit 2010 Slides
India Game Developer Summit 2010 SlidesHemanth Sharma
 
ゲーム作成で学ぶ iPhoneアプリケーション超入門
ゲーム作成で学ぶ iPhoneアプリケーション超入門ゲーム作成で学ぶ iPhoneアプリケーション超入門
ゲーム作成で学ぶ iPhoneアプリケーション超入門SwapSkills
 
Technology life cycle of java
Technology life cycle of javaTechnology life cycle of java
Technology life cycle of javaSanjeev Gupta
 
IBM Lotus Mobile Strategy
IBM Lotus Mobile StrategyIBM Lotus Mobile Strategy
IBM Lotus Mobile StrategyDvir Reznik
 
Velocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuitVelocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuitTina Su
 
Mobile applications chapter 5
Mobile applications chapter 5Mobile applications chapter 5
Mobile applications chapter 5Akib B. Momin
 

Was ist angesagt? (14)

What’s Going On with the Adobe® Flash® Platform and why it is still Relevant ...
What’s Going On with the Adobe® Flash® Platform and why it is still Relevant ...What’s Going On with the Adobe® Flash® Platform and why it is still Relevant ...
What’s Going On with the Adobe® Flash® Platform and why it is still Relevant ...
 
iOS App Architecture
iOS App ArchitectureiOS App Architecture
iOS App Architecture
 
Android
Android Android
Android
 
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 09)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 09)iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 09)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 09)
 
ios basics
ios basicsios basics
ios basics
 
IT for managers
IT for managersIT for managers
IT for managers
 
Android
AndroidAndroid
Android
 
India Game Developer Summit 2010 Slides
India Game Developer Summit 2010 SlidesIndia Game Developer Summit 2010 Slides
India Game Developer Summit 2010 Slides
 
ゲーム作成で学ぶ iPhoneアプリケーション超入門
ゲーム作成で学ぶ iPhoneアプリケーション超入門ゲーム作成で学ぶ iPhoneアプリケーション超入門
ゲーム作成で学ぶ iPhoneアプリケーション超入門
 
Technology life cycle of java
Technology life cycle of javaTechnology life cycle of java
Technology life cycle of java
 
IBM Lotus Mobile Strategy
IBM Lotus Mobile StrategyIBM Lotus Mobile Strategy
IBM Lotus Mobile Strategy
 
iOS App Development and Marketing
iOS App Development and MarketingiOS App Development and Marketing
iOS App Development and Marketing
 
Velocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuitVelocity2013 mobile ci_intuit
Velocity2013 mobile ci_intuit
 
Mobile applications chapter 5
Mobile applications chapter 5Mobile applications chapter 5
Mobile applications chapter 5
 

Ähnlich wie Developing For Nokia Asha Devices

Introduction to Mobile Operating System.pptx
Introduction to Mobile Operating System.pptxIntroduction to Mobile Operating System.pptx
Introduction to Mobile Operating System.pptxaparna14patil
 
android vs symbian
android  vs symbianandroid  vs symbian
android vs symbianAJAL A J
 
Cerebro for vfx eng
Cerebro for vfx engCerebro for vfx eng
Cerebro for vfx engCineSoft
 
Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko3D
 
Building iPhone Apps: From Flash Lite to Corona
Building iPhone Apps: From Flash Lite to CoronaBuilding iPhone Apps: From Flash Lite to Corona
Building iPhone Apps: From Flash Lite to CoronaAnscamobile
 
Voice based web browser
Voice based web browserVoice based web browser
Voice based web browserGowsalyasri
 
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机Rex Tsai
 
Никита Корчагин - Introduction to Apple iOS Development.
Никита Корчагин - Introduction to Apple iOS Development.Никита Корчагин - Introduction to Apple iOS Development.
Никита Корчагин - Introduction to Apple iOS Development.DataArt
 
MWC/ADC 2013 Introduction to Asha application development
MWC/ADC 2013 Introduction to Asha application developmentMWC/ADC 2013 Introduction to Asha application development
MWC/ADC 2013 Introduction to Asha application developmentMicrosoft Mobile Developer
 
ABS 2014 - The Growth of Android in Embedded Systems
ABS 2014 - The Growth of Android in Embedded SystemsABS 2014 - The Growth of Android in Embedded Systems
ABS 2014 - The Growth of Android in Embedded SystemsBenjamin Zores
 
Cross Platform Mobile Technologies
Cross Platform Mobile TechnologiesCross Platform Mobile Technologies
Cross Platform Mobile TechnologiesTalentica Software
 

Ähnlich wie Developing For Nokia Asha Devices (20)

Android & IOS
Android & IOSAndroid & IOS
Android & IOS
 
Introduction to Mobile Operating System.pptx
Introduction to Mobile Operating System.pptxIntroduction to Mobile Operating System.pptx
Introduction to Mobile Operating System.pptx
 
Android system
Android systemAndroid system
Android system
 
android vs symbian
android  vs symbianandroid  vs symbian
android vs symbian
 
Cerebro for vfx eng
Cerebro for vfx engCerebro for vfx eng
Cerebro for vfx eng
 
Lick my Lollipop
Lick my LollipopLick my Lollipop
Lick my Lollipop
 
Mobile Application development
Mobile Application developmentMobile Application development
Mobile Application development
 
Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++
 
Android OS
Android OSAndroid OS
Android OS
 
Building iPhone Apps: From Flash Lite to Corona
Building iPhone Apps: From Flash Lite to CoronaBuilding iPhone Apps: From Flash Lite to Corona
Building iPhone Apps: From Flash Lite to Corona
 
Android os
Android osAndroid os
Android os
 
Voice based web browser
Voice based web browserVoice based web browser
Voice based web browser
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机
开放原码手机操作系统 Ubuntu Phone 架构、移植与刷机
 
Никита Корчагин - Introduction to Apple iOS Development.
Никита Корчагин - Introduction to Apple iOS Development.Никита Корчагин - Introduction to Apple iOS Development.
Никита Корчагин - Introduction to Apple iOS Development.
 
MWC/ADC 2013 Introduction to Asha application development
MWC/ADC 2013 Introduction to Asha application developmentMWC/ADC 2013 Introduction to Asha application development
MWC/ADC 2013 Introduction to Asha application development
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
ABS 2014 - The Growth of Android in Embedded Systems
ABS 2014 - The Growth of Android in Embedded SystemsABS 2014 - The Growth of Android in Embedded Systems
ABS 2014 - The Growth of Android in Embedded Systems
 
Cross Platform Mobile Technologies
Cross Platform Mobile TechnologiesCross Platform Mobile Technologies
Cross Platform Mobile Technologies
 
WWDC 2020
WWDC 2020WWDC 2020
WWDC 2020
 

Kürzlich hochgeladen

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Kürzlich hochgeladen (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

Developing For Nokia Asha Devices

  • 1. Developing for the Nokia Asha Software Platform Attila Csipa @achipa SmartDevCon2 Katowice, 14. 09. 2013
  • 2. Contents What is Nokia Asha Developer Offering Java ME apps Web apps Nokia Asha UX basics IDE/Tooling Nokia IDE for Java Emulator Performance optimization
  • 3. Series 40 (which is not Symbian nor S60) First device in 1999, the Nokia 7110 (but don’t worry, Linux is actually 8 years older) A Coca Cola company delivery truck in Knoxville, 1909.
  • 4. A few years later… - 1.5 billion devices by January 2012 - 650 million active (plenty of even touch devices) - Freemium and ads DO work North London Derby between Arsenal and Tottenham Hotspur at Highbury, 1934
  • 5. But the world changed… Women on motorcycles in Great Britain, 1930s
  • 6. New Nokia Asha = Series40 Hardware adaptation + Smarterphone middleware + Swipe UI
  • 9. The screen is optimized for mobility, convenience and effectiveness.
  • 10. UX paradigm The Nokia Asha UX paradigm
  • 11. Building the apps Construction of the Golden Gate Bridge, San Francisco, 1935.
  • 12. Nokia Asha Developer Offering Nokia Asha SDK 1.0 (Java ME) Nokia Asha web app tools 3.0.0 Xpress Web App Builder 1.0
  • 13. One 3rd PARTY app running at a time! Roger Bannister becomes the first human to run a mile in under 4 minutes. 1954
  • 14. Nokia Asha SDK 1.0 Oracle® based Java ME implementation New Nokia Public APIs New emulator Bundled libraries instead of plugins: Here Maps for Java ME Nokia Notifications API LightWeight UI Toolkit (LWUIT) Tantalum On-Device Debugging
  • 15. Nokia Asha Software Platform 1.0 the Java ME story • Java ME MIDP 2.1, CLDC 1.1 • Optional JSRs • Nokia APIs • Max JAR file size: 5 Mb • Max Java Heap: 3 Mb • Screen Size: 240 x 320 • Series 40 Binary Compatibility
  • 16. Yes, this is a resource constrained environment Which also means that it rewards GOOD code instead of SLOPPY one
  • 17. JAD Editor NOKIA IDE FOR JAVA © 2012 Nokia Asha 2013 technical briefing v1.2 November 14, 2012 Attila Csipa Device SDK Manager Integrated SDK + Toolchain App TemplatesApp Templates JAD Editor
  • 18. Emulator: The easy/cheap way to practice Aerial gunnery training, World War I
  • 19. Emulator: What can we do with it? - Speeds up development cycle - Use for screenshots! - Customize input - Keyboard/touch (pinch) - Sensors (accelerometers, network, location) - Multimedia (webcam) - Content is at - C:NokiaDevicesNokia_Asha_SDK_1_0binStorage10000 - Needs emulator restart if filesystem updated directly - The number will increase (10002, etc) if multiple simultaneous emulators run
  • 20. On Device Debugging – for the nastiest bugs From Harvard Mark II electromechanical computer's log, featuring a dead moth: the first bug, 66 years ago
  • 21. The joy of the first successful run Annie Edison Taylor The first person to survive going over Niagara Falls in a barrel, in 1901
  • 22. 2 © Nokia 2013 LCDUI and LWUIT UI components in Nokia Asha.pptx v.1 2013-05-28 Jan Krebber THE VISUALIZATION CHANGED, BUTTHE APIS REMAIN LARGELY COMPATIBLE.
  • 23. Platform approach Over-the-air push-style updates New SDK manager Independent API/library updates Full binary compatibility from Asha 1.0+
  • 24. API offering: extending the platform CLDC 1.1 (JSR-139) MIDP 2.1 (JSR-118) File Connection and PIM API (JSR-75) Bluetooth and OBEX API (JSR-82) Wireless Messaging API 1.0 (JSR-120) Wireless Messaging API 2.0 (JSR-205) Mobile Media API (JSR-135) Web Services API (JSR-172) SATSA-CRYPTO API (JSR-177) Location API (JSR-179) Mobile 3D Graphics API v1.0 (JSR-184) Content Handler API (JSR-211) Scalable Vector Graphics API (JSR-226) Advanced Multimedia Supplements (JSR-234) Mobile Sensor API (JSR-256) com.nokia.mid.medi a com.nokia.mid.ui com.nokia.mid.ui frameanimator com.nokia.mid.ui gestures com.nokia.mid.ui locale com.nokia.mid.ui orientation com.nokia.mid.ui categorybar Mobile Internationalization (JSR-238) File Select API Image Scaling API Network State API Phone Info API Contact API Nokia Notification API (NNA) Nokia In-App Payment
  • 25. New Nokia Asha Java APIs ContactFile selectNetwork state Phone settings Moving from Service APIs to a PUBLIC PLATFORM OFFERING
  • 26. What if your app is not running/awake? Before alarm clocks were affordable, 'knocker-ups' were used to wake people early in the morning. UK, around 1900
  • 27. Nokia Notifications API - NNA Public API Push notification service Shared connection Custom payload
  • 28. Nokia in-app payment Device range Reach Security Simplicity Sign up to the invitational beta: http://developer.nokia.com/Distribute/In-app_payment/
  • 29. Largest range of devices
  • 30. Broadest reach • Operator billing live with - 158 operators - in 59 countries Live Operators ■ Full Country coverage ■ Partial Country coverage (status in April 2013)
  • 31. Internationalization – JSR238 • Strings AND binary data • Format data (date, currency) • Compare • Sort
  • 32. 3 © Nokia 2013 LCDUI and LWUIT UI components in Nokia Asha.pptx v.1 2013-05-28 Jan Krebber THE VISUALIZATION CHANGED, BUTTHE APIS REMAIN COMPATIBLE.
  • 33. Java UI development approaches Canvas LCDUI LWUIT
  • 34. Canvas Completely custom You OWN every pixel Fastest Best suited for games
  • 35. The key is a native look and feel 3© 2013 Nokia DevelopingForTheNewAshaPlatform.pptx v. 0.2
  • 36. LCDUI
  • 37. LCDUI High-level components Nokia UI API Asha look & feel No customizability (except CustomItem)
  • 38. LCDUI is based on few view types 3 © Nokia 2013 LCDUI and LWUIT UI components in Nokia Asha.pptx v.1 2013-05-28 Jan Krebber Displayable ScreenCanvas With chrome Full screen Alert List Form TextBox Choice Group Date Field Text Field Gauge String Item Image Item Custom Item Spacer Implicit choice Exclusive choice Multiple choice
  • 39. LWUIT More components More customization Asha look and feel Animated Custom theming (branded look and feel)
  • 40. LWUIT for Nokia Asha Software Platform 1.0 • New port of LWUIT, targeting specifically new Asha platform • Based on the LWUIT for Series 40 v1.0 • Adds Nokia Asha Software Platform 1.0 Theme • Adds 8 new components • Changes and adaptations of existing components to new Asha platform • Improved performance especially in themes memory usage. • 24 Examples in SDK • Double-check you’re including the right JAR!
  • 41. Nokia Asha web apps - Tools Xpress-Browser powered Requires a data connection Web apps != HTML5 (!!!) Nokia Asha web app tools 3.0 Backwards compatible with Series 40 web apps Simulator support for Nokia Asha 1.0 devices USB deployment of web apps on Nokia Asha 1.0 devices
  • 42. TESTING IS BEST DONE ON (SOMEBODY ELSE‘S) DEVICE Testing a bullet proof vest c.1923
  • 43. Remote Device Access • Free for Nokia Developer users • Deploy & Test apps www.developer.nokia.com/Devices/Remote_device_access/ • Now with the Asha 501(s)!
  • 44. Performance optimization A bicycle with 12 rockets mounted on the back wheel. ~1930s
  • 45. Why Optimize Most of the development tasks for the typical mobile application can be done in many different ways. Different implementation techniques lead to different application performance and essentially different responsiveness of user interface. Responsiveness of UI is one of the important factors for application success.
  • 46. • 0.1 second is about the limit for having the user feel that the system is reacting instantaneously, meaning that no special feedback is necessary except to display the result. • 1.0 second is about the limit for the user's flow of thought to stay uninterrupted, even though the user will notice the delay. Normally, no special feedback is necessary during delays of more than 0.1 but less than 1.0 second, but the user does lose the feeling of operating directly on the data. • 10 seconds is about the limit for keeping the user's attention focused on the dialogue. For longer delays, users will want to perform other tasks while waiting for the computer to finish, so they should be given feedback indicating when the computer expects to be done. Feedback during the delay is especially important if the response time is likely to be highly variable, since users will then not know what to expect. Miller, R. B. (1968) Response time in man-computer conversational transactions. Proc. AFIPS Fall Joint Computer Conference Vol. 33, 267-277
  • 50. THINGS ARE AS YOU PERCEIVE THEM
  • 51. Resource constrained environments Cheese “sandwich” served on the Sao Paolo – Manaus TAM flight
  • 52. Perception of speed • Responsiveness – what you believe is more important than what you actually see • Visual updates to acknowledge input • Draw when you can, not when ready • Speed != throughput
  • 53. Parallelize! (concurrency) • 1 core != 1 system • Threading is needed to unleash maximum potential • You need to do it Right TM • Typical failure to do so: slow, unresponsive Uis • On Ashas, you will want 4-5 threads, depending on use- case
  • 54. Threading pitfalls - Too many long running threads - Hard to debug - Complexity The last four couples standing in a dance marathon. Chicago, c. 1930
  • 55. NETWORK operation feedback • Feedback throughout the download cycle • (but we can do even better!)
  • 56. NETWORK operation feedback • User feedback throughout the DL • GET -> DOWNLOAD -> PARSE -> CACHE WRITE
  • 57. File io: make it a habit Write files as you go …in a Worker thread… …flush occasionally... …don’t do it byte by byte (do outputStream.write(byte[] buffer) Don’t wait for it to pile up (especially for cases of destroyApp())
  • 58. That pesky 5mb jar size limit • Obfuscate. Always. • Reduce image quality/size • Use large(r) images and clip them (w Sprite class) • Keep text strings in separate files – they compress better • Keep data in RMS • Treat your store JAR as an online installer (runs on it’s own, maybe bundle with first few levels, download rest as needed) • Silver lining: Small JARs mean less failed DLs User gets to interact with your app sooner
  • 59. Architecture Changes • Carefully consider architecture of your drawing loop and user input loops and decouple them whenever possible. • Explore WeakReference introduced in CLDC 1.1 for memory management.
  • 60. How much memory do we REALLY need? • 1024 items • 1KB per item • Minimum memory required: 1MB 8KB!
  • 61. WeakReference object Caching • Best pattern for using all available heap memory, but never running into the dreaded OutOfMemoryError. • CLDC 1.1 WeakReference • When an object is referenced by a WeakReference, and not using traditional Object pointers, this is a signal to the garbage collector that is has permission to collect the object if memory is running low. • You have to maintain own HashTable of Objects • To understand this pattern better look at Tantalum Mobile: • https://github.com/TantalumMobile/
  • 62. Treat the garbage collector as a friend, not as a slave • Pay attention to scoping • Set variables to null manually when they are no longer needed • Be careful with hidden references (inner classes on EDT or workers) • If you are calling System.gc(), you’re doing it wrong
  • 63. Render Caching • One of the common performance needs is to make your application paint, in particular scroll, smoothly and quickly. • You can paint items each into their own Image, keeping that pre-painted Image in a cache, and reusing it as the object moves around the screen. Essentially, WeakReference cache of pre-painted Images. • To understand this pattern better look at Tantalum Mobile: • http://projects.developer.nokia.com/Tantalum
  • 64. File System (Flash Memory) Caching • Flash memory is slow, but faster then Web. • Cache downloaded data from previous session. Improve startup time of app, by loading from disk cache instead of new Web requests. • RMS and File System (JSR-75) same speed, but with RMS no security prompts. • Underwater stones: still remember, Flash memory is slow. • Architect your application to use asynchronous loading /saving of data from / to disk cache.
  • 65. Performance summary •Work with your interaction designer to find and/or make cheat zones −Hide activity not just behind splash screens, but also dialogs, alerts −Predict user activity to appear “instant-ready”
  • 66. Summary • Huge untapped market, plenty of devices even if you count only touch enabled ones • (Surprisingly?) Java ME with Canvas, LCDUI or LWUIT UIs paired with a reasonable amount of APIs allows for rich functionality • Coding for Asha will make you more aware of resources, UX, and thus make you a better developer for all the other platforms, too
  • 68. Thank you! Questions? Attila Csipa @achipa All images were from @HistoricalPics or WikiMedia Commons under CC BY-SA