PacktLib: BlackBerry Java Application Development

BlackBerry Java Application Development

Credits

About the Author

Acknowledgement

About the Reviewers

Preface

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

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

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

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

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

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

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

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

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

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

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

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers