An introduction to the Nokia Asha platform, it's developer offering, tooling overview a bird's eye view of the UX development options, and finally advices for application development and deployment on resource constrained devices
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
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
development cycle - Use for screenshots! - Customize input - Keyboard/touch (pinch) - Sensors (accelerometers, network, location) - Multimedia (webcam) - Content is at - C:\Nokia\Devices\Nokia_Asha_SDK_1_0\bin\Storage\10000 - Needs emulator restart if filesystem updated directly - The number will increase (10002, etc) if multiple simultaneous emulators run
(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
2013 LCDUI and LWUIT UI components in Nokia Asha.pptx v.1 2013-05-28 Jan Krebber Displayable Screen Canvas 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
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!
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
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.
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
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
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())
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
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/
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
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
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.
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