SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
Series 40 DeveloperTraining

Porting from BlackBerry
to Series 40

Michael Samarin, Ph.D
Director,
Developer Training
Futurice
@MichaelSamarin
Porting Considerations
» Same development platform Java ME on Series 40 and
  BlackBerry (up to OS 7.1).
» Same Java dialect makes porting easier.
» Midlets based on CLDC 1.1, MIDP 2.0 and common JSRs can be
  packaged to run without changes on both BlackBerry and
  Series 40.
» Canvas based 2D games without BlackBerry platform services
  can be just recompiled for Series 40, of course taking screen
  sizes and graphical assets into consideration.
General Porting Challenges I
» Most BlackBerry “Business” apps are using RIMs
  application framework, built on top of Java ME and
  utilizing platform integration features.
» User interface based on UIApplication frameworks
  must be re-written.
» Developers should recognize the major differences
  between the platforms: BlackBerry devices are full
  smartphones with multitasking capabilities, and Series
  40 devices are feature phones with much more limited
  resources and device capabilities.
General Porting Challenges II
» BlackBerry platform provides deep integration facilities with
  device messaging, telephony and PIM.
» Series 40 provides only JSR-75, FileConnection and PIM API
  which gives access only to file system and contacts/calendar
  entries.
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.
Portability of App Types
 2D Games   Excellent portability, source code-level compatibility. 2D game
            development on BlackBerry and Series 40 uses the same Java ME
            APIs from the javax.microedition.lcdui.game package. For
            devices with similar input types (touch, non-touch) porting would be
            possible by simply recompiling and repackaging. However, the main
            focus for porting will be the optimization of graphical assets to
            smaller screen sizes, adaptation of different touch gestures, and
            adjusting to Series 40 memory requirements.
 3D Games   Generally portable. BlackBerry 3D gaming uses Java interfaces for
            OpenGL ES. Series 40 doesn’t support OpenGL ES but it features an
            excellent implementation of Mobile 3D Graphics (JSR-184 or M3G).
            This JSR is significantly simpler and optimized for low memory
            footprint but it is far from being primitive and it is a real 3D
            rendering engine with a special immediate mode, which is
            ideologically very similar to OpenGL. Similarly as in 2D gaming,
            Series 40 memory requirements impose challenges for textures and
            graphical assets.
Portability of App Types
 Social Networking   Applications with OAuth authentication are not portable as
                     Java apps because the Series 40 platform doesn’t support
                     embeddable web view and the custom Java ME
                     implementation of OAuth appears to be challenging. The
                     Series 40 platform doesn’t support multitasking and
                     background execution, so implementing messaging
                     notifications when the application is not running is not
                     possible. However, if background functionality is not needed
                     and if the social networking app is using custom
                     authentication schemes or private APIs for well-known
                     networks, then it is generally portable. Developers of such
                     apps should consider exploring Nokia Web Apps, where at
                     least the OAuth issue can be resolved.
 SMS, MMS, and       Generally portable. BlackBerry and Series 40 both feature the
 Bluetooth           Wireless Messaging API (JSR-205) and Java APIs for Bluetooth (JSR-
 Messaging           82). Some parts can be compatible on the source code level with the
                     correct level of abstraction from the UI.
Portability of App Types
 Telephony and     Generally not portable. The Series 40 platform doesn’t
 platform          support integration with telephony and other these
 messaging         types of services for 3rd party developers. Applications
 services          for VoIP, Caller ID, Tethering, platform email, and Social
                   Networking apps’ integrations are not feasible on Series
                   40.


 Video, audio, and Generally not portable. The Series 40 platform doesn’t
 image processing provide APIs for media parsing, recompressing, and
                   image processing. It is also related to memory
                   restrictions (2 or 4 MB Java Heap) imposed on 3rd party
                   applications.
Portability of App Types
 Photography and Generally portable with Advanced Multimedia
 camera          Supplements APIs (JSR-234) which is also supported on
                 BlackBerry with source code level compatibility. Image
                 filtering and processing full resolution images is not
                 possible due to memory restrictions.



 News readers,        Generally portable. UI redesign and optimization of
 book readers,        graphical assets is required. The Series 40 platform
 business, finance,   doesn’t support embeddable web view and book /
 comics,              magazine reader apps should implement custom text
 magazines            rendering with LCDUI components or Canvas. Comics
                      and magazine readers should take special precautions
                      regarding memory limitations.
Portability of App Types
 Media playback   Generally portable with Mobile Media API (JSR-135).
 and streaming    Simple audio / video playback and streaming is possible
                  and might be compatible on source code level.
                  Redesign is required for background audio streaming
                  apps, which are not supported on Series 40.



 Maps and         Generally portable with Nokia Maps API for Series 40,
 location         which provides also search, geocoding, reverse
                  geocoding, and routing functionality. Series 40 devices
                  are not equipped with GPS, so Cell ID-based location or
                  an external GPS device with Bluetooth connection is
                  needed.
Most Interesting for porting
                QWERTY Devices




BlackBerry Bold 9900    BlackBerry Curve 9350   Nokia Asha 303          Nokia Asha 302


640 x 480               480 x 360               240 x 320               320 x 240
QWERTY and Capacitive                           QWERTY and Capacitive
                        QWERTY                                          QWERTY
Touch Screen                                    Touch Screen
                        ROM/RAM                 ROM/RAM                 ROM/RAM
ROM/RAM 8GB/768MB,
                        512MB/512MB, 32 GB      256MB/128MB, 32 GB      256MB/128MB, 32 GB
32 GB Micro SD
                        Micro SD                Micro SD                Micro SD
Most Interesting for porting
                       Full Touch Devices




BlackBerry Torch   BlackBerry Torch
                                      Nokia Asha 311        Nokia Asha 305/306    Nokia Asha 308/309
9860               9810


800 x 480          640 x 480          240 x 400             240 x 400             240 x 400
                   QWERTY and         Capacitive Touch      Resistive Touch       Capacitive Touch
Capacitive Touch
                   Capacitive Touch   Screen, Multipoint-   Screen, Multipoint-   Screen, Multipoint-
Screen
                   Screen             touch (5 points)      touch (2 points)      touch
ROM/RAM            ROM/RAM            ROM/RAM               ROM/RAM               ROM/RAM
4GB/768MB, 32 GB   8GB/768MB, 32 GB   256MB/128MB, 32       64MB/32MB, 32 GB      128MB/64MB, 32
Micro SD           Micro SD           GB Micro SD           Micro SD              GB Micro SD
User Interface Porting Options
» A typical BlackBerry application with a standard UI (based on
  net.rim.device.api.ui)

» On Series 40, most standard option is LCDUI, gives platform’s
  Look & Feel, support for device Themes.
» Alternative options is LWUIT library, recently optimized for
  Series 40, full flexible UI with Java Swing-alike architecture.
UI Model Differences
        BlackBerry                                                   Series 40
       UIApplication                                                  LCDUI
        New                    Current         Displayable 1
       Screen                  Screen
                                               Displayable 2                                Current
                                                                           Switch
      Push         Pop                                                                    Displayable
                                               Displayable 3
                Stack                                 …
              Screen 1                         Displayable N
              Screen 2

              Screen 3
                 …
             Screen N                       In LCDUI on Series 40 you can switch between screens
                                            directly. In addition to LCDUI, Nokia provides Series 40-
The screens of a BlackBerry application     specific extensions known as the Nokia UI API. These
(UiApplication) are managed according       APIs enhance MIDP with a functionality related to
to the stack model - you can push your      touch screen gestures, canvas drawing, text editing,
application screens into the stack and      and kinetic scrolling.
the screen on top of the stack is what is
visible to the user.
Simple Common UI Porting Sample
 » Illustration of typical steps
   for porting UIApplication
   based UI.
                                   Main Screen   Detailed Screen
 » Standard UI with master-           Item 1
   detailed screens.                                Item 2
                                      Item 2

 » List component with                Item 3
   several items on main                …
   screen.                            Item N             Back

 » Selected text from
   previous screen on detailed
   screen.
UI Differences - BlackBerry: Main Application Class
  import net.rim.device.api.ui.UiApplication;

  public class App extends UiApplication
  {
    public static void main(String[] args)
    {
       App theApp = new App();
       theApp.enterEventDispatcher();
    }

      public App()
      {
         pushScreen(new AppMainScreen());
      }
  }




  In the main method we instantiate App class and by using UiApplication
  method pushScreen() in the constructor of the application class, we
  create and display main applications screen represented by
  AppMainScreen class.
UI Differences - BlackBerry: Main Screen Class
import    net.rim.device.api.command.Command;                                                     Both application screens
import    net.rim.device.api.command.CommandHandler;
import    net.rim.device.api.command.ReadOnlyCommandMetadata;
                                                                                                  AppMainScreen and SimpleScreen are
import    net.rim.device.api.ui.UiApplication;                                                    extending MainScreen class which is
import    net.rim.device.api.ui.component.table.SimpleList;                                       commonly used screen container that
import    net.rim.device.api.ui.container.MainScreen;
                                                                                                  inherits all default behavior of the
public final class AppMainScreen extends MainScreen                                               standard BlackBerry application
{                                                                                                 screens. Main screen displays list
   private SimpleList listField;
   private SimpleScreen simpleScreen;
                                                                                                  component based on SimpleList class.
                                                                                                  Adding list component to the screen
    public AppMainScreen() {                                                                      and filling it up with items is
       super( MainScreen.NO_VERTICAL_SCROLL);
       setTitle("Simple List Demo");
                                                                                                  straightforward operation. One
                                                                                                  interesting aspect of working with list
         listField = new SimpleList(getMainManager());                                            components is tracking selection of
         listField.add("Helsinki");
         listField.add("Tampere");
                                                                                                  item. Since there is wide variety of
         listField.add("London");                                                                 BlackBerry devices with touch and
         listField.add("Paris");                                                                  keyboard based input, traditional
         listField.add("Berlin");
                                                                                                  approach is to use both explicit
         listField.setCommand(new Command(new CommandHandler(){                                   mechanisms for tracking events.
                                                                                                  However, the most effective way
            public void execute(ReadOnlyCommandMetadata metadata, Object context)
            {
                                                                                                  which at the same time significantly
                showSimpleScreen((String)listField.getModel().getRow(listField.getFocusRow()));   minimizes code usage is to use
            }                                                                                     Command class with dedicated
          }));
                                                                                                  command handler, like in the example
     }                                                                                            above.
     private void showSimpleScreen(String message){
       if (simpleScreen == null){
                                                                                                  Once it’s been detected, that user
          simpleScreen = new SimpleScreen();                                                      selected item, method
       }                                                                                          showSimpleScreen is called with string
       simpleScreen.setText(message);
       UiApplication.getUiApplication().pushScreen(simpleScreen);
                                                                                                  content of the selection. At this point,
     }                                                                                            there is a need for making check if our
}                                                                                                 next screen class has been already
                                                                                                  created, passing string argument and
                                                                                                  pushing screen to the visible UI stack.
UI Differences - BlackBerry: Detailed Screen Class
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.container.MainScreen;

public class SimpleScreen extends MainScreen {

    LabelField labelField;

    public SimpleScreen() {
      super(MainScreen.VERTICAL_SCROLL | MainScreen.VERTICAL_SCROLLBAR);

        setTitle("Simple Screen");
        labelField = new LabelField("Some text", LabelField.FIELD_HCENTER |LabelField.FIELD_VCENTER);
        add(labelField);
    }

    public void setText(String text){
      labelField.setText(text);
    }
}




Actual code for making detailed screen is simple and features only custom method for providing text content for
the label component.
UI Differences - BlackBerry: Resulting Screens
UI Differences – Series 40: Complete Application Class
import   javax.microedition.lcdui.Command;                        public void startApp() {
import   javax.microedition.lcdui.CommandListener;                  display.setCurrent(simpleList);
import   javax.microedition.lcdui.Display;                        }
import   javax.microedition.lcdui.Displayable;
import   javax.microedition.lcdui.Form;                           public void pauseApp() {
import   javax.microedition.lcdui.List;                           }
import   javax.microedition.lcdui.StringItem;
import   javax.microedition.midlet.*;                             public void destroyApp(boolean unconditional) {
                                                                  }
public class SimpleListDemo extends MIDlet
                   implements CommandListener {                   public void commandAction(Command c, Displayable d) {

private Display display;                                               if (c == List.SELECT_COMMAND) {
private List simpleList;
private Form simpleScreen;                                                 stringItem.setText(simpleList.getString(
private StringItem stringItem;                                                        simpleList.getSelectedIndex()));
private static final Command CMD_EXIT =                                    display.setCurrent(simpleScreen);
   new Command("Exit", Command.EXIT, 1);                               }
private static final Command CMD_BACK =
   new Command("Back", Command.BACK, 1);                               if (c == CMD_EXIT) {
                                                                         destroyApp(false);
public SimpleListDemo(){                                                 notifyDestroyed();
  display = Display.getDisplay(this);                                   }

    simpleList = new List("Simple List Demo", List.IMPLICIT);              if (c == CMD_BACK) {
    simpleList.append("Helsinki", null);                                     display.setCurrent(simpleList);
    simpleList.append("Tampere", null);                                    }
    simpleList.append("London", null);
    simpleList.append("Paris", null);                              }
    simpleList.append("Berlin", null);                            }
    simpleList.addCommand(CMD_EXIT);
    simpleList.setCommandListener(this);

    simpleScreen = new Form("Simple Screen");
                                                                  In order to track selection and navigation events in
    simpleScreen.setCommandListener(this);                        standard LCDUI components, mechanism of Commands is
    stringItem = new StringItem("Selected item:", "Some text");
    simpleScreen.append(stringItem);
                                                                  used. Midlet implements CommandListener interface and
    simpleScreen.addCommand(CMD_BACK);                            selection logic is implemented in commandAction
}
                                                                  method. LCDUI doesn’t maintain stack concept of
                                                                  screens, developer can just directly to switch between
                                                                  displayable components
UI Differences – Series 40: Resulting Screens
Live Demo Session
BlackBerry SimpleList
»   If you are watching these slides on SlideShare, next part is live coding
    demonstration. Full recording of the live session can be found at Nokia
    Developer website:

»   http://www.developer.nokia.com/Resources/Multimedia/Webinars.xhtml
Live Demo Session
Series 40 SimpleList
»   If you are watching these slides on SlideShare, next part is live coding
    demonstration. Full recording of the live session can be found at Nokia
    Developer website:

»   http://www.developer.nokia.com/Resources/Multimedia/Webinars.xhtml
Live Demo Session
BlackBerry SimpleListMap
»   If you are watching these slides on SlideShare, next part is live coding
    demonstration. Full recording of the live session can be found at Nokia
    Developer website:

»   http://www.developer.nokia.com/Resources/Multimedia/Webinars.xhtml
Live Demo Session
Series 40 SimpleListMap
»   If you are watching these slides on SlideShare, next part is live coding
    demonstration. Full recording of the live session can be found at Nokia
    Developer website:

»   http://www.developer.nokia.com/Resources/Multimedia/Webinars.xhtml
Live Demo Session
BlackBerry / Series 40 Midlet
»   If you are watching these slides on SlideShare, next part is live coding
    demonstration. Full recording of the live session can be found at Nokia
    Developer website:

»   http://www.developer.nokia.com/Resources/Multimedia/Webinars.xhtml
Thank you!



  @MichaelSamarin
http://www.futurice.com

Weitere ähnliche Inhalte

Was ist angesagt?

microsoft windows phone for government and citizens
microsoft  windows phone for government and citizensmicrosoft  windows phone for government and citizens
microsoft windows phone for government and citizensjoelcitizen
 
Symbian mobile operating system seminar report
Symbian mobile operating system seminar reportSymbian mobile operating system seminar report
Symbian mobile operating system seminar reportDevesh Singh
 
Pariksha mobile applications
Pariksha mobile applicationsPariksha mobile applications
Pariksha mobile applicationsparikshalabs.com
 
Symbian OS Overview
Symbian OS OverviewSymbian OS Overview
Symbian OS OverviewAndreas Jakl
 
Symbian OS - GUI Architectures
Symbian OS - GUI ArchitecturesSymbian OS - GUI Architectures
Symbian OS - GUI ArchitecturesAndreas Jakl
 
Android os(comparison all other mobile os)
Android os(comparison all other mobile os)Android os(comparison all other mobile os)
Android os(comparison all other mobile os)DivyaKS12
 
Symbian Operating system
Symbian Operating systemSymbian Operating system
Symbian Operating systemPravin Shinde
 
Cross platform solutions for Mobile App Development
Cross platform solutions for Mobile App Development Cross platform solutions for Mobile App Development
Cross platform solutions for Mobile App Development USAID CEED II Project Moldova
 
Nokia Developer Offering Series 40
Nokia Developer Offering Series 40Nokia Developer Offering Series 40
Nokia Developer Offering Series 40Mohamad Iqbal
 
Symbian Os Introduction
Symbian Os IntroductionSymbian Os Introduction
Symbian Os IntroductionDeepak Rathi
 
Class-based design for mobile development
Class-based design for mobile developmentClass-based design for mobile development
Class-based design for mobile developmentBarbara Ballard
 
Application development for mobile phones
Application development for mobile phonesApplication development for mobile phones
Application development for mobile phonesSanjeev Kumar Jaiswal
 
600.250 UI Cross Platform Development and the Android Security Model
600.250 UI Cross Platform Development and the Android Security Model600.250 UI Cross Platform Development and the Android Security Model
600.250 UI Cross Platform Development and the Android Security ModelMichael Rushanan
 
실전 윈도우폰 망고 앱 디자인 & 개발 III(최종)
실전 윈도우폰 망고 앱 디자인 & 개발 III(최종)실전 윈도우폰 망고 앱 디자인 & 개발 III(최종)
실전 윈도우폰 망고 앱 디자인 & 개발 III(최종)mosaicnet
 

Was ist angesagt? (20)

microsoft windows phone for government and citizens
microsoft  windows phone for government and citizensmicrosoft  windows phone for government and citizens
microsoft windows phone for government and citizens
 
Symbian mobile operating system seminar report
Symbian mobile operating system seminar reportSymbian mobile operating system seminar report
Symbian mobile operating system seminar report
 
Pariksha mobile applications
Pariksha mobile applicationsPariksha mobile applications
Pariksha mobile applications
 
Flex User Group breton
Flex User Group bretonFlex User Group breton
Flex User Group breton
 
Symbian OS Overview
Symbian OS OverviewSymbian OS Overview
Symbian OS Overview
 
Symbian OS - GUI Architectures
Symbian OS - GUI ArchitecturesSymbian OS - GUI Architectures
Symbian OS - GUI Architectures
 
Symbian OS
Symbian OSSymbian OS
Symbian OS
 
Android os(comparison all other mobile os)
Android os(comparison all other mobile os)Android os(comparison all other mobile os)
Android os(comparison all other mobile os)
 
Ovi store ppt_serbia
Ovi store ppt_serbiaOvi store ppt_serbia
Ovi store ppt_serbia
 
Symbian Operating system
Symbian Operating systemSymbian Operating system
Symbian Operating system
 
Cross platform solutions for Mobile App Development
Cross platform solutions for Mobile App Development Cross platform solutions for Mobile App Development
Cross platform solutions for Mobile App Development
 
Nokia Developer Offering Series 40
Nokia Developer Offering Series 40Nokia Developer Offering Series 40
Nokia Developer Offering Series 40
 
Symbian Os Introduction
Symbian Os IntroductionSymbian Os Introduction
Symbian Os Introduction
 
Aks mob dev_portfolio_v3b
Aks mob dev_portfolio_v3bAks mob dev_portfolio_v3b
Aks mob dev_portfolio_v3b
 
Class-based design for mobile development
Class-based design for mobile developmentClass-based design for mobile development
Class-based design for mobile development
 
Application development for mobile phones
Application development for mobile phonesApplication development for mobile phones
Application development for mobile phones
 
Razum
RazumRazum
Razum
 
Java me introduction
Java me   introductionJava me   introduction
Java me introduction
 
600.250 UI Cross Platform Development and the Android Security Model
600.250 UI Cross Platform Development and the Android Security Model600.250 UI Cross Platform Development and the Android Security Model
600.250 UI Cross Platform Development and the Android Security Model
 
실전 윈도우폰 망고 앱 디자인 & 개발 III(최종)
실전 윈도우폰 망고 앱 디자인 & 개발 III(최종)실전 윈도우폰 망고 앱 디자인 & 개발 III(최종)
실전 윈도우폰 망고 앱 디자인 & 개발 III(최종)
 

Ähnlich wie Porting BlackBerry apps to the Series 40 platform

S60 Web Runtime - Web2.0 Expo Europe 2008
S60 Web Runtime - Web2.0 Expo Europe 2008S60 Web Runtime - Web2.0 Expo Europe 2008
S60 Web Runtime - Web2.0 Expo Europe 2008petrosoininen
 
The More Capable Series 40 Java Platform
The More Capable Series 40 Java PlatformThe More Capable Series 40 Java Platform
The More Capable Series 40 Java PlatformGorkem Ercan
 
Qt For Maemo - getting to the fast-lane (v2)
Qt For Maemo - getting to the fast-lane (v2)Qt For Maemo - getting to the fast-lane (v2)
Qt For Maemo - getting to the fast-lane (v2)Nokia
 
Max2006 Flash Lite Development For S40 Devices
Max2006 Flash Lite Development For S40 DevicesMax2006 Flash Lite Development For S40 Devices
Max2006 Flash Lite Development For S40 Devicesguestd82c1e
 
Forum Nokia Dev. Camp - WRT training Paris_17&18 Nov.
Forum Nokia Dev. Camp - WRT training Paris_17&18 Nov.Forum Nokia Dev. Camp - WRT training Paris_17&18 Nov.
Forum Nokia Dev. Camp - WRT training Paris_17&18 Nov.DALEZ
 
Symbian Based Mobile Software Development
Symbian Based Mobile Software DevelopmentSymbian Based Mobile Software Development
Symbian Based Mobile Software Developmenttoteb5
 
Mobile Augmented Reality Development tools
Mobile Augmented Reality Development toolsMobile Augmented Reality Development tools
Mobile Augmented Reality Development toolsThiwanka Makumburage
 
Google Android Naver 1212
Google Android Naver 1212Google Android Naver 1212
Google Android Naver 1212Yoojoo Jang
 
City search documentation
City search documentationCity search documentation
City search documentationRajesh Varanasi
 
IRJET- Smart Mirror using Voice Interface
IRJET- Smart Mirror using Voice InterfaceIRJET- Smart Mirror using Voice Interface
IRJET- Smart Mirror using Voice InterfaceIRJET Journal
 
01 Symbianosbasics Introducao
01 Symbianosbasics Introducao01 Symbianosbasics Introducao
01 Symbianosbasics IntroducaoTiago Romão
 
Scopia Infrastructure Guide
Scopia Infrastructure GuideScopia Infrastructure Guide
Scopia Infrastructure GuideMotty Ben Atia
 
BEF2013 - Toronto - Dev Track 2 - Migrating Apps to BlackBerry 10
BEF2013 - Toronto - Dev Track 2 - Migrating Apps to BlackBerry 10BEF2013 - Toronto - Dev Track 2 - Migrating Apps to BlackBerry 10
BEF2013 - Toronto - Dev Track 2 - Migrating Apps to BlackBerry 10psiborg
 
Meego Italian Day 2011 – Andrea Grandi
Meego Italian Day 2011 – Andrea GrandiMeego Italian Day 2011 – Andrea Grandi
Meego Italian Day 2011 – Andrea GrandiFrancesco Baldassarri
 
B feigin mobileapplicationdevelopment
B feigin mobileapplicationdevelopmentB feigin mobileapplicationdevelopment
B feigin mobileapplicationdevelopmentsathesh leo
 
Mobile Application Development
Mobile Application DevelopmentMobile Application Development
Mobile Application Developmentsoufyan rifai
 

Ähnlich wie Porting BlackBerry apps to the Series 40 platform (20)

S60 Web Runtime - Web2.0 Expo Europe 2008
S60 Web Runtime - Web2.0 Expo Europe 2008S60 Web Runtime - Web2.0 Expo Europe 2008
S60 Web Runtime - Web2.0 Expo Europe 2008
 
The More Capable Series 40 Java Platform
The More Capable Series 40 Java PlatformThe More Capable Series 40 Java Platform
The More Capable Series 40 Java Platform
 
Qt For Maemo - getting to the fast-lane (v2)
Qt For Maemo - getting to the fast-lane (v2)Qt For Maemo - getting to the fast-lane (v2)
Qt For Maemo - getting to the fast-lane (v2)
 
Symbian OS
Symbian  OS Symbian  OS
Symbian OS
 
Max2006 Flash Lite Development For S40 Devices
Max2006 Flash Lite Development For S40 DevicesMax2006 Flash Lite Development For S40 Devices
Max2006 Flash Lite Development For S40 Devices
 
MultiTouch
MultiTouchMultiTouch
MultiTouch
 
Forum Nokia Dev. Camp - WRT training Paris_17&18 Nov.
Forum Nokia Dev. Camp - WRT training Paris_17&18 Nov.Forum Nokia Dev. Camp - WRT training Paris_17&18 Nov.
Forum Nokia Dev. Camp - WRT training Paris_17&18 Nov.
 
Symbian Based Mobile Software Development
Symbian Based Mobile Software DevelopmentSymbian Based Mobile Software Development
Symbian Based Mobile Software Development
 
Mobile Augmented Reality Development tools
Mobile Augmented Reality Development toolsMobile Augmented Reality Development tools
Mobile Augmented Reality Development tools
 
Google Android Naver 1212
Google Android Naver 1212Google Android Naver 1212
Google Android Naver 1212
 
City search documentation
City search documentationCity search documentation
City search documentation
 
IRJET- Smart Mirror using Voice Interface
IRJET- Smart Mirror using Voice InterfaceIRJET- Smart Mirror using Voice Interface
IRJET- Smart Mirror using Voice Interface
 
01 Symbianosbasics Introducao
01 Symbianosbasics Introducao01 Symbianosbasics Introducao
01 Symbianosbasics Introducao
 
Scopia Infrastructure Guide
Scopia Infrastructure GuideScopia Infrastructure Guide
Scopia Infrastructure Guide
 
Adobe Flash and Device Central
Adobe Flash and Device CentralAdobe Flash and Device Central
Adobe Flash and Device Central
 
BEF2013 - Toronto - Dev Track 2 - Migrating Apps to BlackBerry 10
BEF2013 - Toronto - Dev Track 2 - Migrating Apps to BlackBerry 10BEF2013 - Toronto - Dev Track 2 - Migrating Apps to BlackBerry 10
BEF2013 - Toronto - Dev Track 2 - Migrating Apps to BlackBerry 10
 
Meego Italian Day 2011 – Andrea Grandi
Meego Italian Day 2011 – Andrea GrandiMeego Italian Day 2011 – Andrea Grandi
Meego Italian Day 2011 – Andrea Grandi
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
B feigin mobileapplicationdevelopment
B feigin mobileapplicationdevelopmentB feigin mobileapplicationdevelopment
B feigin mobileapplicationdevelopment
 
Mobile Application Development
Mobile Application DevelopmentMobile Application Development
Mobile Application Development
 

Mehr von Microsoft Mobile Developer

Intro to Nokia X software platform 2.0 and tools
Intro to Nokia X software platform 2.0 and toolsIntro to Nokia X software platform 2.0 and tools
Intro to Nokia X software platform 2.0 and toolsMicrosoft Mobile Developer
 
Location based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagLocation based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagMicrosoft Mobile Developer
 
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultationsLumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultationsMicrosoft Mobile Developer
 
Windows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra appWindows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra appMicrosoft Mobile Developer
 
La pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo storeLa pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo storeMicrosoft Mobile Developer
 
Il pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progettoIl pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progettoMicrosoft Mobile Developer
 

Mehr von Microsoft Mobile Developer (20)

Intro to Nokia X software platform 2.0 and tools
Intro to Nokia X software platform 2.0 and toolsIntro to Nokia X software platform 2.0 and tools
Intro to Nokia X software platform 2.0 and tools
 
Lumia App Labs: Lumia SensorCore SDK beta
Lumia App Labs: Lumia SensorCore SDK betaLumia App Labs: Lumia SensorCore SDK beta
Lumia App Labs: Lumia SensorCore SDK beta
 
Nokia Asha from idea to app - Imaging
Nokia Asha from idea to app - ImagingNokia Asha from idea to app - Imaging
Nokia Asha from idea to app - Imaging
 
Healthcare apps for Nokia X and Nokia Asha
Healthcare apps for Nokia X and Nokia AshaHealthcare apps for Nokia X and Nokia Asha
Healthcare apps for Nokia X and Nokia Asha
 
Push notifications on Nokia X
Push notifications on Nokia XPush notifications on Nokia X
Push notifications on Nokia X
 
DIY Nokia Asha app usability studies
DIY Nokia Asha app usability studiesDIY Nokia Asha app usability studies
DIY Nokia Asha app usability studies
 
Lessons learned from Nokia X UI reviews
Lessons learned from Nokia X UI reviewsLessons learned from Nokia X UI reviews
Lessons learned from Nokia X UI reviews
 
Location based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagLocation based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tag
 
HERE Maps for the Nokia X platform
HERE Maps for the Nokia X platformHERE Maps for the Nokia X platform
HERE Maps for the Nokia X platform
 
Nokia In-App Payment - UX considerations
Nokia In-App Payment - UX considerationsNokia In-App Payment - UX considerations
Nokia In-App Payment - UX considerations
 
Introduction to Nokia Asha SDK 1.2 (beta)
Introduction to Nokia Asha SDK 1.2 (beta)Introduction to Nokia Asha SDK 1.2 (beta)
Introduction to Nokia Asha SDK 1.2 (beta)
 
UX considerations when porting to Nokia X
UX considerations when porting to Nokia XUX considerations when porting to Nokia X
UX considerations when porting to Nokia X
 
Kids' games and educational app design
Kids' games and educational app designKids' games and educational app design
Kids' games and educational app design
 
Nokia X: opportunities for developers
Nokia X: opportunities for developersNokia X: opportunities for developers
Nokia X: opportunities for developers
 
Lumia App Labs: Nokia Imaging SDK 1.1
Lumia App Labs: Nokia Imaging SDK 1.1Lumia App Labs: Nokia Imaging SDK 1.1
Lumia App Labs: Nokia Imaging SDK 1.1
 
Intro to Nokia X software platform and tools
Intro to Nokia X software platform and toolsIntro to Nokia X software platform and tools
Intro to Nokia X software platform and tools
 
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultationsLumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultations
 
Windows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra appWindows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra app
 
La pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo storeLa pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo store
 
Il pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progettoIl pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progetto
 

Porting BlackBerry apps to the Series 40 platform

  • 1. Series 40 DeveloperTraining Porting from BlackBerry to Series 40 Michael Samarin, Ph.D Director, Developer Training Futurice @MichaelSamarin
  • 2. Porting Considerations » Same development platform Java ME on Series 40 and BlackBerry (up to OS 7.1). » Same Java dialect makes porting easier. » Midlets based on CLDC 1.1, MIDP 2.0 and common JSRs can be packaged to run without changes on both BlackBerry and Series 40. » Canvas based 2D games without BlackBerry platform services can be just recompiled for Series 40, of course taking screen sizes and graphical assets into consideration.
  • 3. General Porting Challenges I » Most BlackBerry “Business” apps are using RIMs application framework, built on top of Java ME and utilizing platform integration features. » User interface based on UIApplication frameworks must be re-written. » Developers should recognize the major differences between the platforms: BlackBerry devices are full smartphones with multitasking capabilities, and Series 40 devices are feature phones with much more limited resources and device capabilities.
  • 4. General Porting Challenges II » BlackBerry platform provides deep integration facilities with device messaging, telephony and PIM. » Series 40 provides only JSR-75, FileConnection and PIM API which gives access only to file system and contacts/calendar entries.
  • 5. 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.
  • 6. Portability of App Types 2D Games Excellent portability, source code-level compatibility. 2D game development on BlackBerry and Series 40 uses the same Java ME APIs from the javax.microedition.lcdui.game package. For devices with similar input types (touch, non-touch) porting would be possible by simply recompiling and repackaging. However, the main focus for porting will be the optimization of graphical assets to smaller screen sizes, adaptation of different touch gestures, and adjusting to Series 40 memory requirements. 3D Games Generally portable. BlackBerry 3D gaming uses Java interfaces for OpenGL ES. Series 40 doesn’t support OpenGL ES but it features an excellent implementation of Mobile 3D Graphics (JSR-184 or M3G). This JSR is significantly simpler and optimized for low memory footprint but it is far from being primitive and it is a real 3D rendering engine with a special immediate mode, which is ideologically very similar to OpenGL. Similarly as in 2D gaming, Series 40 memory requirements impose challenges for textures and graphical assets.
  • 7. Portability of App Types Social Networking Applications with OAuth authentication are not portable as Java apps because the Series 40 platform doesn’t support embeddable web view and the custom Java ME implementation of OAuth appears to be challenging. The Series 40 platform doesn’t support multitasking and background execution, so implementing messaging notifications when the application is not running is not possible. However, if background functionality is not needed and if the social networking app is using custom authentication schemes or private APIs for well-known networks, then it is generally portable. Developers of such apps should consider exploring Nokia Web Apps, where at least the OAuth issue can be resolved. SMS, MMS, and Generally portable. BlackBerry and Series 40 both feature the Bluetooth Wireless Messaging API (JSR-205) and Java APIs for Bluetooth (JSR- Messaging 82). Some parts can be compatible on the source code level with the correct level of abstraction from the UI.
  • 8. Portability of App Types Telephony and Generally not portable. The Series 40 platform doesn’t platform support integration with telephony and other these messaging types of services for 3rd party developers. Applications services for VoIP, Caller ID, Tethering, platform email, and Social Networking apps’ integrations are not feasible on Series 40. Video, audio, and Generally not portable. The Series 40 platform doesn’t image processing provide APIs for media parsing, recompressing, and image processing. It is also related to memory restrictions (2 or 4 MB Java Heap) imposed on 3rd party applications.
  • 9. Portability of App Types Photography and Generally portable with Advanced Multimedia camera Supplements APIs (JSR-234) which is also supported on BlackBerry with source code level compatibility. Image filtering and processing full resolution images is not possible due to memory restrictions. News readers, Generally portable. UI redesign and optimization of book readers, graphical assets is required. The Series 40 platform business, finance, doesn’t support embeddable web view and book / comics, magazine reader apps should implement custom text magazines rendering with LCDUI components or Canvas. Comics and magazine readers should take special precautions regarding memory limitations.
  • 10. Portability of App Types Media playback Generally portable with Mobile Media API (JSR-135). and streaming Simple audio / video playback and streaming is possible and might be compatible on source code level. Redesign is required for background audio streaming apps, which are not supported on Series 40. Maps and Generally portable with Nokia Maps API for Series 40, location which provides also search, geocoding, reverse geocoding, and routing functionality. Series 40 devices are not equipped with GPS, so Cell ID-based location or an external GPS device with Bluetooth connection is needed.
  • 11. Most Interesting for porting QWERTY Devices BlackBerry Bold 9900 BlackBerry Curve 9350 Nokia Asha 303 Nokia Asha 302 640 x 480 480 x 360 240 x 320 320 x 240 QWERTY and Capacitive QWERTY and Capacitive QWERTY QWERTY Touch Screen Touch Screen ROM/RAM ROM/RAM ROM/RAM ROM/RAM 8GB/768MB, 512MB/512MB, 32 GB 256MB/128MB, 32 GB 256MB/128MB, 32 GB 32 GB Micro SD Micro SD Micro SD Micro SD
  • 12. Most Interesting for porting Full Touch Devices BlackBerry Torch BlackBerry Torch Nokia Asha 311 Nokia Asha 305/306 Nokia Asha 308/309 9860 9810 800 x 480 640 x 480 240 x 400 240 x 400 240 x 400 QWERTY and Capacitive Touch Resistive Touch Capacitive Touch Capacitive Touch Capacitive Touch Screen, Multipoint- Screen, Multipoint- Screen, Multipoint- Screen Screen touch (5 points) touch (2 points) touch ROM/RAM ROM/RAM ROM/RAM ROM/RAM ROM/RAM 4GB/768MB, 32 GB 8GB/768MB, 32 GB 256MB/128MB, 32 64MB/32MB, 32 GB 128MB/64MB, 32 Micro SD Micro SD GB Micro SD Micro SD GB Micro SD
  • 13. User Interface Porting Options » A typical BlackBerry application with a standard UI (based on net.rim.device.api.ui) » On Series 40, most standard option is LCDUI, gives platform’s Look & Feel, support for device Themes. » Alternative options is LWUIT library, recently optimized for Series 40, full flexible UI with Java Swing-alike architecture.
  • 14. UI Model Differences BlackBerry Series 40 UIApplication LCDUI New Current Displayable 1 Screen Screen Displayable 2 Current Switch Push Pop Displayable Displayable 3 Stack … Screen 1 Displayable N Screen 2 Screen 3 … Screen N In LCDUI on Series 40 you can switch between screens directly. In addition to LCDUI, Nokia provides Series 40- The screens of a BlackBerry application specific extensions known as the Nokia UI API. These (UiApplication) are managed according APIs enhance MIDP with a functionality related to to the stack model - you can push your touch screen gestures, canvas drawing, text editing, application screens into the stack and and kinetic scrolling. the screen on top of the stack is what is visible to the user.
  • 15. Simple Common UI Porting Sample » Illustration of typical steps for porting UIApplication based UI. Main Screen Detailed Screen » Standard UI with master- Item 1 detailed screens. Item 2 Item 2 » List component with Item 3 several items on main … screen. Item N Back » Selected text from previous screen on detailed screen.
  • 16. UI Differences - BlackBerry: Main Application Class import net.rim.device.api.ui.UiApplication; public class App extends UiApplication { public static void main(String[] args) { App theApp = new App(); theApp.enterEventDispatcher(); } public App() { pushScreen(new AppMainScreen()); } } In the main method we instantiate App class and by using UiApplication method pushScreen() in the constructor of the application class, we create and display main applications screen represented by AppMainScreen class.
  • 17. UI Differences - BlackBerry: Main Screen Class import net.rim.device.api.command.Command; Both application screens import net.rim.device.api.command.CommandHandler; import net.rim.device.api.command.ReadOnlyCommandMetadata; AppMainScreen and SimpleScreen are import net.rim.device.api.ui.UiApplication; extending MainScreen class which is import net.rim.device.api.ui.component.table.SimpleList; commonly used screen container that import net.rim.device.api.ui.container.MainScreen; inherits all default behavior of the public final class AppMainScreen extends MainScreen standard BlackBerry application { screens. Main screen displays list private SimpleList listField; private SimpleScreen simpleScreen; component based on SimpleList class. Adding list component to the screen public AppMainScreen() { and filling it up with items is super( MainScreen.NO_VERTICAL_SCROLL); setTitle("Simple List Demo"); straightforward operation. One interesting aspect of working with list listField = new SimpleList(getMainManager()); components is tracking selection of listField.add("Helsinki"); listField.add("Tampere"); item. Since there is wide variety of listField.add("London"); BlackBerry devices with touch and listField.add("Paris"); keyboard based input, traditional listField.add("Berlin"); approach is to use both explicit listField.setCommand(new Command(new CommandHandler(){ mechanisms for tracking events. However, the most effective way public void execute(ReadOnlyCommandMetadata metadata, Object context) { which at the same time significantly showSimpleScreen((String)listField.getModel().getRow(listField.getFocusRow())); minimizes code usage is to use } Command class with dedicated })); command handler, like in the example } above. private void showSimpleScreen(String message){ if (simpleScreen == null){ Once it’s been detected, that user simpleScreen = new SimpleScreen(); selected item, method } showSimpleScreen is called with string simpleScreen.setText(message); UiApplication.getUiApplication().pushScreen(simpleScreen); content of the selection. At this point, } there is a need for making check if our } next screen class has been already created, passing string argument and pushing screen to the visible UI stack.
  • 18. UI Differences - BlackBerry: Detailed Screen Class import net.rim.device.api.ui.component.LabelField; import net.rim.device.api.ui.container.MainScreen; public class SimpleScreen extends MainScreen { LabelField labelField; public SimpleScreen() { super(MainScreen.VERTICAL_SCROLL | MainScreen.VERTICAL_SCROLLBAR); setTitle("Simple Screen"); labelField = new LabelField("Some text", LabelField.FIELD_HCENTER |LabelField.FIELD_VCENTER); add(labelField); } public void setText(String text){ labelField.setText(text); } } Actual code for making detailed screen is simple and features only custom method for providing text content for the label component.
  • 19. UI Differences - BlackBerry: Resulting Screens
  • 20. UI Differences – Series 40: Complete Application Class import javax.microedition.lcdui.Command; public void startApp() { import javax.microedition.lcdui.CommandListener; display.setCurrent(simpleList); import javax.microedition.lcdui.Display; } import javax.microedition.lcdui.Displayable; import javax.microedition.lcdui.Form; public void pauseApp() { import javax.microedition.lcdui.List; } import javax.microedition.lcdui.StringItem; import javax.microedition.midlet.*; public void destroyApp(boolean unconditional) { } public class SimpleListDemo extends MIDlet implements CommandListener { public void commandAction(Command c, Displayable d) { private Display display; if (c == List.SELECT_COMMAND) { private List simpleList; private Form simpleScreen; stringItem.setText(simpleList.getString( private StringItem stringItem; simpleList.getSelectedIndex())); private static final Command CMD_EXIT = display.setCurrent(simpleScreen); new Command("Exit", Command.EXIT, 1); } private static final Command CMD_BACK = new Command("Back", Command.BACK, 1); if (c == CMD_EXIT) { destroyApp(false); public SimpleListDemo(){ notifyDestroyed(); display = Display.getDisplay(this); } simpleList = new List("Simple List Demo", List.IMPLICIT); if (c == CMD_BACK) { simpleList.append("Helsinki", null); display.setCurrent(simpleList); simpleList.append("Tampere", null); } simpleList.append("London", null); simpleList.append("Paris", null); } simpleList.append("Berlin", null); } simpleList.addCommand(CMD_EXIT); simpleList.setCommandListener(this); simpleScreen = new Form("Simple Screen"); In order to track selection and navigation events in simpleScreen.setCommandListener(this); standard LCDUI components, mechanism of Commands is stringItem = new StringItem("Selected item:", "Some text"); simpleScreen.append(stringItem); used. Midlet implements CommandListener interface and simpleScreen.addCommand(CMD_BACK); selection logic is implemented in commandAction } method. LCDUI doesn’t maintain stack concept of screens, developer can just directly to switch between displayable components
  • 21. UI Differences – Series 40: Resulting Screens
  • 22. Live Demo Session BlackBerry SimpleList » If you are watching these slides on SlideShare, next part is live coding demonstration. Full recording of the live session can be found at Nokia Developer website: » http://www.developer.nokia.com/Resources/Multimedia/Webinars.xhtml
  • 23. Live Demo Session Series 40 SimpleList » If you are watching these slides on SlideShare, next part is live coding demonstration. Full recording of the live session can be found at Nokia Developer website: » http://www.developer.nokia.com/Resources/Multimedia/Webinars.xhtml
  • 24. Live Demo Session BlackBerry SimpleListMap » If you are watching these slides on SlideShare, next part is live coding demonstration. Full recording of the live session can be found at Nokia Developer website: » http://www.developer.nokia.com/Resources/Multimedia/Webinars.xhtml
  • 25. Live Demo Session Series 40 SimpleListMap » If you are watching these slides on SlideShare, next part is live coding demonstration. Full recording of the live session can be found at Nokia Developer website: » http://www.developer.nokia.com/Resources/Multimedia/Webinars.xhtml
  • 26. Live Demo Session BlackBerry / Series 40 Midlet » If you are watching these slides on SlideShare, next part is live coding demonstration. Full recording of the live session can be found at Nokia Developer website: » http://www.developer.nokia.com/Resources/Multimedia/Webinars.xhtml
  • 27. Thank you! @MichaelSamarin http://www.futurice.com