Advanced BlackBerry Development -  Chris King

Advanced BlackBerry Development (eBook)

(Autor)

eBook Download: PDF
2010 | 1st ed.
350 Seiten
Apress (Verlag)
978-1-4302-2657-4 (ISBN)
Systemvoraussetzungen
34,99 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen

BlackBerry devices and applications are selling by the millions. As a BlackBerry developer, you need an advanced skill set to successfully exploit the most compelling features of the platform. This book will help you develop that skill set and teach you how to create the most sophisticated BlackBerry programs possible.

With Advanced BlackBerry Development, you'll learn you how to take advantage of BlackBerry media capabilities, including the camera and video playback. The book also shows you how to send and receive text and multimedia messages, use powerful cryptography libraries, and connect with the user's personal and business contacts and calendar.

Not only will you be learning how to use these application programming interfaces, but you'll also be building a program that takes full advantage of them: a wireless media-sharing app. Each chapter's lessons will be applied by enhancing the app from a prototype to a fully polished program. Along the way, yo'll learn how to differentiate your product from other downloads by fully integrating with the operating system. Your app will run in the browser and within device menus, just like software that comes with the phone.

Once you are comfortable with writing apps, this book will show you how to take them to the next level. You'll learn how to move from running on one phone to running on all phones, and from one country to all countries. You'll additionally learn how to support your users with updates. No other resource compares for mastering the techniques needed for expert development on this mobile platform.



Chris King is a software engineer specializing in mobile development. He has written a wide variety of embedded and downloadable libraries and applications, including wireless messaging, lifestyle, shopping, music, and video applications. His software has been pre-loaded on tens of millions of phones in the U.S. Chris develops applications for BlackBerry, Android, Java ME, BREW, and Windows Mobile devices. Chris has written articles on mobile development, and was the technical reviewer for the books Android Essentials by Chris Haseman and Beginning Java ME Platform by Ray Rischpater. He currently serves as a senior engineer for Gravity Mobile in San Francisco.
BlackBerry devices and applications are selling by the millions. As a BlackBerry developer, you need an advanced skill set to successfully exploit the most compelling features of the platform. This book will help you develop that skill set and teach you how to create the most sophisticated BlackBerry programs possible.With Advanced BlackBerry Development, you'll learn you how to take advantage of BlackBerry media capabilities, including the camera and video playback. The book also shows you how to send and receive text and multimedia messages, use powerful cryptography libraries, and connect with the user's personal and business contacts and calendar.Not only will you be learning how to use these application programming interfaces, but you'll also be building a program that takes full advantage of them: a wireless media-sharing app. Each chapter's lessons will be applied by enhancing the app from a prototype to a fully polished program. Along the way, yo'll learn how to differentiate your product from other downloads by fully integrating with the operating system. Your app will run in the browser and within device menus, just like software that comes with the phone.Once you are comfortable with writing apps, this book will show you how to take them to the next level. You'll learn how to move from running on one phone to running on all phones, and from one country to all countries. You'll additionally learn how to support your users with updates. No other resource compares for mastering the techniques needed for expert development on this mobile platform.

Chris King is a software engineer specializing in mobile development. He has written a wide variety of embedded and downloadable libraries and applications, including wireless messaging, lifestyle, shopping, music, and video applications. His software has been pre-loaded on tens of millions of phones in the U.S. Chris develops applications for BlackBerry, Android, Java ME, BREW, and Windows Mobile devices. Chris has written articles on mobile development, and was the technical reviewer for the books Android Essentials by Chris Haseman and Beginning Java ME Platform by Ray Rischpater. He currently serves as a senior engineer for Gravity Mobile in San Francisco.

Contents at a Glance 5
Table of Contents 6
About the Author 11
Acknowledgments 12
Introduction 13
Part 1 Advanced APIs 17
Chapter 1 Getting Started 18
Initial Setup 18
Getting Java 18
Goldilocks and the Three IDEs 19
Plugged In 20
BlackBerry Programs 22
Simulator Files 23
The Keys to Development 24
Application Types 25
MIDlets 26
MIDlet Behavior 26
MIDlet UI 26
A MIDlet Example 27
Running a MIDlet 30
MIDlet Evaluation 31
CLDC Applications 32
CLDC Behavior 32
CLDC UI 33
A CLDC Example 33
CLDC Evaluation 35
Libraries 36
Library Functions 36
A Library Example 36
Library Evaluation 38
Connecting to Files and Networks 38
A GCF Overview 38
File Access 40
Paths 40
Access 40
Streams 41
Other Operations 42
Networking 43
Types of Connections 43
HTTP Requests 44
App: Media Grabber 45
Writing the App 45
Debugging on the Simulator 47
Debugging on the BlackBerry Device 50
Working with Devices 51
Sign Me Up 52
Excelsior 54
Chapter 2 Media Capture 55
BlackBerry vs. Sun APIs 55
The Sun Standard: A MediaPlayer Connection 56
Push Me/Pull You 57
The Life of a Player 57
Listen to Me 59
Have Content, Will Travel 61
What Else Is There? 61
Creating a MediaPlayer 62
Controlling Output 63
Recording Audio 65
Capture 66
Using the Camera 67
Take a Picture 68
Video Capture 69
Invoking the RIM Alternative 70
App: Media Grabber 73
Excelsior 83
Chapter 3 Media Playback 84
Finding Content 84
Local Filesystem 84
Network Download 86
Network Stream 87
Manual Buffering 88
COD Resource 92
Other 93
Playing Audio 94
The Player Returns 94
Listening In 95
All About Codecs 100
Where Does the Sound Go? 101
Mixing Music 103
Bringing It Together 104
Other Audio Options: MIDI and Tones 104
Playing Video 106
Displaying Images 106
Static Image Display in BlackBerry CLDC Applications 107
SVG Image Playback 108
Getting Plazmic 109
GIF Animation 112
MIDP Images 113
Invoking Native Apps 114
Playing Video Through the Browser 114
Using CHAPI to Play Audio 115
App: Media Reviewer 116
Excelsior 126
Chapter 4 Wireless Messaging 127
The Messaging Quiver 127
SMS 127
MMS 130
Email 133
BES Email 135
BlackBerry PIN Messaging 137
Sending Text Messages 138
Creating Texts 139
Sending Data 140
When Things Go Wrong 141
System Setup 142
Sending SMS on CDMA 143
Sending Multimedia Messages 144
Talk to the World 144
Constructing Parts 145
Making the Message 146
Get Out Of Here 147
Plugging In to Email 147
Taking Account 147
Creating the Message 149
Adding Attachments 150
Testing Sending 151
Receiving Text Messages 157
Getting the Message 158
Waking Up 159
We’ve Got Incoming 160
What Is It? 161
Testing SMS in the Simulator 162
Receiving MMS Messages 162
Reading MMS 163
Testing MMS 163
Reading Email 164
Listening 164
Reading Messages 165
Reading Attachments 165
PIN Messaging 167
Getting Pinned 167
Receiving PINs 168
App: Sending and Receiving Media Messages 168
Excelsior 173
Chapter 5 Cryptography 174
Is It Secret? Is It Safe? 174
Data Encryption 175
Data Decryption 176
Validation 177
SATSA 178
Bouncy Castle 179
An Introduction 179
Adding Bouncy Castle to Your Project 179
Using Bouncy Castle in Encryption 180
Using Bouncy Castle in Decryption 182
Using Bouncy Castle to Create Digests 182
Using Bouncy Castle to Verify Digests 183
Bouncy Castle Analysis 183
RIM Crypto Classes 184
An Introduction 184
Encryption with the RIM Crypto Classes 186
Decryption with the RIM Crypto Classes 187
Using RIM Crypto with Digests 188
RIM Crypto Analysis 188
Using the Certicom Classes 189
An Introduction 189
Encryption with Certicom Public Keys 190
Decryption with Certicom Public Keys 190
Certicom Analysis 191
Other Encryption Choices 191
HTTPS Encryption 192
MDS Encryption 193
File Encryption 193
App: Securing MediaGrabber 194
Adding Encryption 194
Better Choices 196
Decryption 200
Paranoia 200
Excelsior 201
Part 2 Device Integration 203
Chapter 6 Personal Information 204
Address Book 204
An Overview of PIM 204
Contacts 210
Representing a Contact 211
A BlackBerry Contact 212
Adding Contacts 215
Creating Blank Contacts 215
Importing a Contact 215
Editing Contacts 216
Modifying Basic Fields 216
Modifying Email Addresses 218
Modifying Names 219
Modifying Phone Numbers 220
Modifying Addresses 220
Saving Contacts 221
Searching for Contacts 222
I Want It All 222
Particular Retrieval 223
Broader Searches 224
Template Matching 225
Remote Lookup 225
Reading Contact Data 226
Deleting Contacts 227
Invoking the Native Address Book 228
The BlackBerry Calendar 230
Calendar Syncing 230
Repeat After Me 231
Eventful Data 233
Using BlackBerry Calendar Events 235
Creating and Editing Events 235
Searching and Reading Events 236
Exporting and Deleting Events 237
Showing Calendars 237
Invoking the Native Calendar 237
Picking a Date 238
I Have A ToDo List? 240
Take a Memo 242
Personal Changes 243
App: Selecting Recipients 245
Excelsior 248
Chapter 7 Browser 249
Browser Types 249
WAP 249
HTML and XHTML 252
Embedding Content 254
Other Browser Options 255
Web Development or App Development? 255
Lightweight Web 255
Heavy-duty Apps 256
Launching the Browser 257
Starting the Browser 258
Service Options 258
Launching with HTML 260
Embedding a Browser in Your App 261
An Overview 262
The Major Players 262
Flow of Events 264
A Simple Example 265
A Fuller Example 269
Embedding Your App in a Browser 272
MIME Type Providers 273
Registering the Plug-in 276
App: Friend Tracker 277
MIME Configuration 277
Creating the Plug-in Library 278
Running the App 281
Excelsior 283
Chapter 8 Digging in Deep 284
A Content Handling System 284
The Content Handling Philosophy 284
The Content Handling Architecture 285
The Major Players 287
ActionNameMap 293
ContentHandler 294
ContentHandlerServer 295
Registry 298
Static Registration 302
Installing Handlers 303
Built-in Handlers 304
Iconic 305
Design Notes 305
Technical Notes 306
Providing an Icon 307
Rollover Icons 307
Changing Icons 309
Setting Icon Position 310
Native Menus 311
Defining Native Menu Options 311
Inserting into the Native Menu 312
App: Enter from Anywhere 315
Adding CHAPI Handling 315
Running with CHAPI 319
More Native Menu Integration 320
Excelsior 323
Part 3 Going Pro 324
Chapter 9 RIM Security 325
The Ownership Question 325
Security Policies: ‘‘You Can’t Do That!’’ 326
Background 326
IT Policy Examples 326
Pushing Policies 330
Beware of eBay 330
Replacing an Old Policy 331
What Can You Do? 331
User Permissions: ‘‘May I Do This?’’ 332
Setting User Permissions on OTA Installs 333
Default Permissions 335
Specific Application Settings 336
Programmatic Control 336
Give Me a Reason 342
Firewall: ‘‘Don’t Go There’’ 343
Firewall Actions 344
Firewall Settings 345
Firewall Effects 345
Dealing with the Firewall 346
MIDlet Permissions: ‘‘I Will Do These Things’’ 346
Adding MIDlet Permissions 346
MIDlet Permissions and BlackBerry 348
Application Signing: ‘‘Do I Know You?’’ 349
Identity Establishment 349
Code Signing Impacts 349
App: Ask for Permissions 349
The Version Problem 350
Checking and Requesting Permissions: The Old Way 350
Checking and Requesting Permissions: The New Way 351
Plugging In 352
Running the App 352
Excelsior 353
Chapter 10 Porting Your App 354
Understanding Hardware Differences 354
Processors 354
Radios 355
External Memory Storage 357
Keyboard 358
Hardware Features 362
Screen Sizes 364
Understanding OS Differences 365
OS Availability and Updates 365
Porting Impact 366
Understanding Language Differences 368
Localization Overview 368
Adding Multi-Language Support 369
Managing Resource Bundles 373
Other Localization Concerns 374
Porting Impact 375
Understanding Platform Differences 376
Forget Porting the UI 377
Functionally Divide the App 377
Identify Language Reuse Opportunities 377
Back to the Drawing Board 377
App: Localized Text 378
Create the Resource Files 378
Modify Source 379
Testing Localization 382
Excelsior 383
Chapter 11 Advanced BuildTechniques 384
Moving Beyond Eclipse 384
The Command Line 384
Build Environments 386
Versioning Strategies 388
Version Numbers 388
Distribution Options 389
Where’s My Data? 390
Debugging and Logging 392
Capturing Logging 392
Visual Logging 393
On or Off? 393
Data Collection 394
Other Build Issues 394
Obfuscation 394
Packaging OTA Installs 395
Packaging ALX Installs 396
App: Logging, Building, and Updating 397
Adding a Logger 397
Build Script 398
Updates 399
Excelsior 400
Chapter 12 Conclusion 401
Parting Shots 401
Resources 402
Summit 403
Appendix Codec Support 404
Notes 409
Index 411

Erscheint lt. Verlag 15.2.2010
Zusatzinfo 350 p.
Verlagsort Berkeley
Sprache englisch
Themenwelt Mathematik / Informatik Informatik Netzwerke
Informatik Software Entwicklung Mobile- / App-Entwicklung
Mathematik / Informatik Informatik Theorie / Studium
Mathematik / Informatik Informatik Web / Internet
Informatik Weitere Themen Smartphones / Tablets
Schlagworte BlackBerry • cryptography • Messaging • Multimedia • programming • Video
ISBN-10 1-4302-2657-9 / 1430226579
ISBN-13 978-1-4302-2657-4 / 9781430226574
Haben Sie eine Frage zum Produkt?
PDFPDF (Wasserzeichen)
Größe: 3,8 MB

DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasser­zeichen und ist damit für Sie persona­lisiert. Bei einer missbräuch­lichen Weiter­gabe des eBooks an Dritte ist eine Rück­ver­folgung an die Quelle möglich.

Dateiformat: PDF (Portable Document Format)
Mit einem festen Seiten­layout eignet sich die PDF besonders für Fach­bücher mit Spalten, Tabellen und Abbild­ungen. Eine PDF kann auf fast allen Geräten ange­zeigt werden, ist aber für kleine Displays (Smart­phone, eReader) nur einge­schränkt geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.

Zusätzliches Feature: Online Lesen
Dieses eBook können Sie zusätzlich zum Download auch online im Webbrowser lesen.

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
Robust and fast cross-platform application development

von Marco Cantu; Pawel Glowacki

eBook Download (2024)
Packt Publishing Limited (Verlag)
33,59