Top Banner
Series 40 Developer Training Porting from Android to Series 40 Michael Samarin, Ph.D Director, Developer Training Futurice @MichaelSamarin
25

Porting Android apps to the Series 40 platform

Jan 12, 2015

Download

Technology

Nokia Developer

This webinar presentation gives you an overview of how to port various types of Android applications to the Series 40 platform. Join Michael Samarin of Futurice as he walks you through the basic porting tasks involved and shows you how to map Android APIs to corresponding Series 40 APIs. In live coding demonstrations, Michael will use simple hands-on examples to illustrate a step-by-step porting process. This presentation will pay special attention to UI portability and creating a consistent user experience on Series 40 phones.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Porting Android apps to the Series 40 platform

Series 40 Developer Training

Porting from Android to Series 40

Michael Samarin, Ph.D Director, Developer Training Futurice

@MichaelSamarin

Page 2: Porting Android apps to the Series 40 platform

Resources at

Nokia Developer

› This Webinar is compressed summary of the following resources:

› Porting:

› http://www.developer.nokia.com/Develop/Porting

› Guide for Android Developers:

› http://www.developer.nokia.com/Resources/Library/Porting_to_Series_40/#!porting-from-android-to-series-40.html

Page 3: Porting Android apps to the Series 40 platform

General Considerations

Page 4: Porting Android apps to the Series 40 platform

Developer Tools

Android Series 40

Officially supported IDEs Eclipse Eclipse and NetBeans IDE

Emulator Multiple profiles One profile per SDK installation

Emulator debugging Yes Yes

On-device debugging Yes Yes, with On-Device Debugger

Remote Device Access No Yes, through Nokia RDA

Page 5: Porting Android apps to the Series 40 platform

RDA:

Remote Device Access

http://www.developer.nokia.com/Devices/Remote_device_access/

Page 6: Porting Android apps to the Series 40 platform

Ranges and Differences Feature Android Phone Series 40 Touch Phone CPU 600+ MHz 200-1000 MHz Display tech Capacitive Resistive or Capacitive Touch interaction Multi-point touch Single-touch and Multi-point touch

Display resolution 240x320 upwards 240x320, 240x400 Sensors GPS, Proximity, Acceleration GPS, Acceleration Multitasking Yes No Background processing Yes No Low-level API access Yes Limited UI Definition Declarative or programmatical Programmatical Ready-to-use UI components

Android UI Standard LCDUI, LWUIT

Battery life Fair Excellent Development platforms Windows, Mac, Linux Windows IDEs Eclipse Eclipse, Netbeans Application size limitations 50MB + 4GB 2MB + Persistent Storage

Page 8: Porting Android apps to the Series 40 platform

Memory Considerations » On Series 40 Memory Limitations:

› Application JAR file size can’t 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.

Page 9: Porting Android apps to the Series 40 platform

Apps particularly favorable for porting include

» Content-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), children's apps (drawing, coloring, touch interaction, soundboards).

Page 10: Porting Android apps to the Series 40 platform

Application category

Portability and considerations

Games: Arcade, Action, Racing, Sports

Generally portable. Certain touch interactions might need to be redesigned. Use of images for graphics might need to be optimized. Many of these games can also be ported for non-touch devices: also lower-resolution ones, by downscaling the graphics.

Games: Brain, Puzzle, Cards, Casual

Generally portable. As these games are not usually graphically intensive, porting would be mostly converting the game logic and adjusting graphics for new resolutions. Depending on the type of the game, a wide range of Series 40 devices can be targeted, including non-touch ones.

Books, Comics, Education, News/Magazines

Generally portable. Biggest challenge is likely scaling the graphical content. While a wide range of devices can be targeted, a particularly sweet spot for these applications would be the full touch devices with lots of screen estate.

Business, Finance, Productivity

Generally portable, except for productivity tools related to platform personalisation. These applications 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, Social

Generally not portable: VoIP, tethering, ringtone and caller ID applications not feasible in Series 40. Messenger applications are limited to foreground processing.

Page 11: Porting Android apps to the Series 40 platform

Application category Portability and considerations

Entertainment, Health, Lifestyle, Medical, Shopping, Sports

Generally portable. Applications can be made to work on a number of screen sizes and non-touch devices. Most porting work is done with adjusting the UI and converting application logic. Background processing is not available to e.g. record GPS location on the background.

Media & Video Generally not portable. Simple video playback possible, but support varies across devices. See Video Formats in the Developer Wiki.

Music & Audio Generally 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.

Photography Portable, 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 Wallpapers, Personalisation, Libraries

Generally not portable: replacements for platform functionalities, virus scanners etc. not relevant in Series 40.

Page 12: Porting Android apps to the Series 40 platform

UI Considerations

Page 13: Porting Android apps to the Series 40 platform

Overall layouts & interaction in Series 40

Page 14: Porting Android apps to the Series 40 platform

Navigation Logic: Android tab navigation to Series 40

Page 15: Porting Android apps to the Series 40 platform

Navigation Logic: Android Dashboard navigation to

Series 40

Page 16: Porting Android apps to the Series 40 platform

Navigation Logic: Android scrolling tabs navigation to

Series 40

Page 17: Porting Android apps to the Series 40 platform

Back Navigation

Page 18: Porting Android apps to the Series 40 platform

Code Considerations

Page 19: Porting Android apps to the Series 40 platform

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 code are reusable directly on Android

Page 20: Porting Android apps to the Series 40 platform

Application Life Cycle

› Android “Activity” vs. Midlet

› Android Background Execution vs. Midlet instant kill

Page 21: Porting Android apps to the Series 40 platform
Page 22: Porting Android apps to the Series 40 platform

Code samples › http://projects.developer.nokia.com/picasa_viewer

Page 25: Porting Android apps to the Series 40 platform

Thank you!

@MichaelSamarin http://www.futurice.com