BlackBerry Java Application Development

Build and deploy powerful, useful, and professional Java mobile applications for BlackBerry smartphones, the fast and easy way.

BlackBerry Java Application Development

Starting
Bill Foust

Build and deploy powerful, useful, and professional Java mobile applications for BlackBerry smartphones, the fast and easy way.
$10.00
$39.99
RRP $23.99
RRP $39.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

+ Collection
Free Sample

Book Details

ISBN 139781849690201
Paperback368 pages

About This Book

  • Develop professional, rich, and smart Java applications using BlackBerry SDK
  • Discover the powerful components provided by the SDK to build a powerful user interface with a common look and feel
  • Explore the complex, but important, topic of network communications
  • Integrate with the standard applications on all BlackBerry Smartphone to make your application even more useful
  • Packed with hands-on examples and clear explanations for better understanding

 

Who This Book Is For

If you are a Java programmer who wants to build BlackBerry applications with Java, this book is for you.

Table of Contents

Chapter 1: Introducing BlackBerry Application Development
Expectations of this book
General device capabilities
Two different approaches to application development
Choosing an SDK version
What you can expect
Summary
Chapter 2: Installing the Development Environment
System requirements
Development Environments
Time for action - downloading the Java Development Kit
Time for action - installing the Java Development Kit (JDK)
Introducing the BlackBerry Developer Zone
Time for action - downloading Eclipse with the JDE plugin
Time for action - installing the JDE plugin for Eclipse Full installer
Time for action - installing other JDE component packages over-the-air
Summary
Chapter 3: Getting Familiar with the Development Environment
Starting the Eclipse IDE
Time for action - launching Eclipse for the first time
Importing the hello world project
Time for action - importing the HelloWorldDemo sample application
Running the application
Time for action - running an application in the simulator
Debugging the application
Time for action - starting the debugger
Introducing Eclipse perspectives
Time for action - changing the perspective
Time for action - displaying the Help
Summary
Chapter 4: Creating your First BlackBerry Project
Choosing the SDK version
Time for action - creating a new project
Time for action - creating a new project
Start at the beginning
Time for action - adding the UiApplication class
Time for action - expanding TipCalcApplication
Time for action - adding a MainScreen
Time for action - expanding the TIpCalcMainScreen
Time for action - adding more to the MainScreen
Time for action - adding a menu to the MainScreen
Time for action - selecting the right component package
Time for action - running your new application
Giving TipCalc some polish
Time for action - adding an icon
Time for action - changing the application title
Time for action - fixing the bill amount field
Time for action - disabling the "save" dialog
Summary
Chapter 5: Learning the Basics About the UI
Getting to know other Field classes
SeparatorField
Time for action - creating a SeparatorField
LabelField
Time for action - creating a LabelField
BitmapField
Time for action - creating a BitmapField
ChoiceField
Time for action - creating an ObjectChoiceField
Time for action - creating a NumericChoiceField
GaugeField
Time for action - creating a GaugeField
DateField
Time for action - creating a DateField
CheckboxField
Time for action - creating a CheckboxField
RadioButtonField
Time for action - creating a RadioButtonField
TextField
Time for action - creating a BasicEditField
Time for action - creating an EditField
Time for action - creating a PasswordEditField
Time for action - creating an EmailAddressField
Time for action - creating an AutoTextEditField
Time for action - creating an ActiveAutoTextEditField
Time for action - creating a RichTextField
Time for action - creating an ActiveRichTextField
Summary
Chapter 6: Going Deeper into the UI
ButtonField
Time for action - creating a ButtonField
Time for action - creating a ListField
TreeField
Time for action - creating a TreeField
MapField
Time for action - creating a MapField
Displaying another screen
Time for action - creating an "About Screen"
Displaying a dialog
Time for action - collecting information with a common dialog
Time for action - collecting information with custom buttons on a dialog
Time for action - collecting information with a list on a dialog
Listeners and callbacks
Layout managers
Summary
Chapter 7: Storing Data
Laying the ground work
Creating a data class
The Java way: RMS
Time for action - creating and opening a RecordStore
Time for action - adding a record
Time for action - retrieving records
Time for action - deleting records
The BlackBerry way: Persistent Store
PersistentStore and PersistentObject
Time for action - preparing the JournalEntry class
Time for action - getting a PersistentObject
Time for action - accessing the PersistentObject data
Time for action - accessing the PersistentObject data
Accessing removable storage
Time for action - storing data to a file
Time for action - reading data from a file
Summary
Chapter 8: Interfacing with Applications
Introducing PIM
Laying the ground work
Time for action - creating test contacts
Expanding your test contacts
Time for action - adding telephone numbers
Expanding even more
Time for action - adding e-mail addresses
Finishing the test contacts
Time for action - adding e-mail addresses
Embedding the address book into your application
Time for action - embedding the address book
Adding the event to your calendar
Time for action - adding an event to the calendar
Recurring events
Sending e-mail
Time for action - sending an e-mail from an application
Summary
Chapter 9: Networking
Threading
Connector class
HTTP basics
Time for action - ‑ HTTP Basics
Time for action - calling a web service
Time for action - parsing the response
The transport—so many possibilities
Debugging with the MDS simulator
Testing for availability of transports
Time for action - testing for availability
Moving beyond HTTP connections
Summary
Chapter 10: Advanced Topics
Introducing the Global Positioning System
Time for action - acquiring a location
Time for action - expanding Hansel
Alternate entry points
Time for action - creating an alternate entry point project
Time for action - adding a focus icon to Hansel
Summary
Chapter 11: Wrapping It All Up
Using resources for localization
Time for action - adding a resource file
Resource bundles
Time for action - adding a second resource file
Time for action - populating a resource file and configuring the project
Time for action - using a resource in your code
Code signing your application
Time for action - configuring projects to allow access
Time for action - installing the code-signing keys
Time for action - code-signing the application
Distributing your application through BlackBerry App World
Summary

What You Will Learn

  • Learn about the two approaches to develop BlackBerry applications
  • Understand how the SDK version relates to target devices and learn about the BlackBerry Developer Zone
  • Install the Java SDK, which is the foundation using the development environment
  • Install Eclipse with the BlackBerry Component Package and configure it with other Component Package versions
  • Import the existing HelloWorldDemo supplied with the software and compile and debug the application
  • Study PIM, create new PIM Items, and assign values to their fields
  • Set up a Screen with fields and create and use menus
  • Learn the usage of the Field styles and classes to the fullest
  • Study about a Layout Manager and create custom Dialogs on the fly to collect discrete pieces of information
  • Get to know the pros and cons for each record-based approach and pick the one that best meets your needs
  • Create new Personal Information Management (PIM) items and assign values to their fields
  • Understand the basics of HTTP and the correct usage of GET or POST
  • Learn the working of Global Position System and the three methods by which a BlackBerry handheld can get location information

 

In Detail

BlackBerry Smartphone was once the domain of jet-setting business users with power suits. Now you can hardly go anywhere without seeing someone using a BlackBerry to check their messages or make a call. It's this kind of explosive growth that makes the BlackBerry ecosystem a great place to develop and market applications through the BlackBerry App World store—this book shows you how to do just that!

This step-by-step guide gives you a hands-on experience of developing innovative Java applications for your BlackBerry. With the help of this book, you will learn to build your own applications to illustrate the platform, and the various capabilities that developers can use in their programs. It explores the powers of Blackberry and helps you develop professional and impressive Java applications.

The book teaches how to write rich, interactive, and smart BlackBerry applications in Java. It expects the readers to know Java but not Java Mobile or the BlackBerry APIs. We will learn to build rich, interactive, and smart Java applications for the BlackBerry. The book will cover UI programming, data storage, programming network, and internet API apps. As we move on, we will learn more about the BlackBerry's device features, such as messaging, GPS, multimedia, contacts and calendar, and so on.
This book also helps you build your own applications to illustrate the platform, and the various capabilities that developers can use in their programs.

Authors

Table of Contents

Chapter 1: Introducing BlackBerry Application Development
Expectations of this book
General device capabilities
Two different approaches to application development
Choosing an SDK version
What you can expect
Summary
Chapter 2: Installing the Development Environment
System requirements
Development Environments
Time for action - downloading the Java Development Kit
Time for action - installing the Java Development Kit (JDK)
Introducing the BlackBerry Developer Zone
Time for action - downloading Eclipse with the JDE plugin
Time for action - installing the JDE plugin for Eclipse Full installer
Time for action - installing other JDE component packages over-the-air
Summary
Chapter 3: Getting Familiar with the Development Environment
Starting the Eclipse IDE
Time for action - launching Eclipse for the first time
Importing the hello world project
Time for action - importing the HelloWorldDemo sample application
Running the application
Time for action - running an application in the simulator
Debugging the application
Time for action - starting the debugger
Introducing Eclipse perspectives
Time for action - changing the perspective
Time for action - displaying the Help
Summary
Chapter 4: Creating your First BlackBerry Project
Choosing the SDK version
Time for action - creating a new project
Time for action - creating a new project
Start at the beginning
Time for action - adding the UiApplication class
Time for action - expanding TipCalcApplication
Time for action - adding a MainScreen
Time for action - expanding the TIpCalcMainScreen
Time for action - adding more to the MainScreen
Time for action - adding a menu to the MainScreen
Time for action - selecting the right component package
Time for action - running your new application
Giving TipCalc some polish
Time for action - adding an icon
Time for action - changing the application title
Time for action - fixing the bill amount field
Time for action - disabling the "save" dialog
Summary
Chapter 5: Learning the Basics About the UI
Getting to know other Field classes
SeparatorField
Time for action - creating a SeparatorField
LabelField
Time for action - creating a LabelField
BitmapField
Time for action - creating a BitmapField
ChoiceField
Time for action - creating an ObjectChoiceField
Time for action - creating a NumericChoiceField
GaugeField
Time for action - creating a GaugeField
DateField
Time for action - creating a DateField
CheckboxField
Time for action - creating a CheckboxField
RadioButtonField
Time for action - creating a RadioButtonField
TextField
Time for action - creating a BasicEditField
Time for action - creating an EditField
Time for action - creating a PasswordEditField
Time for action - creating an EmailAddressField
Time for action - creating an AutoTextEditField
Time for action - creating an ActiveAutoTextEditField
Time for action - creating a RichTextField
Time for action - creating an ActiveRichTextField
Summary
Chapter 6: Going Deeper into the UI
ButtonField
Time for action - creating a ButtonField
Time for action - creating a ListField
TreeField
Time for action - creating a TreeField
MapField
Time for action - creating a MapField
Displaying another screen
Time for action - creating an "About Screen"
Displaying a dialog
Time for action - collecting information with a common dialog
Time for action - collecting information with custom buttons on a dialog
Time for action - collecting information with a list on a dialog
Listeners and callbacks
Layout managers
Summary
Chapter 7: Storing Data
Laying the ground work
Creating a data class
The Java way: RMS
Time for action - creating and opening a RecordStore
Time for action - adding a record
Time for action - retrieving records
Time for action - deleting records
The BlackBerry way: Persistent Store
PersistentStore and PersistentObject
Time for action - preparing the JournalEntry class
Time for action - getting a PersistentObject
Time for action - accessing the PersistentObject data
Time for action - accessing the PersistentObject data
Accessing removable storage
Time for action - storing data to a file
Time for action - reading data from a file
Summary
Chapter 8: Interfacing with Applications
Introducing PIM
Laying the ground work
Time for action - creating test contacts
Expanding your test contacts
Time for action - adding telephone numbers
Expanding even more
Time for action - adding e-mail addresses
Finishing the test contacts
Time for action - adding e-mail addresses
Embedding the address book into your application
Time for action - embedding the address book
Adding the event to your calendar
Time for action - adding an event to the calendar
Recurring events
Sending e-mail
Time for action - sending an e-mail from an application
Summary
Chapter 9: Networking
Threading
Connector class
HTTP basics
Time for action - ‑ HTTP Basics
Time for action - calling a web service
Time for action - parsing the response
The transport—so many possibilities
Debugging with the MDS simulator
Testing for availability of transports
Time for action - testing for availability
Moving beyond HTTP connections
Summary
Chapter 10: Advanced Topics
Introducing the Global Positioning System
Time for action - acquiring a location
Time for action - expanding Hansel
Alternate entry points
Time for action - creating an alternate entry point project
Time for action - adding a focus icon to Hansel
Summary
Chapter 11: Wrapping It All Up
Using resources for localization
Time for action - adding a resource file
Resource bundles
Time for action - adding a second resource file
Time for action - populating a resource file and configuring the project
Time for action - using a resource in your code
Code signing your application
Time for action - configuring projects to allow access
Time for action - installing the code-signing keys
Time for action - code-signing the application
Distributing your application through BlackBerry App World
Summary

Book Details

ISBN 139781849690201
Paperback368 pages
Read More