SlideShare une entreprise Scribd logo
1  sur  98
Half Day Short Course on
Beginning BlackBerry Application Development
             Arief Hamdani Gunawan

                      Bandung,
           18 Januari 2012, 13.00 – 17.00
Agenda

      Introduction

Development Environment

       Simulator

      Hello World

     Publishing and
    commercializing
Agenda

      Introduction

Development Environment

       Simulator

      Hello World

     Publishing and
    commercializing
Introduction
• The advent and growing popularity of BlackBerry
  smartphones has changed how corporate users
  communicate whenever away from their offices. No longer
  tied to their landline phones, no longer glued to their
  desktop PCs, corporate users could stay in touch via voice
  and e-mail as long as cellphone reception was available.
• Then, Research In Motion (RIM) upped the ante:
  Independent software developers were allowed to create
  software to run on BlackBerry smartphones. Developers
  familiar with Java (the BlackBerry uses the Java
  programming language) could leverage that knowledge to
  create BlackBerry apps. This opened the BlackBerry
  smartphone to the creative power of developers all across
  the world.
Introduction
• Since Research In Motion (RIM) launched the first models almost a decade
  ago, the BlackBerry smartphone has gone from relative obscurity to near
  universal visibility—think about how commonplace it has become to see
  people in airports, hotels, offices, or just about anywhere stealing a few
  minutes to check their e-mail or type replies.
• The BlackBerry software development kit (SDK) has been around since the
  first devices were released and has grown to include an extensive
  collection of examples and documentation, and a mature set of APIs and
  tools that have opened the door for all kinds of great applications, most of
  which only currently exist in someone’s imagination.
• In April 2009, RIM went one step further: The BlackBerry App World was
  introduced, offering developers a place to market, advertise, and sell their
  applications to all BlackBerry users.
• And with the maturing of the BlackBerry community and the introduction
  of BlackBerry App World, it’s easier than ever to get your application
  noticed and downloaded by users worldwide.
BlackBerry as a great development opportunity

                               This makes them easy to develop and
      ✓ BlackBerry            maintain, and they don’t require a large
    applications tend to    development team: You need fewer people
          be small.        to debate the pros and cons of different ways
                                       to do the same thing.

    ✓ BlackBerry apps
     narrowly focus on     The apps are simple and direct, providing the
    delivering what the     user with only the information they want —
    user wants, and no                 and the tools to get it.
           more.


    ✓ BlackBerry apps          You can leverage any desktop PC Java
        use Java.               programming experience you have.
BlackBerry as a great development opportunity


    ✓ The tools and
   simulators are all
                          The simulators all execute the same code as the actual devices, so you can be sure
  free. You can do all           that if your app works on a simulator, it will work on a real device.
  your development
   on a Windows PC.

  ✓ The BlackBerry is
    widely used in       From CEOs to administrative assistants and everyone in between, you have a market
      corporate                 for business-specific apps that could link everyone in the enterprise.
     enterprises.

  ✓ RIM provides the      This venue removes the responsibility of credit card handling, hosting, downloading,
   BlackBerry App         and notifying users of updates. The App World comes with a variety of pricing tiers,
   World for you to      including free and Try & Buy. RIM keeps 20 percent of your application price to cover
                              some of its costs. Submitting your app to the App World incurs a $20 fee per
  showcase and sell                     submission, which you can buy in blocks of ten for $200.
      your app.
Independent Software Vendor
• RIM does offer higher-level paid Independent Software
  Vendor (ISV) programs with additional support and other
  benefits, but you can develop and distribute applications
  with the free account.
• We recommend this to enterprise developers who have
  support Service Level Agreement (SLA) with clients,
  because if there is a support issue around a certain
  BlackBerry API, your ISV technical representative will then
  be able to answer your inquiries and/or provide
  workarounds for your problem.
• For more information, see https://partners.blackberry.com
https://partners.blackberry.com
Introduction
 One important thing to do:

We should learn immediately
how to develop an application
 from concept to completion,
  from coding to uploading it
 to the BlackBerry App World
 to sell it to BlackBerry users.
Agenda

      Introduction

Development Environment

       Simulator

      Hello World

     Publishing and
    commercializing
BlackBerry and Java
• BlackBerry applications are written in Java Micro Edition (Java ME),
  formerly called J2ME. This is a subset of Java Standard Edition (Java SE)
  that most Java developers work with.
    – If you’re familiar with Java SE or Java Enterprise Edition (Java EE), Java ME will
      be very easy to pick up.
    – If you’re familiar with another object-oriented language—especially one with
      a similar syntax, such as C#, C++, or even Objective-C—you should similarly
      have no problem picking things up. C# developers in particular should be able
      to understand Java ME code with little or no effort.
• One of the nice things about Java ME and the BlackBerry from the
  perspective of a beginner is that the API is small compared to desktop or
  server programming environments—you can learn a great deal of it fairly
  quickly.
    – Of course, this is a double-edged sword; there will be times when you wish
      the API provided some functionality that bigger environments do, though the
      BlackBerry API is getting more functionality all the time.
How users navigate and use their BlackBerry

• Understanding how users navigate and use
  their BlackBerry smartphones:
  – Most users get most of what they need from a
    BlackBerry application by using just one hand, and
    often, just by using their thumbs on the trackpad
    (or trackwheel/trackball for older devices).
  – The primary input mechanism for a BlackBerry is
    the pointing device, which can take one of several
    forms, depending on which model BlackBerry your
    user has.
from Trackwheel to Trackball
from Trackpad to Touchscreen
Device Released and SDK Version

Choosing an SDK version
• Before we dive into developing
  an application we must choose
  the SDK version to work with.
• In most environments, this
  choice is very simple—just
  choose the most recent
  version and use that one.
• Unfortunately, things are not
  as simple for BlackBerry
  handhelds.
• In fact, it's the opposite.
Device Released and SDK Version
Device Released and SDK Version
• There is a correlation between the handheld Operating System (OS)
  version and the SDK version.
• Each time a new version of the device OS is released, a new version
  of the SDK is released to go along with it.
• As new devices are released and more capabilities are added to
  them, the OS must grow to take advantage of the new capabilities.
• Similarly, the SDK must also grow. It makes sense that SDK version
  4.2 won't be able to utilize features added in OS version 4.5.
• The downside to this is that applications written using version 4.5 of
  the SDK won't run on handhelds with a version 4.2 OS, but the
  opposite is true.
• Applications written using 4.2 will run just fine on a handheld
  running version 4.5 of the OS.
Eclipse
• For the majority of the applications that we will make we will be
  using SDK version 4.5 simply because this is the version that comes
  bundled with Eclipse.
• The Java Development Environment (JDE) has been around longer
  and is a bit more mature, but almost everything possible with the
  JDE can also be accomplished with the Eclipse plug-in.
• The Eclipse plug-in leverages the entire Eclipse development
  platform, which includes a world-class source code editor and a lot
  of third-party plug-ins.
• Ultimately, the choice is a matter of personal preference.
• Although we have used JDE since the very beginning days of
  BlackBerry development and it has come a long way, the developer-
  friendly features of Eclipse IDE with the new updates to the
  BlackBerry JDE Plug-in for Eclipse make the latter a natural choice
  for BlackBerry development.
Eclipse
• Before you start development for BlackBerry, you will need to first
  decide what BlackBerry operating system (OS) version your
  application will support, which then will determine what Eclipse JDE
  plug-in component pack you will need to build your application.
• Each version of the component pack for the Eclipse plug-in
  corresponds to a major version of the BlackBerry OS.
• BlackBerry does a good job of keeping its OS backward compatible,
  so something developed for OS 5.0 generally will work the same on
  OS 6.0 and higher.
• However, you may want to use some features that are only
  available on a later OS. A safe minimum is 5.0, which covers
  majority of the BlackBerry devices on the market and is supported
  by BlackBerry App World.
Eclipse
• RIM offers a plug-in for the Eclipse development
  environment.
• Eclipse is an open source (free) Java development
  environment you can download from www.eclipse.org.
• If you’re comfortable using Eclipse, you should definitely
  investigate RIM’s plug-in.
• As of this course, the current version of BlackBerry Java
  Plug-in for Eclipse is 1.5, and makes use of the BlackBerry
  OS 7.0 APIs.
• Information about the RIM Eclipse plugin can be found at
  http://na.blackberry.com/eng/developers/devbetasoftware
  /javaplugin.jsp
http://www.eclipse.org/
http://us.blackberry.com/developers/javaappdev/javaplugin.jsp
Java SE SDK
• Before installing the BlackBerry development
  tools, you’ll need to install the Java SE JDK from
  http://www.oracle.com/technetwork/java/index.
  html.
• For most developers, downloading Java SE JDK
  v6.0 is a good choice—it will let you develop for
  BlackBerry Device Software version 4.5 and later,
  which covers majority of BlackBerry smartphones
  on the market.
http://www.oracle.com/technetwork/java/index.html
Approaches to developing applications
        for BlackBerry handhelds
• There are two recommended approaches to
  developing applications for BlackBerry
  handhelds
  – Java Application Development
  – BlackBerry Web Development.
Java Application Development
• This is the most powerful approach and it creates applications
  written in Java that are loaded onto and executed on a BlackBerry
  handheld.
• They will be the focus of this book and are one of the most
  common ways to deploy an application.
• Two different tools exist to support this approach—the BlackBerry
  Java Development Environment (JDE) and the BlackBerry JDE
  Component Plug-in for Eclipse.
• Both offer the ability to create full custom applications.
• The BlackBerry JDE is a custom application written in Java that can
  be used to develop applications.
• The latter leverages the Eclipse Integrated Development
  Environment (IDE), which is a common platform for Java
  developers.
BlackBerry Web Development
• It is the other approach that runs completely within the BlackBerry
  Browser application and can use various standards such as HTML
  and AJAX.
• Applications created using the BlackBerry Web Development
  approach are similar to more common web applications and
  generally require network connectivity to work.
• More powerful features, including native API calls, aren't allowed
  natively but can be made using BlackBerry Widgets.
• BlackBerry Widgets is a separate SDK for creating small applets that
  can be leveraged by web applications.
• Overall, this approach can be powerful but it requires network
  connectivity, which potentially means data charges and/or delays
  for network communication.
BlackBerry SDK 7.0
• To use Eclipse to develop for BlackBerry, you’ll
  need to download Eclipse IDE.
• However, to make things simple for you, RIM has
  bundled Eclipse 3.6 (Helios) with the BlackBerry
  JDE Plug-in with BlackBerry SDK 7.0.
• You can download the BlackBerry Java Plug-in for
  Eclipse at
  http://us.blackberry.com/developers/javaappdev
  /devtools.jsp.
http://us.blackberry.com/developers/javaappdev/devtools.jsp
http://us.blackberry.com/developers/blackberry7/
BlackBerry Java Plug-in for Eclipse Update

• Using the BlackBerry® Java® Plug-in for Eclipse® update
  site, you can download and install Eclipse® update
  components directly into an Eclipse install.
• If a previous version of the BlackBerry Java Plug-in for
  Eclipse is installed, it should be uninstalled prior to
  installing the BlackBerry Java Plug-in for Eclipse v1.5.
• If you’re using Java® 2 SDK, Standard Edition v6.0,
  obtain Update 16 of the Java 2 SDK v6.0 from the
  Oracle® website before downloading the plug-in using
  the Eclipse Update Mechanism.
Using Other JDE Versions with Eclipse
• Other JDE versions are supported within the same
  environment with downloadable component packs.
• You can install other component packs for Eclipse from
  within Eclipse itself.
Open Eclipse IDE and do the following:
1. Select Help Menu.
2. From the menu, select the Install New Software menu
   item. The Install New Software screen will appear.
3. From the Install New Software screen, click the Add
   button.
Using Other JDE Versions with Eclipse
4. Paste http://www.blackberry.com/go/eclipseUpdate/3.6/java
    into the location text box, give it the name “text box,” and
    click OK.
Using Other JDE Versions with Eclipse
5. Select the BlackBerry Java Plug-in item and at least one
     BlackBerry Component Pack item that you want to work.
Using Other JDE Versions with Eclipse
6. Then follow the onscreen instruction to finish installation. You
    will have to restart Eclipse IDE in order for the installation to
    take effect.
Desktop Software
• If you want to load your application onto a BlackBerry
  device directly from your computer (i.e., without
  having to upload to a web server and download to your
  device over the wireless connection), you’ll need to
  install the BlackBerry Desktop Manager, which includes
  the device drivers for the BlackBerry.
• You may already have this installed, since it comes on a
  CD with your device. Alternatively, you can download it
  from http://us.blackberry.com/apps-software/desktop/
• You’ll also need this to be able to debug your
  application on a device using your USB cable.
http://us.blackberry.com/apps-software/desktop/
Blackberry Desktop Software




You can use the BlackBerry Desktop Manager to load applications
from your computer to your device
Code Signing Keys
• For basic applications, you can compile and run on real
  BlackBerry devices with no
• further involvement from RIM using the free tools.
• However, if you want to use certain features (such as
  the BlackBerry persistent store, cryptography APIs, and
  embeddable web browser), or if you want to allow
  your application to do things like automatically start,
  you’ll need code signing keys from RIM.
• The code signing keys are only required to use
  controlled APIs from an application running on a
  device; you can run an application on the simulator
  that uses controlled APIs without having to sign it.
Code Signing Keys
• Since the free code signing keys usually only take a day or
  two to receive, it’s a good idea to get them while you’re
  setting up your development environment—almost every
  BlackBerry application ends up needing to use at least a
  few controlled APIs.
• The online application form for signing keys is available at
  https://www.blackberry.com/SignedKeys/
• When filling in the key request form, remember the PIN
  you choose. You’ll need it to install the keys into your JDE.
• Because it’s sometimes a point of confusion, it’s worth
  pointing out that your signing key PIN is not related to a
  BlackBerry device PIN in any way.
https://www.blackberry.com/SignedKeys/
Installing Your Code Signing Keys
• Once you’ve applied for your signing keys, you should receive three
  e-mails from RIM, each containing one of the code signing keys.
• Each gives access to a different part of the API, and you should
  install all three on the same PC.

To install your code signing keys in Eclipse with the BlackBerry JDE
    plug-in, simply import the keys by doing the following:
1. From Eclipse IDE, select Windows from the menu, and then choose
    Open Perspective ➤ Others.
2. Select the BlackBerry Application Development perspective.
    If you do not use the BlackBerry Application development
    perspective, you will not see the BlackBerry menu in the next step.
Installing Your Code Signing Keys
3. Then from the menu, select BlackBerry ➤ Sign ➤ Install New Key.

• You’ll be prompted to create a new public/private key pair
Installing Your Code Signing Keys
• Click Yes on this dialog, and       • A word of warning: This will
  you’ll be asked for a private         seem like more fun than it
  key password to protect your          should.
  key file.
• Remember this password—
  you’ll be asked for it every time
  you want to sign your
  application.
• You’ll then be asked to
  generate some random data
  by moving your mouse pointer
  around.
Installing Your Code Signing Keys
• After this, you’ll be asked to enter the PIN you provided when you
  applied for your keys and the private key password you just
  entered.
• Do this and your key will be installed and ready to use.
Installing Your Code Signing Keys
• For the next two keys, you’ll already have generated your key pair,
  so you’ll just have to enter the PIN and private key password.
• Once you’ve created your key pair and installed your three keys, the
  key information is stored in three files:
   – sigtool.csk
   – sigtool.db
   – sigtool.set
• The location of these files is
  <eclipse_directory>pluginsnet.rim.ejdevmTools, where
  <eclipse_directory> is where you installed your Eclipse environment
  (i.e., C:Eclipsepluginsnet.rim.ejdevmTools).
• It’s also a very good idea to keep a backup of these files and your
  original key files if you ever have to rebuild your development
  environment
Agenda

      Introduction

Development Environment

       Simulator

      Hello World

     Publishing and
    commercializing
BlackBerry JDE Device Simulators
• All BlackBerry device simulators execute the exact
  same code as an actual BlackBerry device using the
  same operating system version number.
• That is, your application, running on a simulator, will
  execute its code just as if it were running on an actual
  device.
• This means you can be pretty certain how your
  application will behave on your users’ BlackBerry
  devices just by running it on the BlackBerry simulators.
• Each version of the JDE comes with its own set of
  simulated BlackBerry devices
JDE version 4.5
• The JDE version 4.5 comes with the following
  device simulators:
  – 81xx Pearl series (8100, 8110, 8120, 8130)
  – 83xx series Curve (8300, 8310, 8320, 8330)
  – 8700 and 8703e
  – 88xx series (8800, 8820, 8830)
JDE version 4.7
• The JDE version 4.7 comes with the following simulators:
   – 8830
   – 95xx series Storm (9500, 9530)

• As you can see, the JDE v. 4.7 doesn’t provide as many
  different device simulators as the JDE v. 4.5; however, the
  JDE v. 4.5 does not come with the BlackBerry Storm, which
  is one of the most popular BlackBerry models.
• That’s because the Storm itself uses BlackBerry device OS
  4.7 or later, and so the 4.7 JDE is required to create
  applications that can take advantage of the Storm’s
  touchscreen.
BlackBerry simulators
• The BlackBerry JDE comes with several supporting applications to
  assist you in developing a quality BlackBerry application.
• You use smartphone simulators to execute your app just as if it
  were running on a real BlackBerry device.
• You use the service simulators to represent the real-world services
  for the BlackBerry to access the Internet (through your PC) or to
  simulate sending and receiving e-mail.
• You use simulators in your development process to test your apps
  before you run them on an actual BlackBerry smartphone.
• You can download the smartphone simulators from RIM at the
  following URL:
• http://us.blackberry.com/developers/resources/simulators.jsp
http://us.blackberry.com/developers/resources/simulators.jsp
Agenda

      Introduction

Development Environment

       Simulator

      Hello World
      (by Eclipse)
     Publishing and
    commercializing
Creating an Application
   with the BlackBerry JDE Plug-In for Eclipse
• If you have worked with Eclipse in the past on a
  generic Java project, then creating a BlackBerry
  project will be very similar to what you’ve done with
  other generic Java projects.
• We’ll walk through creating the same Hello World
  application with the JDE Plug-in for Eclipse.
Creating Project in Eclipse

• With Eclipse, workspace creation is implicit, and the
  JDE plug-in uses the same concept of workspace as
  Eclipse itself does.
• When you start Eclipse, you’re asked for a workspace
  location, which can be any directory. Select (or
  create) an appropriate one and click OK,
Creating a new workspace in Eclipse
Eclipse new workspace Welcome page

• If this is the first time you’ve opened this workspace,
  you’ll see Eclipse’s new workspace Welcome screen.
• There are useful things here.
Create a BlackBerry Project in Eclipse

• To create a new
  BlackBerry project, click
  the File menu, and
  choose New 
  BlackBerry Project.
• In the New BlackBerry
  Project dialog, name
  your project
  HelloWorld, and click
  Finish.
Create a BlackBerry Project in Eclipse
• Your Eclipse workspace should contain a single
  project in the Package Explorer on the left-hand
  side.
• When expanded, you should see the following:
  – src folder: Where all our source files will reside
  – res folder: Where all resource files (i.e., images) will
    reside
  – JRE System Library: The BlackBerry runtime library
    containing the BlackBerry API (by default, it is OS 7)
  – BlackBerry_App_Descriptor.xml file: A file where you
    can configure your application, including the name of
    the application and the icon your application will use
A new BlackBerry project in Eclipse
with the application descriptor opened
Mypackage Package
• By default, two classes, MyApp.java and
  MyScreen.java, will be created for you under
  the mypackage package.
• You may delete the package so you can start
  from scratch by right-clicking on the
  mypackage package and selecting Delete.
Creating the Application Classes
• Creating class files is just as simple as creating
  a project. When creating new classes, it’s a
  very good idea to put your classes into
  packages.
• As you will see, Eclipse has a very easy way of
  letting you specify the package for your class.
Creating the Main Application Class
• Right-click the HelloWorld project icon in the
  Package Explorer, and from the pop-up menu,
  select New  Class. In the dialog, type the
  following values:
  – Package: com.beginningblackberry
  – Name: HelloWorldApp (you can leave off the .java
    file extension)
  – Superclass: net.rim.device.api.ui.UiApplication
Trick:
• A handy shortcut throughout Eclipse, both in the New
  Java Class dialog and in the code editor, is to type part
  of the class name and then press Ctrl+spacebar to get a
  list of class suggestions.
• For example, to automatically get the class name
  net.rim.device.api.ui.UiApplication in the Superclass
  field of the New Java Class dialog, type UiApp and
  press Ctrl+spacebar.
• Eclipse will look for possible completions in the RIM
  API and in any classes you’ve created in your
  workspace. This also works for other Java constructs,
  such as method names.
Method Stubs
• Under “Which method stubs would you like to
  create?” make sure the first two check boxes,
  for generating a main method and
  constructors, are checked (the third box can
  be checked or not—there are no abstract
  methods in UiApplication, so it won’t make a
  difference).
• Everything else can be left at the default
Creating the main application class with Eclipse
Source Code
• You’ll get the following source code:
    package com.beginningblackberry;
    import net.rim.device.api.ui.UiApplication;
    public class HelloWorldApp extends UiApplication {
      public HelloWorldApp() {
        // TODO Auto-generated constructor stub
      }
      /**
      * @param args
      */
      public static void main(String[] args) {
        // TODO Auto-generated method stub
      }
    }
Main application class
• There are even TODO markers where we have to write
  our logic.
• You just created the main application class’ its job is to
  do three things:
   –   Create an instance of the application
   –   Create the main screen and push it onto the display stack
   –   Start the event dispatch thread
• This is generally the pattern you’ll follow for all your
  applications, unless you need to do something like
  automatically start when the BlackBerry device boots.
Subclassing the UiApplication Class
• All applications that display a user interface
  (screens, menus, etc.) must subclass
  net.rim.device.api.ui.UiApplication.
• As we created the HelloWorldApp class, we
  specified the superclass for our main class to
  be UiApplication.
Creating the Main Screen Class
• Click New  Class again (or            • Leave all other values at their
  right-click the package in the           defaults, and click Finish to
  tree view and select New                create the following source
  Class, and you won’t have to             code:
  reenter the package name).
• Fill in the following values:                package
    – Package:                                 com.beginningblackberry;
      com.beginningblackberry
    – Name: HelloWorldMainScreen               import
    – Superclass:                              net.rim.device.api.ui.container.
      net.rim.device.api.ui.container.         MainScreen;
      MainScreen (or type MainS,
      and press Ctrl+spacebar)                 public class
                                               HelloWorldMainScreen extends
                                               MainScreen {
                                               }
Filling In the Hello World Classes
• Next, we flip back to HelloWorldApp, our main class. We’ll
  fill in the constructor of HelloWorldApp.
• This will create the main screen and push it onto the
  display stack:

  class HelloWorldApp extends UiApplication {
       HelloWorldApp() {
              HelloWorldMainScreen mainScreen = new
              HelloWorldMainScreen();
              pushScreen(mainScreen);
       }
  }
Main Method
• Finally, we need to complete the main method.
• This will be familiar to you if you’re a Java SE, .NET, or C
  developer, but it is different from the Java ME/MIDP
  way of doing things.
• The main method acts as the entry point for our
  application and always has the same signature.
• You should only have one main method per
  application.
• The main method will create an instance of our
  application and start the event dispatcher, which is the
  mechanism that does all the drawing to the screen,
  and listens for all user interaction for our application.
Main Method
class HelloWorldApp extends UiApplication {
   …
   public static void main(String[] args) {
       HelloWorldApp app = new HelloWorldApp();
       app.enterEventDispatcher();
   }
}
enterEventDispatcher method
• The enterEventDispatcher method will never
  return as long as the application is running.
• Essentially, the thread that entered the main
  application becomes the event dispatch
  thread.
• We’ll explore this in greater depth later, but
  for now, just remember that the method
  won’t return during the application’s normal
  life cycle.
Coding Up the Main Screen Classes
• At this point, we need to add some GUI components to our
  main screen class with the following code for
  HelloWorldMainScreen.java:

public class HelloWorldMainScreen extends MainScreen {
   public HelloWorldMainScreen() {
        net.rim.device.api.ui.component.LabelField labelField = new
        net.rim.device.api.ui.component.LabelField("Hello World");
        add(labelField);
    }
}
Subclass MainScreen
• We subclass MainScreen instead of Screen
  because MainScreen gives us a couple of
  things automatically—namely a basic layout
  manager (to position our UI controls on the
  screen) and a default menu.
• Later, we’ll want to handle some of that
  functionality ourselves, but for this
  application, the default behavior of
  MainScreen is just what we want.
BlackBerry User Interface API
• The BlackBerry User Interface API follows a fields/layout
  managers/screens model: fields (UI controls such as buttons and text
  boxes) are contained within layout managers, which arrange and draw the
  fields in specific positions.
• The managers themselves are contained within other managers, and
  ultimately a Screen class, which represents the visible display on the
  BlackBerry.
• If you’ve used Java’s Abstract Window Toolkit (AWT), Swing, Windows
  Forms, or any number of other UI toolkits, these concepts will be familiar
  to you.
• In fact, if you’re an experienced Swing user, you’ll find things very familiar.
• For now, we’ll gloss over some of the details, but basically, a MainScreen
  instance contains a single VerticalFieldManager instance, which arranges
  all fields that it contains, one below the other, in the order that they’re
  added.
BlackBerry User Interface API
• The BlackBerry API contains a useful variety of fields
  and managers already.
• For Hello World, we’ll just need one: the LabelField,
  which displays (as you might expect) a text label.
• If you’re interested in exploring a bit more, you can
  find most of the built-in fields in the
  net.rim.device.api.ui.component package and the
  built-in layout managers in
  net.rim.device.api.ui.container.
• Now that the application’s finished, let’s take a look at
  it in action in the simulator.
Running the Simulator
• The application is automatically built and deployed
  when we launch the simulator (in fact, with Eclipse, the
  Java code is compiled whenever you make any change,
  which makes spotting errors easy).
• Running the simulator involves an extra step or two,
  because you have to create a debug configuration.
• The advantage of this is that you can create multiple
  device configurations for different simulators and
  quickly select whichever one you need.

• Click the arrow next to the debug icon on the Eclipse
  toolbar, and select Debug Configurations,
The Eclipse Debug Configurations drop-down
Debug Configurations
• The Debug Configurations dialog lets you set up different
• configurations, which may be different simulators or actual
  devices.
• Each configuration can have different debug parameters,
  and as you develop applications, you’ll likely end up with a
  few different configurations for debugging different OS
  versions, screen sizes, and so on.
• Feel free to explore these options at any time.
• For now, select the BlackBerry Simulator icon on the left
  side, and click the New button on the toolbar in the dialog
  window.
Setting g up a simulator debug configuration
           with the Eclipse plug-in
Debug Configuration
• We will need to specify which BlackBerry project we want
  the simulator to launch.
• On the Project tab shown, check the newly created
  HelloWorld project.
• As for the rest of the other tabs, keep all the defaults.
• Then click the Debug button at the bottom of the dialog.
• The simulator will launch with your application deployed.
• From this point on, you can access your debug
  configuration directly from the Debug drop-down menu on
  the main Eclipse toolbar by clicking the downward-facing
  arrow next to the debug icon.
The default values for a new debug configuration
Launching the HelloWorld app in the simulator

• After you click the
  Debug button, the
  simulator will start up.
• When it is finished,
  you will see your
  HelloWorld app on the
  BlackBerry simulator
  home screen.
HelloWorld app
• When the simulator launches, the HelloWorld
  app will not start up on its own; you will need
  to launch it manually.
• Using your mouse, click the icon on the screen
  to launch the app.
• You can use the arrow keys to navigate and
  highlight the HelloWorld app, and press Enter
  to launch it (this is useful for older, non–touch
  screen simulators).
Agenda

      Introduction

Development Environment

       Simulator

      Hello World

     Publishing and
    commercializing
BlackBerry App World
• A way of installing apps debuted and is fast becoming the
  preferred method for distributing BlackBerry applications:
  BlackBerry App World.
• In April 2009, BlackBerry launched BlackBerry App World—
  an on-device and webbased
• BlackBerry application store. App World is already the best
  way to distribute almost all BlackBerry applications. It
  offers a way for users to find applications, install them, and
  purchase them.
• Fortunately for developers, App World also takes away a lot
  of the headaches of deploying applications, making it easy
  to manage updates, deploy multiple versions for different
  devices and OS versions, and accept payment.
BlackBerry App World
History
• Launched April 1, 2009 in the US, Canada, and the UK
• Expanded to 10 additonal countries on July 31, 2009
   – Added localiza4on support for French, Italian, German, and
     Spanish
   – PayPal is only supported payment method
• Expanded distribution to LATAM and APAC Fall 2009
   – Added localization support for Brazilian Portuguese
• Launched BlackBerry App World Server 2.0 in April
  2010
   – Backend support for BlackBerry ID, carrier and credit card
     billing
History
• BlackBerry App World 2.0 launched August 2010
   – Support for BlackBerry ID, carrier billing, credit card and PayPal
     billing in over 70 countries world wide and 21 currencies
• BlackBerry App World 2.0 Web Storefront Launch Oct
  2010
   – Buy, download, and manage your apps from on the web
   – New $0.99 and $1.99 price 4ers Launched
• BlackBerry App World Server 2.1 in Nov 2010
   – Backend support for BlackBerry Payment Service, BlackBerry
     PlayBook App submissions and localized feature carousel
• BlackBerry App World 2.1 launched February 2011
   – Support for in--‐app purchases
   – Localized “Featured” Content
Key Statistics
• 3 million application downloads per day
• 35 million Downloads of App World client
• Available in over 100+ Countries and
  Territories
• 21 Currencies
• 6 Languages (English, French, Italian,
  German, Spanish, and Brazilian Portuguese)
• Over 25,000 apps available for download or
  purchase
• App sales launched in 57 additional
  countries on August 19, 2010
• Indonesia ranks 5th, Mexico ranks 8th, and
  Australia ranks 10th for global sales after less
  than 30 days
BlackBerry App World
• The first step in publishing your application on App
  World is signing up for an account.
• If you’re ready with the prerequisites, sign up for App
  World, and go to the App World Vendor Portal at
  http://us.blackberry.com/developers/appworld/
http://us.blackberry.com/developers/appworld/
Distributing Your Application on App World

• App World applications are all managed through
  the Vendor Portal.
• Before we walk through an application
  submission, let’s talk a bit about pricing and
  licensing.
• Licensing Options: Applications on App World can
  be one of the following three types:
  – Free
  – Paid
  – Try & Buy
02 BlackBerry Application Development

Contenu connexe

Tendances

The Great Mobile Debate: Native vs. Hybrid App Development
The Great Mobile Debate: Native vs. Hybrid App DevelopmentThe Great Mobile Debate: Native vs. Hybrid App Development
The Great Mobile Debate: Native vs. Hybrid App DevelopmentNick Landry
 
Native vs Web vs Hybrid Mobile Application Development
Native vs Web vs Hybrid Mobile Application DevelopmentNative vs Web vs Hybrid Mobile Application Development
Native vs Web vs Hybrid Mobile Application DevelopmentKosala Nuwan Perera
 
Mobile application development strategy and execution
Mobile application development   strategy and executionMobile application development   strategy and execution
Mobile application development strategy and executionInnoTech
 
Mobile Application Development: Hybrid, Native and Mobile Web Apps
Mobile Application Development: Hybrid, Native and Mobile Web AppsMobile Application Development: Hybrid, Native and Mobile Web Apps
Mobile Application Development: Hybrid, Native and Mobile Web AppsPaul Sons
 
Forrester reviews the KonyOne platform
Forrester reviews the KonyOne platformForrester reviews the KonyOne platform
Forrester reviews the KonyOne platformKony, Inc.
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App DevelopmentChris Morrell
 
Hybrid mobile app development
Hybrid mobile app developmentHybrid mobile app development
Hybrid mobile app developmentChamil Madusanka
 
Introduction to Mobile Development
Introduction to Mobile DevelopmentIntroduction to Mobile Development
Introduction to Mobile DevelopmentPragnesh Vaghela
 
Mobility testing day_1_ppt
Mobility testing day_1_pptMobility testing day_1_ppt
Mobility testing day_1_pptsayhi2sudarshan
 
Introduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App DevelopmentIntroduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App DevelopmentÖzcan Zafer AYAN
 
Tk2323 lecture 1 introduction to mobile application
Tk2323 lecture 1   introduction to mobile applicationTk2323 lecture 1   introduction to mobile application
Tk2323 lecture 1 introduction to mobile applicationMengChun Lam
 
Multi channel advantage
Multi channel advantageMulti channel advantage
Multi channel advantageDipesh Mukerji
 
Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)Ahsanul Karim
 
Starting mobile development
Starting mobile developmentStarting mobile development
Starting mobile developmentMihai Corlan
 
Hybrid vs Native Mobile App. Decide in 5 minutes!
Hybrid vs Native Mobile App. Decide in 5 minutes!Hybrid vs Native Mobile App. Decide in 5 minutes!
Hybrid vs Native Mobile App. Decide in 5 minutes!July Systems
 
Multiplatform App Architecture
Multiplatform App ArchitectureMultiplatform App Architecture
Multiplatform App ArchitectureEdwin Van Schaick
 
Mobile User Interface Development Challenges and Trade-offs
Mobile User Interface Development Challenges and Trade-offsMobile User Interface Development Challenges and Trade-offs
Mobile User Interface Development Challenges and Trade-offs JonFerraiolo
 

Tendances (20)

The Great Mobile Debate: Native vs. Hybrid App Development
The Great Mobile Debate: Native vs. Hybrid App DevelopmentThe Great Mobile Debate: Native vs. Hybrid App Development
The Great Mobile Debate: Native vs. Hybrid App Development
 
Native vs Web vs Hybrid Mobile Application Development
Native vs Web vs Hybrid Mobile Application DevelopmentNative vs Web vs Hybrid Mobile Application Development
Native vs Web vs Hybrid Mobile Application Development
 
Mobile application development strategy and execution
Mobile application development   strategy and executionMobile application development   strategy and execution
Mobile application development strategy and execution
 
Mobile Application Development: Hybrid, Native and Mobile Web Apps
Mobile Application Development: Hybrid, Native and Mobile Web AppsMobile Application Development: Hybrid, Native and Mobile Web Apps
Mobile Application Development: Hybrid, Native and Mobile Web Apps
 
Hybrid mobile apps
Hybrid mobile appsHybrid mobile apps
Hybrid mobile apps
 
Forrester reviews the KonyOne platform
Forrester reviews the KonyOne platformForrester reviews the KonyOne platform
Forrester reviews the KonyOne platform
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
 
Hybrid mobile app development
Hybrid mobile app developmentHybrid mobile app development
Hybrid mobile app development
 
App development
App developmentApp development
App development
 
Introduction to Mobile Development
Introduction to Mobile DevelopmentIntroduction to Mobile Development
Introduction to Mobile Development
 
Mobility testing day_1_ppt
Mobility testing day_1_pptMobility testing day_1_ppt
Mobility testing day_1_ppt
 
Introduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App DevelopmentIntroduction to Cross-Platform Hybrid Mobile App Development
Introduction to Cross-Platform Hybrid Mobile App Development
 
Hybrid Mobile App
Hybrid Mobile AppHybrid Mobile App
Hybrid Mobile App
 
Tk2323 lecture 1 introduction to mobile application
Tk2323 lecture 1   introduction to mobile applicationTk2323 lecture 1   introduction to mobile application
Tk2323 lecture 1 introduction to mobile application
 
Multi channel advantage
Multi channel advantageMulti channel advantage
Multi channel advantage
 
Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)
 
Starting mobile development
Starting mobile developmentStarting mobile development
Starting mobile development
 
Hybrid vs Native Mobile App. Decide in 5 minutes!
Hybrid vs Native Mobile App. Decide in 5 minutes!Hybrid vs Native Mobile App. Decide in 5 minutes!
Hybrid vs Native Mobile App. Decide in 5 minutes!
 
Multiplatform App Architecture
Multiplatform App ArchitectureMultiplatform App Architecture
Multiplatform App Architecture
 
Mobile User Interface Development Challenges and Trade-offs
Mobile User Interface Development Challenges and Trade-offsMobile User Interface Development Challenges and Trade-offs
Mobile User Interface Development Challenges and Trade-offs
 

En vedette

Windows phone 7 development
Windows phone 7 developmentWindows phone 7 development
Windows phone 7 developmentChris Coneybeer
 
Windows phone 7 application development
Windows phone 7 application developmentWindows phone 7 application development
Windows phone 7 application developmentMannu Malhotra
 
iOS Platform & Architecture
iOS Platform & ArchitectureiOS Platform & Architecture
iOS Platform & Architecturekrishguttha
 
Layer architecture of ios (1)
Layer architecture of ios (1)Layer architecture of ios (1)
Layer architecture of ios (1)dwipalp
 
Building iOS App Project & Architecture
Building iOS App Project & ArchitectureBuilding iOS App Project & Architecture
Building iOS App Project & ArchitectureMassimo Oliviero
 

En vedette (6)

Windows phone 7 development
Windows phone 7 developmentWindows phone 7 development
Windows phone 7 development
 
Windows phone 7 application development
Windows phone 7 application developmentWindows phone 7 application development
Windows phone 7 application development
 
iOS Platform & Architecture
iOS Platform & ArchitectureiOS Platform & Architecture
iOS Platform & Architecture
 
Layer architecture of ios (1)
Layer architecture of ios (1)Layer architecture of ios (1)
Layer architecture of ios (1)
 
Building iOS App Project & Architecture
Building iOS App Project & ArchitectureBuilding iOS App Project & Architecture
Building iOS App Project & Architecture
 
Architecting iOS Project
Architecting iOS ProjectArchitecting iOS Project
Architecting iOS Project
 

Similaire à 02 BlackBerry Application Development

App42 Student Lab - Android Game Dev Series V 0.1
App42 Student Lab - Android Game Dev Series V 0.1App42 Student Lab - Android Game Dev Series V 0.1
App42 Student Lab - Android Game Dev Series V 0.1ShepHertz
 
Top 4 Cross Platform tools for Mobile App Development
Top 4 Cross Platform tools for Mobile App DevelopmentTop 4 Cross Platform tools for Mobile App Development
Top 4 Cross Platform tools for Mobile App Developmenttechugo
 
Mobilefirst - Build Enterprise Class Apps for Mobile First
Mobilefirst - Build Enterprise Class Apps for Mobile First Mobilefirst - Build Enterprise Class Apps for Mobile First
Mobilefirst - Build Enterprise Class Apps for Mobile First Sanjeev Kumar
 
When to choose and avoid react native for mobile app development
When to choose and avoid react native for mobile app developmentWhen to choose and avoid react native for mobile app development
When to choose and avoid react native for mobile app developmentFullestop
 
The Importance of Cross Platform Technology
The Importance of Cross Platform TechnologyThe Importance of Cross Platform Technology
The Importance of Cross Platform TechnologyOlivia2590
 
Low code vs. No code: Which is better for web and app development?
Low code vs. No code: Which is better for web and app development?Low code vs. No code: Which is better for web and app development?
Low code vs. No code: Which is better for web and app development?Devathon
 
Advantages and Disadvantages of React Native App Development
Advantages and Disadvantages of React Native App DevelopmentAdvantages and Disadvantages of React Native App Development
Advantages and Disadvantages of React Native App DevelopmentAPPNWEB Technologies
 
BlackBerry WebWorks
BlackBerry WebWorksBlackBerry WebWorks
BlackBerry WebWorksJosue Bustos
 
Mobile Developer's Guide To The Galaxy Vol.7
Mobile Developer's Guide To The Galaxy Vol.7Mobile Developer's Guide To The Galaxy Vol.7
Mobile Developer's Guide To The Galaxy Vol.7Marco Tabor
 
Consider Starting Small
Consider Starting SmallConsider Starting Small
Consider Starting SmallAndrew Smith
 
Cross-platform App Development Company
Cross-platform App Development CompanyCross-platform App Development Company
Cross-platform App Development CompanyThe NineHertz
 
Native Mobile Platforms vs Phonegap – A Comparison
Native Mobile Platforms vs Phonegap – A ComparisonNative Mobile Platforms vs Phonegap – A Comparison
Native Mobile Platforms vs Phonegap – A ComparisonNeev Technologies
 
Mobile application development platform
Mobile application development platformMobile application development platform
Mobile application development platformi4consulting.org
 
Mobile Developer's Guide To The Galaxy, 14th Edition
Mobile Developer's Guide To The Galaxy, 14th EditionMobile Developer's Guide To The Galaxy, 14th Edition
Mobile Developer's Guide To The Galaxy, 14th EditionMarco Tabor
 
React Native App Development in 2023-Tips to Practice.pdf
React Native App Development in 2023-Tips to Practice.pdfReact Native App Development in 2023-Tips to Practice.pdf
React Native App Development in 2023-Tips to Practice.pdfTechugo
 

Similaire à 02 BlackBerry Application Development (20)

[IJCT-V3I2P36] Authors: Amarbir Singh
[IJCT-V3I2P36] Authors: Amarbir Singh[IJCT-V3I2P36] Authors: Amarbir Singh
[IJCT-V3I2P36] Authors: Amarbir Singh
 
App42 Student Lab - Android Game Dev Series V 0.1
App42 Student Lab - Android Game Dev Series V 0.1App42 Student Lab - Android Game Dev Series V 0.1
App42 Student Lab - Android Game Dev Series V 0.1
 
Top 4 Cross Platform tools for Mobile App Development
Top 4 Cross Platform tools for Mobile App DevelopmentTop 4 Cross Platform tools for Mobile App Development
Top 4 Cross Platform tools for Mobile App Development
 
Mobilefirst - Build Enterprise Class Apps for Mobile First
Mobilefirst - Build Enterprise Class Apps for Mobile First Mobilefirst - Build Enterprise Class Apps for Mobile First
Mobilefirst - Build Enterprise Class Apps for Mobile First
 
When to choose and avoid react native for mobile app development
When to choose and avoid react native for mobile app developmentWhen to choose and avoid react native for mobile app development
When to choose and avoid react native for mobile app development
 
The Importance of Cross Platform Technology
The Importance of Cross Platform TechnologyThe Importance of Cross Platform Technology
The Importance of Cross Platform Technology
 
Presentation
PresentationPresentation
Presentation
 
Low code vs. No code: Which is better for web and app development?
Low code vs. No code: Which is better for web and app development?Low code vs. No code: Which is better for web and app development?
Low code vs. No code: Which is better for web and app development?
 
Advantages and Disadvantages of React Native App Development
Advantages and Disadvantages of React Native App DevelopmentAdvantages and Disadvantages of React Native App Development
Advantages and Disadvantages of React Native App Development
 
BlackBerry WebWorks
BlackBerry WebWorksBlackBerry WebWorks
BlackBerry WebWorks
 
Mobile Developer's Guide To The Galaxy Vol.7
Mobile Developer's Guide To The Galaxy Vol.7Mobile Developer's Guide To The Galaxy Vol.7
Mobile Developer's Guide To The Galaxy Vol.7
 
Consider Starting Small
Consider Starting SmallConsider Starting Small
Consider Starting Small
 
Cross-platform App Development Company
Cross-platform App Development CompanyCross-platform App Development Company
Cross-platform App Development Company
 
Native Mobile Platforms vs Phonegap – A Comparison
Native Mobile Platforms vs Phonegap – A ComparisonNative Mobile Platforms vs Phonegap – A Comparison
Native Mobile Platforms vs Phonegap – A Comparison
 
Mobile application development platform
Mobile application development platformMobile application development platform
Mobile application development platform
 
Mobile Developer's Guide To The Galaxy, 14th Edition
Mobile Developer's Guide To The Galaxy, 14th EditionMobile Developer's Guide To The Galaxy, 14th Edition
Mobile Developer's Guide To The Galaxy, 14th Edition
 
Codename one
Codename oneCodename one
Codename one
 
How to Build a Hybrid App: A Detailed Outline
How to Build a Hybrid App: A Detailed Outline How to Build a Hybrid App: A Detailed Outline
How to Build a Hybrid App: A Detailed Outline
 
React Native App Development in 2023-Tips to Practice.pdf
React Native App Development in 2023-Tips to Practice.pdfReact Native App Development in 2023-Tips to Practice.pdf
React Native App Development in 2023-Tips to Practice.pdf
 
IT Technologies Career perspective
IT Technologies   Career perspectiveIT Technologies   Career perspective
IT Technologies Career perspective
 

Plus de Arief Gunawan

Metaverse - Let's learn to understand when business becomes virtual and when ...
Metaverse - Let's learn to understand when business becomes virtual and when ...Metaverse - Let's learn to understand when business becomes virtual and when ...
Metaverse - Let's learn to understand when business becomes virtual and when ...Arief Gunawan
 
Technology Disruptions
Technology DisruptionsTechnology Disruptions
Technology DisruptionsArief Gunawan
 
Tutorial on Network Management and Security in Wireless Communications (Bandu...
Tutorial on Network Management and Security in Wireless Communications (Bandu...Tutorial on Network Management and Security in Wireless Communications (Bandu...
Tutorial on Network Management and Security in Wireless Communications (Bandu...Arief Gunawan
 
APWiMob 2014 (Bali, 28-30 August 2014) CFP
APWiMob 2014 (Bali, 28-30 August 2014) CFPAPWiMob 2014 (Bali, 28-30 August 2014) CFP
APWiMob 2014 (Bali, 28-30 August 2014) CFPArief Gunawan
 
Prof Ekram Hossain on DLT 2013 in Indonesia
Prof Ekram Hossain on DLT 2013 in IndonesiaProf Ekram Hossain on DLT 2013 in Indonesia
Prof Ekram Hossain on DLT 2013 in IndonesiaArief Gunawan
 
Day one ofdma and mimo
Day one ofdma and mimoDay one ofdma and mimo
Day one ofdma and mimoArief Gunawan
 
Day two 10 november 2012
Day two 10 november 2012Day two 10 november 2012
Day two 10 november 2012Arief Gunawan
 
Day one 09 november 2012
Day one 09 november 2012Day one 09 november 2012
Day one 09 november 2012Arief Gunawan
 
IEEE Background presentation
IEEE Background  presentationIEEE Background  presentation
IEEE Background presentationArief Gunawan
 
Cloud and Ubiquitous Computing in Today's Era of Tera
Cloud and Ubiquitous Computing in Today's Era of TeraCloud and Ubiquitous Computing in Today's Era of Tera
Cloud and Ubiquitous Computing in Today's Era of TeraArief Gunawan
 
Cloud Computing: Peluang Bisnis dan Tantangan Regulasi
Cloud Computing: Peluang Bisnis dan Tantangan RegulasiCloud Computing: Peluang Bisnis dan Tantangan Regulasi
Cloud Computing: Peluang Bisnis dan Tantangan RegulasiArief Gunawan
 
Mobile Cloud @ Binus
Mobile Cloud @ BinusMobile Cloud @ Binus
Mobile Cloud @ BinusArief Gunawan
 
Small Cell @ IT Telkom
Small Cell @ IT TelkomSmall Cell @ IT Telkom
Small Cell @ IT TelkomArief Gunawan
 
03 Beginning Android Application Development
03 Beginning Android Application Development03 Beginning Android Application Development
03 Beginning Android Application DevelopmentArief Gunawan
 

Plus de Arief Gunawan (20)

Metaverse - Let's learn to understand when business becomes virtual and when ...
Metaverse - Let's learn to understand when business becomes virtual and when ...Metaverse - Let's learn to understand when business becomes virtual and when ...
Metaverse - Let's learn to understand when business becomes virtual and when ...
 
Technology Disruptions
Technology DisruptionsTechnology Disruptions
Technology Disruptions
 
Tutorial on Network Management and Security in Wireless Communications (Bandu...
Tutorial on Network Management and Security in Wireless Communications (Bandu...Tutorial on Network Management and Security in Wireless Communications (Bandu...
Tutorial on Network Management and Security in Wireless Communications (Bandu...
 
APWiMob 2014 (Bali, 28-30 August 2014) CFP
APWiMob 2014 (Bali, 28-30 August 2014) CFPAPWiMob 2014 (Bali, 28-30 August 2014) CFP
APWiMob 2014 (Bali, 28-30 August 2014) CFP
 
Prof Ekram Hossain on DLT 2013 in Indonesia
Prof Ekram Hossain on DLT 2013 in IndonesiaProf Ekram Hossain on DLT 2013 in Indonesia
Prof Ekram Hossain on DLT 2013 in Indonesia
 
M2M Day Two
M2M Day TwoM2M Day Two
M2M Day Two
 
M2M Day One
M2M Day OneM2M Day One
M2M Day One
 
Day two planning
Day two planningDay two planning
Day two planning
 
Day one ofdma and mimo
Day one ofdma and mimoDay one ofdma and mimo
Day one ofdma and mimo
 
Day two 10 november 2012
Day two 10 november 2012Day two 10 november 2012
Day two 10 november 2012
 
Day one 09 november 2012
Day one 09 november 2012Day one 09 november 2012
Day one 09 november 2012
 
Cloud Architecture
Cloud ArchitectureCloud Architecture
Cloud Architecture
 
Cloud Ecosystem
Cloud EcosystemCloud Ecosystem
Cloud Ecosystem
 
IEEE Background presentation
IEEE Background  presentationIEEE Background  presentation
IEEE Background presentation
 
Cloud and Ubiquitous Computing in Today's Era of Tera
Cloud and Ubiquitous Computing in Today's Era of TeraCloud and Ubiquitous Computing in Today's Era of Tera
Cloud and Ubiquitous Computing in Today's Era of Tera
 
Cloud Computing: Peluang Bisnis dan Tantangan Regulasi
Cloud Computing: Peluang Bisnis dan Tantangan RegulasiCloud Computing: Peluang Bisnis dan Tantangan Regulasi
Cloud Computing: Peluang Bisnis dan Tantangan Regulasi
 
Mobile Cloud @ Binus
Mobile Cloud @ BinusMobile Cloud @ Binus
Mobile Cloud @ Binus
 
Small Cell @ UI
Small Cell @ UISmall Cell @ UI
Small Cell @ UI
 
Small Cell @ IT Telkom
Small Cell @ IT TelkomSmall Cell @ IT Telkom
Small Cell @ IT Telkom
 
03 Beginning Android Application Development
03 Beginning Android Application Development03 Beginning Android Application Development
03 Beginning Android Application Development
 

Dernier

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 

Dernier (20)

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 

02 BlackBerry Application Development

  • 1.
  • 2. Half Day Short Course on Beginning BlackBerry Application Development Arief Hamdani Gunawan Bandung, 18 Januari 2012, 13.00 – 17.00
  • 3. Agenda Introduction Development Environment Simulator Hello World Publishing and commercializing
  • 4. Agenda Introduction Development Environment Simulator Hello World Publishing and commercializing
  • 5. Introduction • The advent and growing popularity of BlackBerry smartphones has changed how corporate users communicate whenever away from their offices. No longer tied to their landline phones, no longer glued to their desktop PCs, corporate users could stay in touch via voice and e-mail as long as cellphone reception was available. • Then, Research In Motion (RIM) upped the ante: Independent software developers were allowed to create software to run on BlackBerry smartphones. Developers familiar with Java (the BlackBerry uses the Java programming language) could leverage that knowledge to create BlackBerry apps. This opened the BlackBerry smartphone to the creative power of developers all across the world.
  • 6. Introduction • Since Research In Motion (RIM) launched the first models almost a decade ago, the BlackBerry smartphone has gone from relative obscurity to near universal visibility—think about how commonplace it has become to see people in airports, hotels, offices, or just about anywhere stealing a few minutes to check their e-mail or type replies. • The BlackBerry software development kit (SDK) has been around since the first devices were released and has grown to include an extensive collection of examples and documentation, and a mature set of APIs and tools that have opened the door for all kinds of great applications, most of which only currently exist in someone’s imagination. • In April 2009, RIM went one step further: The BlackBerry App World was introduced, offering developers a place to market, advertise, and sell their applications to all BlackBerry users. • And with the maturing of the BlackBerry community and the introduction of BlackBerry App World, it’s easier than ever to get your application noticed and downloaded by users worldwide.
  • 7. BlackBerry as a great development opportunity This makes them easy to develop and ✓ BlackBerry maintain, and they don’t require a large applications tend to development team: You need fewer people be small. to debate the pros and cons of different ways to do the same thing. ✓ BlackBerry apps narrowly focus on The apps are simple and direct, providing the delivering what the user with only the information they want — user wants, and no and the tools to get it. more. ✓ BlackBerry apps You can leverage any desktop PC Java use Java. programming experience you have.
  • 8. BlackBerry as a great development opportunity ✓ The tools and simulators are all The simulators all execute the same code as the actual devices, so you can be sure free. You can do all that if your app works on a simulator, it will work on a real device. your development on a Windows PC. ✓ The BlackBerry is widely used in From CEOs to administrative assistants and everyone in between, you have a market corporate for business-specific apps that could link everyone in the enterprise. enterprises. ✓ RIM provides the This venue removes the responsibility of credit card handling, hosting, downloading, BlackBerry App and notifying users of updates. The App World comes with a variety of pricing tiers, World for you to including free and Try & Buy. RIM keeps 20 percent of your application price to cover some of its costs. Submitting your app to the App World incurs a $20 fee per showcase and sell submission, which you can buy in blocks of ten for $200. your app.
  • 9. Independent Software Vendor • RIM does offer higher-level paid Independent Software Vendor (ISV) programs with additional support and other benefits, but you can develop and distribute applications with the free account. • We recommend this to enterprise developers who have support Service Level Agreement (SLA) with clients, because if there is a support issue around a certain BlackBerry API, your ISV technical representative will then be able to answer your inquiries and/or provide workarounds for your problem. • For more information, see https://partners.blackberry.com
  • 11. Introduction One important thing to do: We should learn immediately how to develop an application from concept to completion, from coding to uploading it to the BlackBerry App World to sell it to BlackBerry users.
  • 12. Agenda Introduction Development Environment Simulator Hello World Publishing and commercializing
  • 13. BlackBerry and Java • BlackBerry applications are written in Java Micro Edition (Java ME), formerly called J2ME. This is a subset of Java Standard Edition (Java SE) that most Java developers work with. – If you’re familiar with Java SE or Java Enterprise Edition (Java EE), Java ME will be very easy to pick up. – If you’re familiar with another object-oriented language—especially one with a similar syntax, such as C#, C++, or even Objective-C—you should similarly have no problem picking things up. C# developers in particular should be able to understand Java ME code with little or no effort. • One of the nice things about Java ME and the BlackBerry from the perspective of a beginner is that the API is small compared to desktop or server programming environments—you can learn a great deal of it fairly quickly. – Of course, this is a double-edged sword; there will be times when you wish the API provided some functionality that bigger environments do, though the BlackBerry API is getting more functionality all the time.
  • 14. How users navigate and use their BlackBerry • Understanding how users navigate and use their BlackBerry smartphones: – Most users get most of what they need from a BlackBerry application by using just one hand, and often, just by using their thumbs on the trackpad (or trackwheel/trackball for older devices). – The primary input mechanism for a BlackBerry is the pointing device, which can take one of several forms, depending on which model BlackBerry your user has.
  • 15. from Trackwheel to Trackball
  • 16. from Trackpad to Touchscreen
  • 17. Device Released and SDK Version Choosing an SDK version • Before we dive into developing an application we must choose the SDK version to work with. • In most environments, this choice is very simple—just choose the most recent version and use that one. • Unfortunately, things are not as simple for BlackBerry handhelds. • In fact, it's the opposite.
  • 18. Device Released and SDK Version
  • 19. Device Released and SDK Version • There is a correlation between the handheld Operating System (OS) version and the SDK version. • Each time a new version of the device OS is released, a new version of the SDK is released to go along with it. • As new devices are released and more capabilities are added to them, the OS must grow to take advantage of the new capabilities. • Similarly, the SDK must also grow. It makes sense that SDK version 4.2 won't be able to utilize features added in OS version 4.5. • The downside to this is that applications written using version 4.5 of the SDK won't run on handhelds with a version 4.2 OS, but the opposite is true. • Applications written using 4.2 will run just fine on a handheld running version 4.5 of the OS.
  • 20. Eclipse • For the majority of the applications that we will make we will be using SDK version 4.5 simply because this is the version that comes bundled with Eclipse. • The Java Development Environment (JDE) has been around longer and is a bit more mature, but almost everything possible with the JDE can also be accomplished with the Eclipse plug-in. • The Eclipse plug-in leverages the entire Eclipse development platform, which includes a world-class source code editor and a lot of third-party plug-ins. • Ultimately, the choice is a matter of personal preference. • Although we have used JDE since the very beginning days of BlackBerry development and it has come a long way, the developer- friendly features of Eclipse IDE with the new updates to the BlackBerry JDE Plug-in for Eclipse make the latter a natural choice for BlackBerry development.
  • 21. Eclipse • Before you start development for BlackBerry, you will need to first decide what BlackBerry operating system (OS) version your application will support, which then will determine what Eclipse JDE plug-in component pack you will need to build your application. • Each version of the component pack for the Eclipse plug-in corresponds to a major version of the BlackBerry OS. • BlackBerry does a good job of keeping its OS backward compatible, so something developed for OS 5.0 generally will work the same on OS 6.0 and higher. • However, you may want to use some features that are only available on a later OS. A safe minimum is 5.0, which covers majority of the BlackBerry devices on the market and is supported by BlackBerry App World.
  • 22. Eclipse • RIM offers a plug-in for the Eclipse development environment. • Eclipse is an open source (free) Java development environment you can download from www.eclipse.org. • If you’re comfortable using Eclipse, you should definitely investigate RIM’s plug-in. • As of this course, the current version of BlackBerry Java Plug-in for Eclipse is 1.5, and makes use of the BlackBerry OS 7.0 APIs. • Information about the RIM Eclipse plugin can be found at http://na.blackberry.com/eng/developers/devbetasoftware /javaplugin.jsp
  • 25. Java SE SDK • Before installing the BlackBerry development tools, you’ll need to install the Java SE JDK from http://www.oracle.com/technetwork/java/index. html. • For most developers, downloading Java SE JDK v6.0 is a good choice—it will let you develop for BlackBerry Device Software version 4.5 and later, which covers majority of BlackBerry smartphones on the market.
  • 27. Approaches to developing applications for BlackBerry handhelds • There are two recommended approaches to developing applications for BlackBerry handhelds – Java Application Development – BlackBerry Web Development.
  • 28. Java Application Development • This is the most powerful approach and it creates applications written in Java that are loaded onto and executed on a BlackBerry handheld. • They will be the focus of this book and are one of the most common ways to deploy an application. • Two different tools exist to support this approach—the BlackBerry Java Development Environment (JDE) and the BlackBerry JDE Component Plug-in for Eclipse. • Both offer the ability to create full custom applications. • The BlackBerry JDE is a custom application written in Java that can be used to develop applications. • The latter leverages the Eclipse Integrated Development Environment (IDE), which is a common platform for Java developers.
  • 29. BlackBerry Web Development • It is the other approach that runs completely within the BlackBerry Browser application and can use various standards such as HTML and AJAX. • Applications created using the BlackBerry Web Development approach are similar to more common web applications and generally require network connectivity to work. • More powerful features, including native API calls, aren't allowed natively but can be made using BlackBerry Widgets. • BlackBerry Widgets is a separate SDK for creating small applets that can be leveraged by web applications. • Overall, this approach can be powerful but it requires network connectivity, which potentially means data charges and/or delays for network communication.
  • 30. BlackBerry SDK 7.0 • To use Eclipse to develop for BlackBerry, you’ll need to download Eclipse IDE. • However, to make things simple for you, RIM has bundled Eclipse 3.6 (Helios) with the BlackBerry JDE Plug-in with BlackBerry SDK 7.0. • You can download the BlackBerry Java Plug-in for Eclipse at http://us.blackberry.com/developers/javaappdev /devtools.jsp.
  • 33. BlackBerry Java Plug-in for Eclipse Update • Using the BlackBerry® Java® Plug-in for Eclipse® update site, you can download and install Eclipse® update components directly into an Eclipse install. • If a previous version of the BlackBerry Java Plug-in for Eclipse is installed, it should be uninstalled prior to installing the BlackBerry Java Plug-in for Eclipse v1.5. • If you’re using Java® 2 SDK, Standard Edition v6.0, obtain Update 16 of the Java 2 SDK v6.0 from the Oracle® website before downloading the plug-in using the Eclipse Update Mechanism.
  • 34. Using Other JDE Versions with Eclipse • Other JDE versions are supported within the same environment with downloadable component packs. • You can install other component packs for Eclipse from within Eclipse itself. Open Eclipse IDE and do the following: 1. Select Help Menu. 2. From the menu, select the Install New Software menu item. The Install New Software screen will appear. 3. From the Install New Software screen, click the Add button.
  • 35. Using Other JDE Versions with Eclipse 4. Paste http://www.blackberry.com/go/eclipseUpdate/3.6/java into the location text box, give it the name “text box,” and click OK.
  • 36. Using Other JDE Versions with Eclipse 5. Select the BlackBerry Java Plug-in item and at least one BlackBerry Component Pack item that you want to work.
  • 37. Using Other JDE Versions with Eclipse 6. Then follow the onscreen instruction to finish installation. You will have to restart Eclipse IDE in order for the installation to take effect.
  • 38. Desktop Software • If you want to load your application onto a BlackBerry device directly from your computer (i.e., without having to upload to a web server and download to your device over the wireless connection), you’ll need to install the BlackBerry Desktop Manager, which includes the device drivers for the BlackBerry. • You may already have this installed, since it comes on a CD with your device. Alternatively, you can download it from http://us.blackberry.com/apps-software/desktop/ • You’ll also need this to be able to debug your application on a device using your USB cable.
  • 40. Blackberry Desktop Software You can use the BlackBerry Desktop Manager to load applications from your computer to your device
  • 41. Code Signing Keys • For basic applications, you can compile and run on real BlackBerry devices with no • further involvement from RIM using the free tools. • However, if you want to use certain features (such as the BlackBerry persistent store, cryptography APIs, and embeddable web browser), or if you want to allow your application to do things like automatically start, you’ll need code signing keys from RIM. • The code signing keys are only required to use controlled APIs from an application running on a device; you can run an application on the simulator that uses controlled APIs without having to sign it.
  • 42. Code Signing Keys • Since the free code signing keys usually only take a day or two to receive, it’s a good idea to get them while you’re setting up your development environment—almost every BlackBerry application ends up needing to use at least a few controlled APIs. • The online application form for signing keys is available at https://www.blackberry.com/SignedKeys/ • When filling in the key request form, remember the PIN you choose. You’ll need it to install the keys into your JDE. • Because it’s sometimes a point of confusion, it’s worth pointing out that your signing key PIN is not related to a BlackBerry device PIN in any way.
  • 44. Installing Your Code Signing Keys • Once you’ve applied for your signing keys, you should receive three e-mails from RIM, each containing one of the code signing keys. • Each gives access to a different part of the API, and you should install all three on the same PC. To install your code signing keys in Eclipse with the BlackBerry JDE plug-in, simply import the keys by doing the following: 1. From Eclipse IDE, select Windows from the menu, and then choose Open Perspective ➤ Others. 2. Select the BlackBerry Application Development perspective. If you do not use the BlackBerry Application development perspective, you will not see the BlackBerry menu in the next step.
  • 45. Installing Your Code Signing Keys 3. Then from the menu, select BlackBerry ➤ Sign ➤ Install New Key. • You’ll be prompted to create a new public/private key pair
  • 46. Installing Your Code Signing Keys • Click Yes on this dialog, and • A word of warning: This will you’ll be asked for a private seem like more fun than it key password to protect your should. key file. • Remember this password— you’ll be asked for it every time you want to sign your application. • You’ll then be asked to generate some random data by moving your mouse pointer around.
  • 47. Installing Your Code Signing Keys • After this, you’ll be asked to enter the PIN you provided when you applied for your keys and the private key password you just entered. • Do this and your key will be installed and ready to use.
  • 48. Installing Your Code Signing Keys • For the next two keys, you’ll already have generated your key pair, so you’ll just have to enter the PIN and private key password. • Once you’ve created your key pair and installed your three keys, the key information is stored in three files: – sigtool.csk – sigtool.db – sigtool.set • The location of these files is <eclipse_directory>pluginsnet.rim.ejdevmTools, where <eclipse_directory> is where you installed your Eclipse environment (i.e., C:Eclipsepluginsnet.rim.ejdevmTools). • It’s also a very good idea to keep a backup of these files and your original key files if you ever have to rebuild your development environment
  • 49. Agenda Introduction Development Environment Simulator Hello World Publishing and commercializing
  • 50. BlackBerry JDE Device Simulators • All BlackBerry device simulators execute the exact same code as an actual BlackBerry device using the same operating system version number. • That is, your application, running on a simulator, will execute its code just as if it were running on an actual device. • This means you can be pretty certain how your application will behave on your users’ BlackBerry devices just by running it on the BlackBerry simulators. • Each version of the JDE comes with its own set of simulated BlackBerry devices
  • 51. JDE version 4.5 • The JDE version 4.5 comes with the following device simulators: – 81xx Pearl series (8100, 8110, 8120, 8130) – 83xx series Curve (8300, 8310, 8320, 8330) – 8700 and 8703e – 88xx series (8800, 8820, 8830)
  • 52. JDE version 4.7 • The JDE version 4.7 comes with the following simulators: – 8830 – 95xx series Storm (9500, 9530) • As you can see, the JDE v. 4.7 doesn’t provide as many different device simulators as the JDE v. 4.5; however, the JDE v. 4.5 does not come with the BlackBerry Storm, which is one of the most popular BlackBerry models. • That’s because the Storm itself uses BlackBerry device OS 4.7 or later, and so the 4.7 JDE is required to create applications that can take advantage of the Storm’s touchscreen.
  • 53. BlackBerry simulators • The BlackBerry JDE comes with several supporting applications to assist you in developing a quality BlackBerry application. • You use smartphone simulators to execute your app just as if it were running on a real BlackBerry device. • You use the service simulators to represent the real-world services for the BlackBerry to access the Internet (through your PC) or to simulate sending and receiving e-mail. • You use simulators in your development process to test your apps before you run them on an actual BlackBerry smartphone. • You can download the smartphone simulators from RIM at the following URL: • http://us.blackberry.com/developers/resources/simulators.jsp
  • 55. Agenda Introduction Development Environment Simulator Hello World (by Eclipse) Publishing and commercializing
  • 56. Creating an Application with the BlackBerry JDE Plug-In for Eclipse • If you have worked with Eclipse in the past on a generic Java project, then creating a BlackBerry project will be very similar to what you’ve done with other generic Java projects. • We’ll walk through creating the same Hello World application with the JDE Plug-in for Eclipse.
  • 57. Creating Project in Eclipse • With Eclipse, workspace creation is implicit, and the JDE plug-in uses the same concept of workspace as Eclipse itself does. • When you start Eclipse, you’re asked for a workspace location, which can be any directory. Select (or create) an appropriate one and click OK,
  • 58. Creating a new workspace in Eclipse
  • 59. Eclipse new workspace Welcome page • If this is the first time you’ve opened this workspace, you’ll see Eclipse’s new workspace Welcome screen. • There are useful things here.
  • 60. Create a BlackBerry Project in Eclipse • To create a new BlackBerry project, click the File menu, and choose New  BlackBerry Project. • In the New BlackBerry Project dialog, name your project HelloWorld, and click Finish.
  • 61. Create a BlackBerry Project in Eclipse • Your Eclipse workspace should contain a single project in the Package Explorer on the left-hand side. • When expanded, you should see the following: – src folder: Where all our source files will reside – res folder: Where all resource files (i.e., images) will reside – JRE System Library: The BlackBerry runtime library containing the BlackBerry API (by default, it is OS 7) – BlackBerry_App_Descriptor.xml file: A file where you can configure your application, including the name of the application and the icon your application will use
  • 62. A new BlackBerry project in Eclipse with the application descriptor opened
  • 63. Mypackage Package • By default, two classes, MyApp.java and MyScreen.java, will be created for you under the mypackage package. • You may delete the package so you can start from scratch by right-clicking on the mypackage package and selecting Delete.
  • 64. Creating the Application Classes • Creating class files is just as simple as creating a project. When creating new classes, it’s a very good idea to put your classes into packages. • As you will see, Eclipse has a very easy way of letting you specify the package for your class.
  • 65. Creating the Main Application Class • Right-click the HelloWorld project icon in the Package Explorer, and from the pop-up menu, select New  Class. In the dialog, type the following values: – Package: com.beginningblackberry – Name: HelloWorldApp (you can leave off the .java file extension) – Superclass: net.rim.device.api.ui.UiApplication
  • 66. Trick: • A handy shortcut throughout Eclipse, both in the New Java Class dialog and in the code editor, is to type part of the class name and then press Ctrl+spacebar to get a list of class suggestions. • For example, to automatically get the class name net.rim.device.api.ui.UiApplication in the Superclass field of the New Java Class dialog, type UiApp and press Ctrl+spacebar. • Eclipse will look for possible completions in the RIM API and in any classes you’ve created in your workspace. This also works for other Java constructs, such as method names.
  • 67. Method Stubs • Under “Which method stubs would you like to create?” make sure the first two check boxes, for generating a main method and constructors, are checked (the third box can be checked or not—there are no abstract methods in UiApplication, so it won’t make a difference). • Everything else can be left at the default
  • 68. Creating the main application class with Eclipse
  • 69. Source Code • You’ll get the following source code: package com.beginningblackberry; import net.rim.device.api.ui.UiApplication; public class HelloWorldApp extends UiApplication { public HelloWorldApp() { // TODO Auto-generated constructor stub } /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub } }
  • 70. Main application class • There are even TODO markers where we have to write our logic. • You just created the main application class’ its job is to do three things: – Create an instance of the application – Create the main screen and push it onto the display stack – Start the event dispatch thread • This is generally the pattern you’ll follow for all your applications, unless you need to do something like automatically start when the BlackBerry device boots.
  • 71. Subclassing the UiApplication Class • All applications that display a user interface (screens, menus, etc.) must subclass net.rim.device.api.ui.UiApplication. • As we created the HelloWorldApp class, we specified the superclass for our main class to be UiApplication.
  • 72. Creating the Main Screen Class • Click New  Class again (or • Leave all other values at their right-click the package in the defaults, and click Finish to tree view and select New  create the following source Class, and you won’t have to code: reenter the package name). • Fill in the following values: package – Package: com.beginningblackberry; com.beginningblackberry – Name: HelloWorldMainScreen import – Superclass: net.rim.device.api.ui.container. net.rim.device.api.ui.container. MainScreen; MainScreen (or type MainS, and press Ctrl+spacebar) public class HelloWorldMainScreen extends MainScreen { }
  • 73. Filling In the Hello World Classes • Next, we flip back to HelloWorldApp, our main class. We’ll fill in the constructor of HelloWorldApp. • This will create the main screen and push it onto the display stack: class HelloWorldApp extends UiApplication { HelloWorldApp() { HelloWorldMainScreen mainScreen = new HelloWorldMainScreen(); pushScreen(mainScreen); } }
  • 74. Main Method • Finally, we need to complete the main method. • This will be familiar to you if you’re a Java SE, .NET, or C developer, but it is different from the Java ME/MIDP way of doing things. • The main method acts as the entry point for our application and always has the same signature. • You should only have one main method per application. • The main method will create an instance of our application and start the event dispatcher, which is the mechanism that does all the drawing to the screen, and listens for all user interaction for our application.
  • 75. Main Method class HelloWorldApp extends UiApplication { … public static void main(String[] args) { HelloWorldApp app = new HelloWorldApp(); app.enterEventDispatcher(); } }
  • 76. enterEventDispatcher method • The enterEventDispatcher method will never return as long as the application is running. • Essentially, the thread that entered the main application becomes the event dispatch thread. • We’ll explore this in greater depth later, but for now, just remember that the method won’t return during the application’s normal life cycle.
  • 77. Coding Up the Main Screen Classes • At this point, we need to add some GUI components to our main screen class with the following code for HelloWorldMainScreen.java: public class HelloWorldMainScreen extends MainScreen { public HelloWorldMainScreen() { net.rim.device.api.ui.component.LabelField labelField = new net.rim.device.api.ui.component.LabelField("Hello World"); add(labelField); } }
  • 78. Subclass MainScreen • We subclass MainScreen instead of Screen because MainScreen gives us a couple of things automatically—namely a basic layout manager (to position our UI controls on the screen) and a default menu. • Later, we’ll want to handle some of that functionality ourselves, but for this application, the default behavior of MainScreen is just what we want.
  • 79. BlackBerry User Interface API • The BlackBerry User Interface API follows a fields/layout managers/screens model: fields (UI controls such as buttons and text boxes) are contained within layout managers, which arrange and draw the fields in specific positions. • The managers themselves are contained within other managers, and ultimately a Screen class, which represents the visible display on the BlackBerry. • If you’ve used Java’s Abstract Window Toolkit (AWT), Swing, Windows Forms, or any number of other UI toolkits, these concepts will be familiar to you. • In fact, if you’re an experienced Swing user, you’ll find things very familiar. • For now, we’ll gloss over some of the details, but basically, a MainScreen instance contains a single VerticalFieldManager instance, which arranges all fields that it contains, one below the other, in the order that they’re added.
  • 80. BlackBerry User Interface API • The BlackBerry API contains a useful variety of fields and managers already. • For Hello World, we’ll just need one: the LabelField, which displays (as you might expect) a text label. • If you’re interested in exploring a bit more, you can find most of the built-in fields in the net.rim.device.api.ui.component package and the built-in layout managers in net.rim.device.api.ui.container. • Now that the application’s finished, let’s take a look at it in action in the simulator.
  • 81. Running the Simulator • The application is automatically built and deployed when we launch the simulator (in fact, with Eclipse, the Java code is compiled whenever you make any change, which makes spotting errors easy). • Running the simulator involves an extra step or two, because you have to create a debug configuration. • The advantage of this is that you can create multiple device configurations for different simulators and quickly select whichever one you need. • Click the arrow next to the debug icon on the Eclipse toolbar, and select Debug Configurations,
  • 82. The Eclipse Debug Configurations drop-down
  • 83. Debug Configurations • The Debug Configurations dialog lets you set up different • configurations, which may be different simulators or actual devices. • Each configuration can have different debug parameters, and as you develop applications, you’ll likely end up with a few different configurations for debugging different OS versions, screen sizes, and so on. • Feel free to explore these options at any time. • For now, select the BlackBerry Simulator icon on the left side, and click the New button on the toolbar in the dialog window.
  • 84. Setting g up a simulator debug configuration with the Eclipse plug-in
  • 85. Debug Configuration • We will need to specify which BlackBerry project we want the simulator to launch. • On the Project tab shown, check the newly created HelloWorld project. • As for the rest of the other tabs, keep all the defaults. • Then click the Debug button at the bottom of the dialog. • The simulator will launch with your application deployed. • From this point on, you can access your debug configuration directly from the Debug drop-down menu on the main Eclipse toolbar by clicking the downward-facing arrow next to the debug icon.
  • 86. The default values for a new debug configuration
  • 87. Launching the HelloWorld app in the simulator • After you click the Debug button, the simulator will start up. • When it is finished, you will see your HelloWorld app on the BlackBerry simulator home screen.
  • 88. HelloWorld app • When the simulator launches, the HelloWorld app will not start up on its own; you will need to launch it manually. • Using your mouse, click the icon on the screen to launch the app. • You can use the arrow keys to navigate and highlight the HelloWorld app, and press Enter to launch it (this is useful for older, non–touch screen simulators).
  • 89. Agenda Introduction Development Environment Simulator Hello World Publishing and commercializing
  • 90. BlackBerry App World • A way of installing apps debuted and is fast becoming the preferred method for distributing BlackBerry applications: BlackBerry App World. • In April 2009, BlackBerry launched BlackBerry App World— an on-device and webbased • BlackBerry application store. App World is already the best way to distribute almost all BlackBerry applications. It offers a way for users to find applications, install them, and purchase them. • Fortunately for developers, App World also takes away a lot of the headaches of deploying applications, making it easy to manage updates, deploy multiple versions for different devices and OS versions, and accept payment.
  • 92. History • Launched April 1, 2009 in the US, Canada, and the UK • Expanded to 10 additonal countries on July 31, 2009 – Added localiza4on support for French, Italian, German, and Spanish – PayPal is only supported payment method • Expanded distribution to LATAM and APAC Fall 2009 – Added localization support for Brazilian Portuguese • Launched BlackBerry App World Server 2.0 in April 2010 – Backend support for BlackBerry ID, carrier and credit card billing
  • 93. History • BlackBerry App World 2.0 launched August 2010 – Support for BlackBerry ID, carrier billing, credit card and PayPal billing in over 70 countries world wide and 21 currencies • BlackBerry App World 2.0 Web Storefront Launch Oct 2010 – Buy, download, and manage your apps from on the web – New $0.99 and $1.99 price 4ers Launched • BlackBerry App World Server 2.1 in Nov 2010 – Backend support for BlackBerry Payment Service, BlackBerry PlayBook App submissions and localized feature carousel • BlackBerry App World 2.1 launched February 2011 – Support for in--‐app purchases – Localized “Featured” Content
  • 94. Key Statistics • 3 million application downloads per day • 35 million Downloads of App World client • Available in over 100+ Countries and Territories • 21 Currencies • 6 Languages (English, French, Italian, German, Spanish, and Brazilian Portuguese) • Over 25,000 apps available for download or purchase • App sales launched in 57 additional countries on August 19, 2010 • Indonesia ranks 5th, Mexico ranks 8th, and Australia ranks 10th for global sales after less than 30 days
  • 95. BlackBerry App World • The first step in publishing your application on App World is signing up for an account. • If you’re ready with the prerequisites, sign up for App World, and go to the App World Vendor Portal at http://us.blackberry.com/developers/appworld/
  • 97. Distributing Your Application on App World • App World applications are all managed through the Vendor Portal. • Before we walk through an application submission, let’s talk a bit about pricing and licensing. • Licensing Options: Applications on App World can be one of the following three types: – Free – Paid – Try & Buy