King | Advanced BlackBerry Development | E-Book | www2.sack.de
E-Book

E-Book, Englisch, 350 Seiten

King Advanced BlackBerry Development


1. ed
ISBN: 978-1-4302-2657-4
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark

E-Book, Englisch, 350 Seiten

ISBN: 978-1-4302-2657-4
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark



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.

King Advanced BlackBerry Development jetzt bestellen!

Autoren/Hrsg.


Weitere Infos & Material


1;Contents at a Glance;5
2;Table of Contents ;6
3;About the Author;11
4;Acknowledgments;12
5;Introduction;13
6;Part 1 Advanced APIs;17
6.1;Chapter 1 Getting Started;18
6.1.1;Initial Setup;18
6.1.1.1;Getting Java;18
6.1.1.2;Goldilocks and the Three IDEs;19
6.1.1.3;Plugged In;20
6.1.1.4;BlackBerry Programs;22
6.1.1.5;Simulator Files;23
6.1.1.6;The Keys to Development;24
6.1.2;Application Types;25
6.1.2.1;MIDlets;26
6.1.2.2;MIDlet Behavior;26
6.1.2.3;MIDlet UI;26
6.1.2.4;A MIDlet Example;27
6.1.2.5;Running a MIDlet;30
6.1.2.6;MIDlet Evaluation;31
6.1.2.7;CLDC Applications;32
6.1.2.8;CLDC Behavior;32
6.1.2.9;CLDC UI;33
6.1.2.10;A CLDC Example;33
6.1.2.11;CLDC Evaluation;35
6.1.2.12;Libraries;36
6.1.2.13;Library Functions;36
6.1.2.14;A Library Example;36
6.1.2.15;Library Evaluation;38
6.1.3;Connecting to Files and Networks;38
6.1.3.1;A GCF Overview;38
6.1.3.2;File Access;40
6.1.3.3;Paths;40
6.1.3.4;Access;40
6.1.3.5;Streams;41
6.1.3.6;Other Operations;42
6.1.3.7;Networking;43
6.1.3.8;Types of Connections;43
6.1.3.9;HTTP Requests;44
6.1.4;App: Media Grabber;45
6.1.4.1;Writing the App;45
6.1.4.2;Debugging on the Simulator;47
6.1.4.3;Debugging on the BlackBerry Device;50
6.1.4.4;Working with Devices;51
6.1.4.5;Sign Me Up;52
6.1.5;Excelsior;54
6.2;Chapter 2 Media Capture;55
6.2.1;BlackBerry vs. Sun APIs;55
6.2.1.1;The Sun Standard: A MediaPlayer Connection;56
6.2.1.2;Push Me/Pull You;57
6.2.1.3;The Life of a Player;57
6.2.1.4;Listen to Me;59
6.2.1.5;Have Content, Will Travel;61
6.2.1.6;What Else Is There?;61
6.2.2;Creating a MediaPlayer;62
6.2.3;Controlling Output;63
6.2.4;Recording Audio;65
6.2.4.1;Capture;66
6.2.5;Using the Camera;67
6.2.6;Take a Picture;68
6.2.7;Video Capture;69
6.2.8;Invoking the RIM Alternative;70
6.2.9;App: Media Grabber;73
6.2.10;Excelsior;83
6.3;Chapter 3 Media Playback;84
6.3.1;Finding Content;84
6.3.1.1;Local Filesystem;84
6.3.1.2;Network Download;86
6.3.1.3;Network Stream;87
6.3.1.4;Manual Buffering;88
6.3.1.5;COD Resource;92
6.3.1.6;Other;93
6.3.2;Playing Audio;94
6.3.2.1;The Player Returns;94
6.3.2.2;Listening In;95
6.3.2.3;All About Codecs;100
6.3.2.4;Where Does the Sound Go?;101
6.3.2.5;Mixing Music;103
6.3.2.6;Bringing It Together;104
6.3.2.7;Other Audio Options: MIDI and Tones;104
6.3.3;Playing Video;106
6.3.4;Displaying Images;106
6.3.4.1;Static Image Display in BlackBerry CLDC Applications;107
6.3.4.2;SVG Image Playback;108
6.3.4.3;Getting Plazmic;109
6.3.4.4;GIF Animation;112
6.3.4.5;MIDP Images;113
6.3.5;Invoking Native Apps;114
6.3.5.1;Playing Video Through the Browser;114
6.3.5.2;Using CHAPI to Play Audio;115
6.3.6;App: Media Reviewer;116
6.3.7;Excelsior;126
6.4;Chapter 4 Wireless Messaging;127
6.4.1;The Messaging Quiver;127
6.4.1.1;SMS;127
6.4.1.2;MMS;130
6.4.1.3;Email;133
6.4.1.4;BES Email;135
6.4.1.5;BlackBerry PIN Messaging;137
6.4.2;Sending Text Messages;138
6.4.2.1;Creating Texts;139
6.4.2.2;Sending Data;140
6.4.2.3;When Things Go Wrong;141
6.4.2.4;System Setup;142
6.4.2.5;Sending SMS on CDMA;143
6.4.3;Sending Multimedia Messages;144
6.4.3.1;Talk to the World;144
6.4.3.2;Constructing Parts;145
6.4.3.3;Making the Message;146
6.4.3.4;Get Out Of Here;147
6.4.4;Plugging In to Email;147
6.4.4.1;Taking Account;147
6.4.4.2;Creating the Message;149
6.4.4.3;Adding Attachments;150
6.4.4.4;Testing Sending;151
6.4.5;Receiving Text Messages;157
6.4.5.1;Getting the Message;158
6.4.5.2;Waking Up;159
6.4.5.3;We’ve Got Incoming;160
6.4.5.4;What Is It?;161
6.4.5.5;Testing SMS in the Simulator;162
6.4.6;Receiving MMS Messages;162
6.4.6.1;Reading MMS;163
6.4.6.2;Testing MMS;163
6.4.7;Reading Email;164
6.4.7.1;Listening;164
6.4.7.2;Reading Messages;165
6.4.7.3;Reading Attachments;165
6.4.8;PIN Messaging;167
6.4.8.1;Getting Pinned;167
6.4.8.2;Receiving PINs;168
6.4.9;App: Sending and Receiving Media Messages;168
6.4.10;Excelsior;173
6.5;Chapter 5 Cryptography;174
6.5.1;Is It Secret? Is It Safe?;174
6.5.1.1;Data Encryption;175
6.5.1.2;Data Decryption;176
6.5.1.3;Validation;177
6.5.2;SATSA;178
6.5.3;Bouncy Castle;179
6.5.3.1;An Introduction;179
6.5.3.2;Adding Bouncy Castle to Your Project;179
6.5.3.3;Using Bouncy Castle in Encryption;180
6.5.3.4;Using Bouncy Castle in Decryption;182
6.5.3.5;Using Bouncy Castle to Create Digests;182
6.5.3.6;Using Bouncy Castle to Verify Digests;183
6.5.3.7;Bouncy Castle Analysis;183
6.5.4;RIM Crypto Classes;184
6.5.4.1;An Introduction;184
6.5.4.2;Encryption with the RIM Crypto Classes;186
6.5.4.3;Decryption with the RIM Crypto Classes;187
6.5.4.4;Using RIM Crypto with Digests;188
6.5.4.5;RIM Crypto Analysis;188
6.5.5;Using the Certicom Classes;189
6.5.5.1;An Introduction;189
6.5.5.2;Encryption with Certicom Public Keys;190
6.5.5.3;Decryption with Certicom Public Keys;190
6.5.5.4;Certicom Analysis;191
6.5.6;Other Encryption Choices;191
6.5.6.1;HTTPS Encryption;192
6.5.6.2;MDS Encryption;193
6.5.6.3;File Encryption;193
6.5.7;App: Securing MediaGrabber;194
6.5.7.1;Adding Encryption;194
6.5.7.2;Better Choices;196
6.5.7.3;Decryption;200
6.5.7.4;Paranoia;200
6.5.8;Excelsior;201
7;Part 2 Device Integration;203
7.1;Chapter 6 Personal Information ;204
7.1.1;Address Book;204
7.1.1.1;An Overview of PIM;204
7.1.1.2;Contacts;210
7.1.1.3;Representing a Contact;211
7.1.1.4;A BlackBerry Contact;212
7.1.2;Adding Contacts;215
7.1.2.1;Creating Blank Contacts;215
7.1.2.2;Importing a Contact;215
7.1.3;Editing Contacts;216
7.1.3.1;Modifying Basic Fields;216
7.1.3.2;Modifying Email Addresses;218
7.1.3.3;Modifying Names;219
7.1.3.4;Modifying Phone Numbers;220
7.1.3.5;Modifying Addresses;220
7.1.4;Saving Contacts;221
7.1.5;Searching for Contacts;222
7.1.5.1;I Want It All;222
7.1.5.2;Particular Retrieval;223
7.1.5.3;Broader Searches;224
7.1.5.4;Template Matching;225
7.1.5.5;Remote Lookup;225
7.1.6;Reading Contact Data;226
7.1.7;Deleting Contacts;227
7.1.8;Invoking the Native Address Book;228
7.1.9;The BlackBerry Calendar;230
7.1.9.1;Calendar Syncing;230
7.1.9.2;Repeat After Me;231
7.1.9.3;Eventful Data;233
7.1.10;Using BlackBerry Calendar Events;235
7.1.10.1;Creating and Editing Events;235
7.1.10.2;Searching and Reading Events;236
7.1.10.3;Exporting and Deleting Events;237
7.1.11;Showing Calendars;237
7.1.11.1;Invoking the Native Calendar;237
7.1.11.2;Picking a Date;238
7.1.12;I Have A ToDo List?;240
7.1.13;Take a Memo;242
7.1.14;Personal Changes;243
7.1.15;App: Selecting Recipients;245
7.1.16;Excelsior;248
7.2;Chapter 7 Browser;249
7.2.1;Browser Types;249
7.2.1.1;WAP;249
7.2.1.2;HTML and XHTML;252
7.2.1.3;Embedding Content;254
7.2.1.4;Other Browser Options;255
7.2.2;Web Development or App Development?;255
7.2.2.1;Lightweight Web;255
7.2.2.2;Heavy-duty Apps;256
7.2.3;Launching the Browser;257
7.2.3.1;Starting the Browser;258
7.2.3.2;Service Options;258
7.2.3.3;Launching with HTML;260
7.2.4;Embedding a Browser in Your App;261
7.2.4.1;An Overview;262
7.2.4.2;The Major Players;262
7.2.4.3;Flow of Events;264
7.2.4.4;A Simple Example;265
7.2.4.5;A Fuller Example;269
7.2.5;Embedding Your App in a Browser;272
7.2.5.1;MIME Type Providers;273
7.2.5.2;Registering the Plug-in;276
7.2.6;App: Friend Tracker;277
7.2.6.1;MIME Configuration;277
7.2.6.2;Creating the Plug-in Library;278
7.2.6.3;Running the App;281
7.2.7;Excelsior;283
7.3;Chapter 8 Digging in Deep;284
7.3.1;A Content Handling System;284
7.3.1.1;The Content Handling Philosophy;284
7.3.1.2;The Content Handling Architecture;285
7.3.1.3;The Major Players;287
7.3.1.4;ActionNameMap;293
7.3.1.5;ContentHandler;294
7.3.1.6;ContentHandlerServer;295
7.3.1.7;Registry;298
7.3.1.8;Static Registration;302
7.3.1.9;Installing Handlers;303
7.3.1.10;Built-in Handlers;304
7.3.2;Iconic;305
7.3.2.1;Design Notes;305
7.3.2.2;Technical Notes;306
7.3.2.3;Providing an Icon;307
7.3.2.4;Rollover Icons;307
7.3.2.5;Changing Icons;309
7.3.2.6;Setting Icon Position;310
7.3.3;Native Menus;311
7.3.3.1;Defining Native Menu Options;311
7.3.3.2;Inserting into the Native Menu;312
7.3.4;App: Enter from Anywhere;315
7.3.4.1;Adding CHAPI Handling;315
7.3.4.2;Running with CHAPI;319
7.3.4.3;More Native Menu Integration;320
7.3.5;Excelsior ;323
8;Part 3 Going Pro;324
8.1;Chapter 9 RIM Security;325
8.1.1;The Ownership Question;325
8.1.2;Security Policies: ‘‘You Can’t Do That!’’;326
8.1.2.1;Background;326
8.1.2.2;IT Policy Examples;326
8.1.2.3;Pushing Policies;330
8.1.2.4;Beware of eBay;330
8.1.2.5;Replacing an Old Policy;331
8.1.2.6;What Can You Do?;331
8.1.3;User Permissions: ‘‘May I Do This?’’;332
8.1.3.1;Setting User Permissions on OTA Installs;333
8.1.3.2;Default Permissions;335
8.1.3.3;Specific Application Settings;336
8.1.3.4;Programmatic Control;336
8.1.3.5;Give Me a Reason;342
8.1.4;Firewall: ‘‘Don’t Go There’’;343
8.1.4.1;Firewall Actions;344
8.1.4.2;Firewall Settings;345
8.1.4.3;Firewall Effects;345
8.1.4.4;Dealing with the Firewall;346
8.1.5;MIDlet Permissions: ‘‘I Will Do These Things’’;346
8.1.5.1;Adding MIDlet Permissions;346
8.1.5.2;MIDlet Permissions and BlackBerry;348
8.1.6;Application Signing: ‘‘Do I Know You?’’;349
8.1.6.1;Identity Establishment;349
8.1.6.2;Code Signing Impacts;349
8.1.7;App: Ask for Permissions;349
8.1.7.1;The Version Problem;350
8.1.7.2;Checking and Requesting Permissions: The Old Way;350
8.1.7.3;Checking and Requesting Permissions: The New Way;351
8.1.7.4;Plugging In;352
8.1.7.5;Running the App;352
8.1.8;Excelsior;353
8.2;Chapter 10 Porting Your App;354
8.2.1;Understanding Hardware Differences;354
8.2.1.1;Processors;354
8.2.1.2;Radios;355
8.2.1.3;External Memory Storage;357
8.2.1.4;Keyboard;358
8.2.1.5;Hardware Features;362
8.2.1.6;Screen Sizes;364
8.2.2;Understanding OS Differences;365
8.2.2.1;OS Availability and Updates;365
8.2.2.2;Porting Impact;366
8.2.3;Understanding Language Differences;368
8.2.3.1;Localization Overview;368
8.2.3.2;Adding Multi-Language Support;369
8.2.3.3;Managing Resource Bundles;373
8.2.3.4;Other Localization Concerns;374
8.2.3.5;Porting Impact;375
8.2.4;Understanding Platform Differences;376
8.2.4.1;Forget Porting the UI;377
8.2.4.2;Functionally Divide the App;377
8.2.4.3;Identify Language Reuse Opportunities;377
8.2.4.4;Back to the Drawing Board;377
8.2.5;App: Localized Text;378
8.2.5.1;Create the Resource Files;378
8.2.5.2;Modify Source;379
8.2.5.3;Testing Localization;382
8.2.6;Excelsior;383
8.3;Chapter 11 Advanced BuildTechniques;384
8.3.1;Moving Beyond Eclipse;384
8.3.1.1;The Command Line;384
8.3.1.2;Build Environments;386
8.3.2;Versioning Strategies;388
8.3.2.1;Version Numbers;388
8.3.2.2;Distribution Options;389
8.3.2.3;Where’s My Data?;390
8.3.3;Debugging and Logging;392
8.3.3.1;Capturing Logging;392
8.3.3.2;Visual Logging;393
8.3.3.3;On or Off?;393
8.3.3.4;Data Collection;394
8.3.4;Other Build Issues;394
8.3.4.1;Obfuscation;394
8.3.4.2;Packaging OTA Installs;395
8.3.4.3;Packaging ALX Installs;396
8.3.5;App: Logging, Building, and Updating;397
8.3.5.1;Adding a Logger;397
8.3.5.2;Build Script;398
8.3.5.3;Updates;399
8.3.6;Excelsior;400
8.4;Chapter 12 Conclusion;401
8.4.1;Parting Shots;401
8.4.2;Resources;402
8.4.3;Summit;403
8.5;Appendix Codec Support;404
8.5.1;Notes;409
9;Index;411



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.