Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
About the Authors
About the Technical Reviewer
Acknowledgments
Chapter 1: Setting the Stage
What This Book Is
What You Need to Know Before You Can Begin
Setting Up Your Development Environment
Installing the Development Environment
Getting Code Signing Keys
What’s Different About Developing for BlackBerry
Limited CPU and Memory
Java As the Native API
Limited Screen Real Estate
User Input
Many Different Devices
What’s in This Book
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Summary
Chapter 2: Hello World
Creating an Application with the BlackBerry JDE Plug-In for Eclipse
Creating the Project
Creating the Application Classes
Basic GUI Fields Explained
Running the Simulator
Building with Different JDE Versions
Packaging and Signing Your Application
Debugging on a Device
Polishing the Application
Setting the Title in the BlackBerry Application Descriptor
Creating an Icon
Seeing It All in Action
Summary
Chapter 3: What Makes a BlackBerry Application?
Javadocs
The BlackBerry Application Life Cycle
Starting the Application
Creating the Application
Invoking the Event Thread
Processing Events
Exiting the Application
Threading and the Event Thread
Knowing When Your Application Is on the Event Thread
Updating the UI from Other Threads
Running Background Applications
Detecting Backgrounding or Foregrounding
Sending Your Application to the Background
Understanding the Types of Projects
Libraries
Creating an Alternate Entry Point
MIDP and MIDlet Projects
Summary
Chapter 4: User Interface Basics
The UI Fun Application
The Components of a BlackBerry UI
Creating the Application
Adding the Logo Image
Adding a Few More Fields
Handling User Interaction
Handling UI Events
Handling the Clear Button
Handling the Login Button
Creating Menus
Understanding Menu Items
Implementing the Login and Clear Menu Items
Displaying Images
Summary
Chapter 5: Beyond the Basics of User Interfaces
Enhancing the UI Fun Application
Working with Fonts
Drawing to the Screen Using the Graphics Context
Using the Paint Method
Understanding How the BlackBerry Screen Is Drawn
Creating Custom Fields
Adding a Custom Label Field
Creating a Custom Button Field
A Review of Custom Fields
Creating Custom Managers
Creating a Manager
Tidying Up the Login Success Screen
Creating a Custom Screen
Delegate Managers
Implementing the Screen’s Sublayout Method
Adding a Few Fields
Painting the Background
Adding the Final Touches
Adding a Header Background
Making Minor Tweaks
Working with Touch Screen Models
Creating Basic Animation
Setting the Vertical Offset
Animating the Layout
Summary
Chapter 6: Storing and Searching Data
Storing Data on the BlackBerry
Choices for Persistence
RMS
Persistent Store
Runtime Store
JSR 75 FileConnection
SQLite
BlackBerry Persistent Store
Persistent Store Keys
Persistent Objects
What Can You Persist?
The Persistable Application
More Advanced Persistence
Clearing Persistent Data from a Device
The FileConnection API
Basic Application Framework
Opening a File Connection
Listing the Directory Contents
Viewing Pictures
The Image Display Screen
Loading Images from the File System
Getting Images into the Simulator
Scaling the Image
Writing to the File System
A Dynamic Menu Item
The File Name Screen
Copying the File
Using SQLite
Creating a Database and a Table
Inserting Records
Querying Tables
SQLite Sample Application
Integrating Your App with Unified Search
Summary
Chapter 7: Hello Out There! Making a Network-Enabled Application
Different Ways to Connect
BES/MDS
Direct TCP/IP
BIS
Wi-Fi
WAP 2.0
WAP 1.0
Short-Range Communication
Recommendation
Service Book
The MIDP Connection Framework
Connector
Connections
HTTP Basics
The Test Web Application
The Networking Application
Some Controls
Making an HTTP Connection
The HttpRequestDispatcher Class
Testing It
Two-Way Interaction: Sending Data via HTTP POST
Connection Method: Using Direct TCP/IP Instead of BES/MDS
Making a Connection Using WAP 2.0
Making a Connection Using BIS
Making a Wi-Fi Connection
Determining Network Availability
Using CoverageInfo
Using WLANInfo
Putting It All Together
TCP Socket Connections
Summary
Chapter 8: Where Am I? Using Location-Based Services
GPS Support on BlackBerry Devices
Getting Location Information
Getting Location Information Using JSR 179 APIs and the BlackBerry Extensions to JSR 179
GPS Modes
Specifying a GPS Mode Using JSR 179
Specifying a GPS Mode Using the BlackBerry Extensions to JSR 179
The Location Application
Getting Periodic Location Updates Using LocationListener
Using Geocoding and Reverse Geocoding
Geocoding: Getting Coordinates from an Address
Using BlackBerry Maps
The Invoke API
Launching the Default BlackBerry Maps View
Location Documents
Displaying a Custom Map View
MapField: Embedding BlackBerry Maps in Your UI
Summary
Chapter 9: Getting Your App Out There: Packaging and Publishing
Setting Application Properties
Over-the-Air Installation
Sibling COD Files
The JAD File
Content Types (MIME Types)
Uploading Your Application
Downloading the Application
Desktop Installation
The ALX File
BlackBerry App World
Getting an App World Account
Distributing Your Application on App World
Implementing License Keys
Pricing
The Submission Process
App World API
In-App Purchase
Other Application Stores
MobiHand
Other Sites
Summary
Chapter 10: Next Steps
Keeping Current
Forums
BlackBerry Conferences
OpenGL on the BlackBerry
Newsletters, Blogs, and Other Resources
Farewell
Index
← Prev
Back
Next →
← Prev
Back
Next →