how to develop cool apps for nokia asha smartphones
Embed Size (px)
DESCRIPTION
This webinar presentation takes you through the features of the Series 40 platform for Asha smartphones, which enable the coolest apps to be developed. To start, the features of the UI based on either LCDUI or LWUIT for Java are reviewed. Then there is a discussion on how you port apps from Android — looking at the key issues you need to consider. The presentation then concludes by reviewing the options for 2D and 3D graphics, in particular how they help develop outstanding games. Numerous demonstrations are included, along with links to the source code and installation files, so you can try the apps yourself and use the code in your own apps. Join the next session: 4 April - 8 a.m. London; 12:30 p.m. New Delhi; 3 p.m. Singapore - http://forumnokia.adobeconnect.com/cool-asha-ssn2/event/event_info.htmlTRANSCRIPT
- 1. Developing coolapplications forAsha Touchsmartphones1 Michael Samarin, Director of Developer Training and Evangelism, Futurice
2. New look for LCDUI Components2 3. LCDUI Displayable Screen CanvasFormList AlertText boxWith chromeFull screen Implicit choice Exclusive choiceNon-exclusive choiceChoice Date TextGaugeStringImage CustomSpacerGroup3FieldField ItemItemItem 4. Full Touch UI View title Status bar Header bar Screen Action button 2 Action button 1(options) 240 x 400 px 3:5 aspect ratio Previous QVGA = 3:4Main content area New Action buttons Category bar Navigation bar Back buttonCategory bar Back button4 Michael Samarin, Director of Developer Training and Evangelism, Futurice 5. IconCommand Extends LCDUI Command class Actionbutton 1 Adds: Icon Built-in system icon Own icon (unselected, [selected]) Back button always has default icon Not possible to override!Category bar5 Michael Samarin, Director of Developer Training and Evangelism, Futurice 6. CategoryBar View switching One element always highlighted Mandatory & automatic back button Icons Max: 15 icons (+ back) Portrait: 4 visible, landscape: 6 visible44 x 44 icon Excess (> 15) icons not shown Size: 44 x 44 edge-to-edge. Make actual icon smaller! 6 Michael Samarin, Director of Developer Training and Evangelism, Futurice 7. Demo:Building Full Touch LCDUI7 Michael Samarin, Director of Developer Training and Evangelism, Futurice 8. Series 40 UI Visualizationhttps://projects.developer.nokia.com/s40uivisualisation8 Michael Samarin, Director of Developer Training and Evangelism, Futurice 9. Demo:Series 40 UI Visualization9 Michael Samarin, Director of Developer Training and Evangelism, Futurice 10. LWUIT Lightweight UI Toolkit - as read in LWUIT Developer Guide: widget library inspired by Swing but designed for constrained devices such as mobile phones and set-top boxes. Comprehensive UI Library - rich set of easily customizable UI components, such as Lists, Table, Calendar etc. Pluggable and customizable look&feel with Themes. Transitions, animations, layout management Scalability and portability across platforms http://www.oracle.com/technetwork/java/javame/javamobile/download/lwuit/index.html10 Michael Samarin, Director of Developer Training and Evangelism, Futurice 11. LWUIT for Series 40https://projects.developer.nokia.com/LWUIT_for_Series_40 Changes and optimizations for Series 40: TextArea, TextField, List, Button, Form, new components MenuBar softkeys behavior in full touch, touch & type, non touch Nokia UI Guestures, Themes Comprehensive developers guide and examples http://www.developer.nokia.com/Resources/Library/LWUIT11 Michael Samarin, Director of Developer Training and Evangelism, Futurice 12. 12 Michael Samarin, Director of Developer Training and Evangelism, Futurice 13. Demo:Simple LWUIT UI13 Michael Samarin, Director of Developer Training and Evangelism, Futurice 14. LWUIT Examples Projects for Series 40LWUIT Slide Puzzle:https://projects.developer.nokia.com/LWUIT_PuzzleLWUIT Tourist Attractions:https://projects.developer.nokia.com/LWUIT_TouristAttractionsLWUIT CategoryBar Demo:http://projects.developer.nokia.com/LWUIT_CategoryBarDemo14Michael Samarin, Director of Developer Training and Evangelism, Futurice 15. Demo:LWUIT Slide Puzzle15 Michael Samarin, Director of Developer Training and Evangelism, Futurice 16. Demo:All LWUIT Examples http://youtu.be/xu0UNJJPdYU16Michael Samarin, Director of Developer Training and Evangelism, Futurice 17. Porting Resources at Nokia DeveloperPorting and Guide for Android Developers: http://www.developer.nokia.com/Develop/Porting17Michael Samarin, Director of Developer Training and Evangelism, Futurice 18. Ranges and DifferencesFeatureAndroid Phone Asha Touch PhoneCPU600+ MHz200-1000 MHzDisplay tech CapacitiveResistive or CapacitiveTouch interactionMulti-point touch Single-touch and Multi-point touchDisplay resolution 240x320 upwards 240x320, 240x400SensorsGPS, Proximity, AccelerationGPS, AccelerationMultitasking Yes NoBackground processingYes NoLow-level API access Yes LimitedUI DefinitionDeclarative or programmatical ProgrammaticalReady-to-use UI components Android UIStandard LCDUI, LWUITBattery life FairExcellentDevelopment platformsWindows, Mac, Linux WindowsIDEs Eclipse Eclipse, NetbeansApplication size limitations 50MB + 4GB2MB + Persistent Storage 19. Memory ConsiderationsOn Series 40 Memory Limitations: Application JAR file size cant exceed 2 MB. Java Heap Size is 2 or 4 MB. Use Nokia Device Matrix for checking:http://www.developer.nokia.com/Devices/Device_specifications/Brings challenging decisions, especially to visually rich games, with many bundled graphical resources.Option: post-download of needed resources and caching in RMS.19Michael Samarin, Director of Developer Training and Evangelism, Futurice 20. Apps particularly favorable for porting includeContent-intensive applications, showing lots of textual content and making use of vertical scrolling.Single-purpose tools utilizing network connectivity: Content aggregators, RSS/News readers; Location-aware applications featuring maps.Various business applications.Casual games (puzzle, 2D arcade), childrens apps (drawing, coloring, touch interaction, soundboards).20 Michael Samarin, Director of Developer Training and Evangelism, Futurice 21. ApplicationPortability and considerationscategoryGames: Arcade, Generally portable. Certain touch interactions might need to be redesigned. Use of images for graphicsAction, Racing,might need to be optimized. Many of these games can also be ported for non-touch devices: also lower-Sports resolution ones, by downscaling the graphics.Games: Brain,Generally portable. As these games are not usually graphically intensive, porting would be mostlyPuzzle, Cards, converting the game logic and adjusting graphics for new resolutions. Depending on the type of theCasual game, a wide range of Series 40 devices can be targeted, including non-touch ones.Books, Comics, Generally portable. Biggest challenge is likely scaling the graphical content. While a wide range ofEducation, devices can be targeted, a particularly sweet spot for these applications would be the full touch devicesNews/Magazines with lots of screen estate.Business, Finance, Generally portable, except for productivity tools related to platform personalisation. These applicationsProductivity can be made to work on a wide variety of screen sizes and input types. Porting is mostly adjusting views and converting the application logic. Also adjusting to non-touch devices is usually possible.Communication, Generally not portable: VoIP, tethering, ringtone and caller ID applications not feasible in Series 40.Social Messenger applications are limited to foreground processing. 22. Application categoryPortability and considerationsEntertainment, Health, Generally portable. Applications can be made to work on a number of screen sizes and non-touchLifestyle, Medical,devices. Most porting work is done with adjusting the UI and converting application logic.Shopping, Sports Background processing is not available to e.g. record GPS location on the background.Media & VideoGenerally not portable. Simple video playback possible, but support varies across devices. See Video Formats in the Developer Wiki.Music & AudioGenerally portable, e.g. streaming music from online, with the exception of lack of background processing. Online streaming services generally work well where good network connetions are available, regardless of the input paradigm used. Porting work is required for application UI and audio streaming code.PhotographyPortable, with reservations: camera accessible via JSR-234, no access to native code might make filters difficult to implement. This category is best viewed on the larger screen sizes, i.e. touch and type and full touch devices.Tools, Widgets, Live Generally not portable: replacements for platform functionalities, virus scanners etc. not relevant inWallpapers,Series 40.Personalisation,Libraries 23. Navigation Logic:Android to AshaTabs, Dashboard,Back 24. Porting Consider Co-Development, instead of classic porting Make clear separation between business logic and UI It is possible to make libs reusable between platforms JARs from Series 40 with platform independent Java codeare reusable directly on Android Understand difference in application life cycle: AndroidActivity vs. Midlet; Android Background Execution vs.Midlet instant kill24 Michael Samarin, Director of Developer Training and Evangelism, Futurice 25. Examples: Tantalum Cross Platform Library http://projects.developer.nokia.com/Tantalum25 Michael Samarin, Director of Developer Training and Evangelism, Futurice 26. Demo:Android porting FrozenBubble26 Michael Samarin, Director of Developer Training and Evangelism, Futurice 27. Series 40 Graphics APIs2D Game Development Game API, part of the MIDP 2.0 standard, java package: javax.microedition.lcdui.game http://www.developer.nokia.com/Resources/Library/Java/#!developers-guides/ui-and-graphics/game-api.html3D Game Development Mobile 3D Graphics API, optional JSR-184 also known as M3G http://www.developer.nokia.com/Resources/Library/Java/#!developers-guides/ui-and-graphics/mobile-3d-graphics.html27Michael Samarin, Director of Developer Training and Evangelism, Futurice 28. Game API Package (MIDP) javax.microedition.lcdui.game GameCanvas Layer LayerManager Sprite TiledLayer 28 Michael Samarin, Director of Developer Training and Evangelism, Futurice 29. GameCanvas Double buffered Convenient for minimizing code of game loop Methods for querying status of keys29Michael Samarin, Director of Developer Training and Evangelism, Futurice 30. Demo: 2D GameBuilder Plugin30Michael Samarin, Director of Developer Training and Evangelism, Futurice 31. Demo: DrumKit Coding31Michael Samarin, Director of Developer Training and Evangelism, Futurice 32. Demo: DrumKit Full Video http://youtu.be/41xQTfNWQeI32 Michael Samarin, Director of Developer Training and Evangelism, Futurice 33. Demo: CarRacing33Michael Samarin, Director of Developer Training and Evangelism, Futurice 34. Object-Oriented 3D Scene Graph based Mobile 3D Graphics API Optional MIDP JSR JSR-184 or M3G Very compact API Very fast development Optimized for small memoryand budget CPU Excellent implementation onSeries 4034 Michael Samarin, Director of Developer Training and Evangelism, Futurice 35. Lightweight API, only 30 classes AnimationControllerIndexBufferRayIntersection AnimationTrack KeyframeSequence SkinnedMesh Appearance LightSprite3D Background Loader Texture2D Camera Material Transform CompositingModeMesh Transformable FogMorphingMesh TriangleStripArray Graphics3D Node VertexArray GroupObject3D VertexBuffer Image2DPolygonModeWorld35 Michael Samarin, Director of Developer Training and Evangelism, Futurice 36. Immediate mode Similar to OpenGL ideology Retained modeModes Scene Graph based Entire Scene Graph can berestored from file Well defined M3G format Can be freely mixed36 Michael Samarin, Director of Developer Training and Evangelism, Futurice 37. Scene Graph BackgroundMesh Group Morphing Mesh WorldSkinned MeshSprite 3D GroupSprite 3D User Object Group CameraLight37Michael Samarin, Director of Developer Training and Evangelism, Futurice 38. Demo: Monkey Face38Michael Samarin, Director of Developer Training and Evangelism, Futurice 39. Demo: 3D Racing and Sensors39Michael Samarin, Director of Developer Training and Evangelism, Futurice 40. Demo: 3D Maze http://youtu.be/6WZcW_tD35U40Michael Samarin, Director of Developer Training and Evangelism, Futurice 41. Demo: All Games http://youtu.be/NHhkFgxKX2g41 Michael Samarin, Director of Developer Training and Evangelism, Futurice 42. Thank you!42 Michael Samarin, Director of Developer Training and Evangelism, Futurice