Introduction to Nokia Asha software platform 1.0

7,761 views

Published on

This webinar introduces Nokia Asha software platform 1.0 and what’s new for developers targeting the Nokia Asha 501 phone. It covers the updates to the development tools and the new APIs for Nokia Notifications, Image Scaling, Image Processing, Gestures, and File Dialog. After providing an overview to what’s new, Java™ expert Michael Samarin of Futurice provides coding demonstrations to show how to use the new features to build great apps.

Join the sessions:

14 May - 7 a.m. New York; noon London; 7 p.m. Singapore: http://forumnokia.adobeconnect.com/intro-asha-plat-ssn1/event/event_info.html

22 May - 8 a.m. London; 12:30 p.m. New Delhi; 3 p.m. Singapore: http://forumnokia.adobeconnect.com/intro-asha-plat-ssn2/event/event_info.html

30 May - 8 a.m. San Francisco; 10 a.m. Mexico City; 4 p.m. London: http://forumnokia.adobeconnect.com/intro-asha-plat-ssn3/event/event_info.html

Published in: Technology
4 Comments
1 Like
Statistics
Notes
  • Webinar recording of the 21 August session, including full chat commentary, is available here: http://forumnokia.adobeconnect.com/p78kwd61umh/
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Webinar recording of the 20 August session, including full chat commentary, is available here: http://forumnokia.adobeconnect.com/p285ky5k5p5/
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Lots of quick overview. But also some new and updated material in the August 19th, 2013 session. Great O/S speed was demonstrated using the emulator. Also, Push notifications and internal state event generation within the emulator are great improvements.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Recording of 14 May session, including full chat commentary, is here: http://forumnokia.adobeconnect.com/p3m4roceiuh/
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
7,761
On SlideShare
0
From Embeds
0
Number of Embeds
21
Actions
Shares
0
Downloads
219
Comments
4
Likes
1
Embeds 0
No embeds

No notes for slide

Introduction to Nokia Asha software platform 1.0

  1. 1. INTRODUCTION TO NOKIA ASHA SOFTWARE PLATFORM 1.0 Michael Samarin Director, Developer Training and Evangelism Futurice @MichaelSamarin
  2. 2. NOKIA ASHA SOFTWARE PLATFORM 1.0 • 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 • Very responsive UI, because of the new underlying OS and new Oracle VM • Series 40 Binary Compatibility
  3. 3. WHAT’S NEW FOR 3RD PARTY DEVELOPERS Nokia Asha SDK 1.0 – Nokia Asha 501 Emulator, support for 47 languages – Nokia IDE 2.0 for Java ME – Offline Documentation – Tantalum Library – HERE Maps API – On-device debugger over WiFi UI and graphics – LCDUI Changes – New LWUIT for Asha Release – Image scaling API – Gesture API: new double tap App Framework – Internationalization API (JSR-238) Networking – Network State API: SIM, network, WLAN change notifications
  4. 4. WHAT’S NEW FOR 3RD PARTY DEVELOPERS Multimedia – AMMS: Tuner, image encoding, image post processing – Video Recording – Removed com.nokia.mid.sound.Sound (Nokia UI) Security – PKI support. – Removed APDU / SATSA-APDU Data Handling – Contacts API: contact change notifications in phonebook (while MIDlet is active) – File Select API: use native file browser to select files – Phone Setting API: retrieve settings + change notifications: flight mode, data connection, silent mode, etc. – Nokia Notifications API: subscribe + get payload of notifications
  5. 5. HANDS-ON DEMO Nokia Asha SDK 1.0 – Nokia Asha 501 Emulator – Nokia IDE 2.0 for Java ME – Offline Documentation
  6. 6. NEW ASHA UX https://www.developer.nokia.com/Resources/Library/Asha_UI
  7. 7. HARDWARE KEYS BACK BUTTON
  8. 8. USER INTERFACE LAYOUT
  9. 9. SCREEN SIZES AND AREAS
  10. 10. CATEGORY BAR CHANGES - ACTIONS Highlights current tab. Category bar should disappear when drilling down. Highlight only on touch down. Affect entire view, not a single item within view.
  11. 11. HANDS-ON DEMO Nokia Asha UI Components Demo
  12. 12. 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. • 25 Examples in SDK
  13. 13. HANDS-ON DEMO LWUIT Components Demo
  14. 14. TANTALUM LIBRARY • Tantalum is a cross-platform Java library that provides a minimal set of functionality to easily create concurrent, networked applications: thread pool, HTTP networking with caching, logging and JSON support from org.json.me library. It’s a rather of a set of common best practices that has been validated to work on both Asha and Android, than a heavyweight compatibility wrapper. • The approach is to strictly separate clean, concurrent, event-driven background application logic from clean, single thread event-driven user interface (UI) code. This way you can achieve the best-possible user experience (UX) on each platform you support by using the best native UI classes while re-using your application logic across all platforms.
  15. 15. HANDS-ON DEMO Tantalum PicasaViewer Demo
  16. 16. PHONE SETTINGS Current state & change listener subscriptions – Flight mode – Data connection – Background data connection – Roaming data connection – Vibrator mode – Silent mode
  17. 17. SETTINGS DETECTION
  18. 18. NETWORK STATE Monitor state of – Network (home / roaming) – SIM – WLAN
  19. 19. NETWORK STATE DETECTION
  20. 20. SIM STATE DETECTION
  21. 21. WIFI STATE DETECTION
  22. 22. FILE SELECT API • The File Select API allows MIDlets to use the device’s native file browser to list and select files. The listing of files can be filtered by URL path and media type, and single as well as multiple files can be selected. • The device’s native file browser provides its own UI and handles browsing, listing and selection of files. The File Select API pauses the thread, which is calling the API, till a file is selected or the operation is cancelled. • MIDlets can use the File Select API to: – Select files to attach to a MMS or email message – Select files for uploading to a website (publishing, archiving etc.) – Select documents (PDF, DOC, TXT etc.) for viewing or editing – Select images for viewing or editing – Select audio or video clips for playback or editing • Use the File Select API, if you want to list and select files, but do not want to implement the file listing and selection functionality by yourself. • Note: The File Select API can launch only one instance of the device’s native file browser at a time.
  23. 23. USING FILESELECT API • The File Select API consists of the following classes (packaged as a part of the Nokia UI API): • FileSelect – Use the FileSelect class to allow a MIDlet to list and select files through the native file browser of the device. • FileSelectDetail – Use the FileSelectDetail class to allow a MIDlet to retrieve detailed information, like name, type, size and URL, about the selected files of the device.
  24. 24. IMAGE SCALING API • The Image Scaling API allows MIDlets to downscale images by file size or by dimension (i.e. width and height) with the aspect ratio of the image can be retained if required. For JPEG images, the output quality can be set before downscaling. • Actual downscaling process is done outside of JVM, so no extra memory requirements for 3rd party apps. • Note: The Image Scaling API cannot upscale an image, and does not allow users to select any protected images for downscaling due to security or copyright issues.
  25. 25. USING IMAGE SCALING • The Image Scaling API consists of the following classes and interfaces (packaged as a part of the Nokia API): • ImageScaler – Use the ImageScaler class to allow a MIDlet to downscale images in the device. • ImageScalerConstants – Use the ImageScaleConstants class to allow a MIDlet to use the image scaler definitions generated by the configuration utility. • ImageScalerListener – Use the ImageScalerListener interface to allow a MIDlet to discover status of images being downscaled in the device.
  26. 26. HANDS-ON DEMO New Nokia APIs – FileSelect API – ImageScaling API
  27. 27. WHAT ARE NOKIA NOTIFICATIONS FOR? • Real Push Notification service, similar to existing equivalents on Windows Phone, Android and iOS. • Provides a way for 3rd party developers to deliver targeted notifications to individual Asha devices with installed dedicated 3rd party Midlet. • Notifications are delivered in various forms to device: – If Midlet is not running and device is locked: notification is delivered to the lock screen with associated audio / visual / vibration signal; – If Midlet is not running and device is unlocked: notification is delivered to the upper notification area (similar to Windows Phone toast notifications) with associated audio / visual / vibration signal; – If Midlet is running: notification is delivered directly to the Midlet. • In order to deliver notification, device must have enabled data connection.
  28. 28. NOTIFICATION AT THE LOCK SCREEN
  29. 29. NOTIFICATION AREA
  30. 30. NOTIFICATION AT THE UPPER SLIDER
  31. 31. NOTIFICATIONS APIS There are two parts: – Nokia Notifications Service API (REST API); • Used by 3rd party service in order to contact Nokia Notification Server and deliver targeted notifications to the individual devices. – Nokia Notifications Client API (Java ME); • Used by 3rd party Midlet in order to register for the notifications delivery and actually receive notifications.
  32. 32. REGISTERING NEW 3RD PARTY SERVICE • Developer must have valid free Nokia Developer ID; • Use web based Nokia Developer Consoler at: https://account.nnapi.ovi.com/cm/Web/services.jsp • Create and generate with web tool: – Service ID – Application ID – Service Secret
  33. 33. NOKIA DEVELOPER CONSOLE UI
  34. 34. IMPLEMENTING FULL SERVICE • Once service created, developer can use Nokia Notifications Client API (Java ME) in Midlet and register for receiving notifications by using Service ID and Application ID. • When Midlet is registered with service, it received unique Notification ID. This ID should be transferred to 3rd party service as unique identifier of Midlet and device. • Using Nokia Notifications Service API (REST), 3rd party service contacts Nokia Notification Server and sends actual notifications with Service ID, Application ID, Service Secret, Notification ID.
  35. 35. SANDBOX AND PRODUCTION • Each service will have: – Sandbox environment; – Production environment; – Production environment in China; • On device or emulator, developers can switch environment with special Environment Selector from Nokia Asha SDK.
  36. 36. NOKIA NOTIFICATIONS CLIENT API NotificationInfo – Use the NotificationInfo to retrieve application specific settings from the Notification Enabler. NotificationMessage – Use the NotificationMessage to receive notification messages from a service. NotificationPayload – Use the NotificationPayload to receive notification payload from a service. NotificationSession – Use the NotificationSession for communicating with the Notification Enabler. NotificationSessionListener – Use the NotificationSessionListener to get notified when a message or a notification info is received, or when the notification status changes. NotificationState – Use the NotificationState to determine the state of notification session i.e. whether the MIDlet is not connected, connecting, or connected to receive notifications. NotificationEnvironment – Use the NotificationEnvironment to specify the Notification Server environment for the Notification Enabler. NotificationError – Use the NotificationError to determine errors related to the notification state and exceptions. NotificationSessionFactory – Use the NotificationSessionFactory to create a notification session to communicate with the Notification Enabler.
  37. 37. SEQUENCE OF STEPS FOR MIDLET Load the session by calling the NotificationSessionFactory and give the application identity: private NotificationSession session; session = NotificationSessionFactory.openSession(midlet, "example.com", "com.example", this); Request from session Notification ID and transfer to 3rd party service. Implement NotificationSessionListener;
  38. 38. USING NOKIA NOTIFICATION SERVICE API (REST) WITH CURL Test API: curl --digest -u "<SERVICE_ID>:<SERVICE_SECRET>" https://alpha.one.ovi.com/nnapi/1.0/ping Send notification: curl --digest -u "<SERVICE_ID>:<SERVICE_SECRET>" -d "toapp=<APPLICATION_ID>" -d "payload=Test" https://alpha.one.ovi.com/nnapi/1.0/nid/<NOTIFICATION_ID>
  39. 39. NOTIFICATION PARAMETERS (1) payload – Notification content. Payload can be max 1536 bytes long. System never touches this part (except for doing compression on the server side and decompression on the client side) - it is always provided to the recipient application "as is". wakeup – Specifies whether an application that is not already running on the device should be started when a notification is received. Note that a notification will only be displayed if the wake up parameter is set TRUE both in the Service API and the Client API. Default value is TRUE. alert – Defines if an alert is to be triggered when notification is received. Valid values TRUE or FALSE. Default value is FALSE. ctype – Specifies the content type of payload as a mime-type (for example, application/xml, text/plain). Maximum length is 255 bytes. enc – Defines the message content encoding (for example, Base64). Maximum length is 32 bytes.
  40. 40. NOTIFICATION PARAMETERS (2) title – Notification title. Maximum length is 140 bytes. subtitle – Notification subtitle. Maximum length is 140 bytes. type – Notification type. Maximum length is 20 bytes. icon – Notification icon URI. This URI must point to the resource available publicly in web. Only PNG format icons are supported. Maximum length is 256 octets. expires-at – If the recipient is not available, this parameter defines the time in seconds the notification will be stored for the recipient. Maximum value is 1209600. toApp – ID of the target application.
  41. 41. HANDS-ON DEMO Nokia Notifications APIs
  42. 42. THANK YOU!

×