1. Trang chủ
  2. » Giáo Dục - Đào Tạo

technicians of the sacred a range of poetries from africa america asia europe and oceania jan 1985

447 875 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 447
Dung lượng 6,22 MB

Nội dung

King BlackBerry Development Companion eBook Available Advanced Advanced BlackBerry Development Trim: 7.5 x 9.25 spine = 0.84375" 448 page count Unlock the secrets of advanced BlackBerry development Chris King COMPANION eBOOK SEE LAST PAGE FOR DETAILS ON $10 eBOOK VERSION US $39.99 Shelve in Mobile Computing User level: Intermediate-Advanced www.apress.com SOURCE CODE ONLINE BOOKS FOR PROFESSIONALS BY PROFESSIONALS ® this print for content only—size & color not accurate CYAN MAGENTA YELLOW BLACK PANTONE 123 C SPOT MATTE ISBN 978-1-4302-2656-7 9 781430 226567 5 39 9 9 • Learn to create, debug and deploy professional quality BlackBerry applications • Discover the breadth of the BlackBerry platform and unlock its potential. • Incorporate key features such as cryptography, video and text messaging into your code D o you want to write compelling software for some of the most popu- lar phones in the world? This book shows you how to write top-notch, professional applications for the BlackBerry platform. In my career developing mobile software I’ve found that vital information is often buried deep inside multiple API documents, whitepapers, message boards, sample code, and the heads of engineers who have fought against problems until they were solved. Unless you’re lucky enough to work with a bright and friendly person who is an expert with a lot of spare time on their hands, it’s dicult to get a compre- hensive view of how everything hangs together. I enjoy writing BlackBerry software, and have battled many of the issues that can trip up developers, so I wrote this book to help others get over those hurdles. Building software is fun; dealing with a phone’s foibles is not. Once you get comfortable with the platform and its quirks, you’ll nd BlackBerry programming very rewarding. You’ll learn about many of the cool features available for your use, like recording audio, playing video, and sending text messages. You’ll learn the deep voodoo of cryptography. Perhaps most exciting of all, you’ll see how your applications can burrow into the phone’s core features, becoming indispens- able to users. Whether you’re a veteran looking for a map across the BlackBerry mineeld, or a new recruit learning the lie of the land, this book will show you the best way to achieve your objectives. I hope that, by the time you nish this book, you won’t just know how to write great BlackBerry apps, but will be able to write them quickly and get them working on as many phones as possible with as few headaches as pos- sible. Good luck, and have fun! Chris King is a software engineer specializing in mobile development. Having developed applications for BlackBerry, Android, Java ME, BREW, and Windows Mobile devices, his software has been pre-loaded on tens of millions of phones in the United States alone. King BlackBerry Development Companion eBook Available Advanced Advanced BlackBerry Development Trim: 7.5 x 9.25 spine = 0.84375" 448 page count Unlock the secrets of advanced BlackBerry development Chris King COMPANION eBOOK SEE LAST PAGE FOR DETAILS ON $10 eBOOK VERSION US $39.99 Shelve in Mobile Computing User level: Intermediate-Advanced www.apress.com SOURCE CODE ONLINE BOOKS FOR PROFESSIONALS BY PROFESSIONALS ® this print for content only—size & color not accurate CYAN MAGENTA YELLOW BLACK PANTONE 123 C SPOT MATTE ISBN 978-1-4302-2656-7 9 781430 226567 5 39 9 9 • Learn to create, debug and deploy professional quality BlackBerry applications • Discover the breadth of the BlackBerry platform and unlock its potential. • Incorporate key features such as cryptography, video and text messaging into your code D o you want to write compelling software for some of the most popu- lar phones in the world? This book shows you how to write top-notch, professional applications for the BlackBerry platform. In my career developing mobile software I’ve found that vital information is often buried deep inside multiple API documents, whitepapers, message boards, sample code, and the heads of engineers who have fought against problems until they were solved. Unless you’re lucky enough to work with a bright and friendly person who is an expert with a lot of spare time on their hands, it’s dicult to get a compre- hensive view of how everything hangs together. I enjoy writing BlackBerry software, and have battled many of the issues that can trip up developers, so I wrote this book to help others get over those hurdles. Building software is fun; dealing with a phone’s foibles is not. Once you get comfortable with the platform and its quirks, you’ll nd BlackBerry programming very rewarding. You’ll learn about many of the cool features available for your use, like recording audio, playing video, and sending text messages. You’ll learn the deep voodoo of cryptography. Perhaps most exciting of all, you’ll see how your applications can burrow into the phone’s core features, becoming indispens- able to users. Whether you’re a veteran looking for a map across the BlackBerry mineeld, or a new recruit learning the lie of the land, this book will show you the best way to achieve your objectives. I hope that, by the time you nish this book, you won’t just know how to write great BlackBerry apps, but will be able to write them quickly and get them working on as many phones as possible with as few headaches as pos- sible. Good luck, and have fun! Chris King is a software engineer specializing in mobile development. Having developed applications for BlackBerry, Android, Java ME, BREW, and Windows Mobile devices, his software has been pre-loaded on tens of millions of phones in the United States alone. Advanced BlackBerry Development ■ ■ ■ Chris King Advanced BlackBerry Development Copyright © 2009 by Chris King All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-4302-2656-7 ISBN-13 (electronic): 978-1-4302-2657-4 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. President and Publishing: Paul Manning Lead Editor: Ewan Buckingham Technical Reviewer: Levon Dolbakian Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell, Jonathan Gennick, Michelle Lowman, Matthew Moodie, Jeffrey Pepper, Frank Pohlmann, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Coordinating Editor: Mary Tobin Copy Editor: Kari Brooks-Copony and Mary Tobin Compositor: LaurelTech Indexer: BIM Indexing and e-Services Artist: April Milne Cover Designer: Anna Ishchenko Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com, or visit http://www.springeronline.com. For information on translations, please e-mail info@apress.com, or visit http://www.apress.com. Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales– eBook Licensing web page at http://www.apress.com/info/bulksales. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is available to readers at http://www.apress.com. You will need to answer questions pertaining to this book in order to successfully download the code. For Mom and Dad iv Contents at a Glance ■ Part 1: Advanced APIs 1 ■ Chapter 1: Getting Started 3 ■ Chapter 2: Media Capture 41 ■ Chapter 3: Media Playback 71 ■ Chapter 4: Wireless Messaging 115 ■ Chapter 5: Cryptography 163 ■ Part 2: Device Integration 193 ■ Chapter 6: Personal Information 195 ■ Chapter 7: Browser 241 ■ Chapter 8: Digging in Deep 277 ■ Part 3: Going Pro 317 ■ Chapter 9: RIM Security 319 ■ Chapter 10: Porting Your App 349 ■ Chapter 11: Advanced Build Techniques 379 ■ Chapter 12: Conclusion 397 ■ Appendix: Codec Support 401 ■ Index 409 v Contents Contents at a Glance iv Contents v About the Author x Acknowledgments xi Introduction xii ■ Part 1: Advanced APIs 1 ■ Chapter 1: Getting Started 3 Initial Setup 3 Application Types 10 Connecting to Files and Networks 23 App: Media Grabber 30 Excelsior 39 ■ Chapter 2: Media Capture 41 BlackBerry vs. Sun APIs 41 Creating a MediaPlayer 48 Controlling Output 49 Recording Audio 51 Using the Camera 53 ■ CONTENTS vi Video Capture 55 Invoking the RIM Alternative 56 App: Media Grabber 59 Excelsior 69 ■ Chapter 3: Media Playback 71 Finding Content 71 Playing Audio 81 Playing Video 93 Displaying Images 93 Invoking Native Apps 101 App: Media Reviewer 103 Excelsior 113 ■ Chapter 4: Wireless Messaging 115 The Messaging Quiver 115 Sending Text Messages 126 Sending Multimedia Messages 132 Plugging In to Email 135 Receiving Text Messages 145 Receiving MMS Messages 150 Reading Email 152 PIN Messaging 155 App: Sending and Receiving Media Messages 156 Excelsior 161 ■ Chapter 5: Cryptography 163 Is It Secret? Is It Safe? 163 SATSA 167 Bouncy Castle 168 RIM Crypto Classes 173 Using the Certicom Classes 178 ■ CONTENTS vii Other Encryption Choices 180 App: Securing MediaGrabber 183 Excelsior 190 ■ Part 2: Device Integration 193 ■ Chapter 6: Personal Information 195 Address Book 195 Adding Contacts 206 Editing Contacts 207 Saving Contacts 212 Searching for Contacts 213 Reading Contact Data 217 Deleting Contacts 218 Invoking the Native Address Book 219 The BlackBerry Calendar 221 Using BlackBerry Calendar Events 226 Showing Calendars 228 I Have A ToDo List? 231 Take a Memo 233 Personal Changes 234 App: Selecting Recipients 236 Excelsior 239 ■ Chapter 7: Browser 241 Browser Types 241 Web Development or App Development? 247 Launching the Browser 249 Embedding a Browser in Your App 253 Embedding Your App in a Browser 264 App: Friend Tracker 269 Excelsior 275 ■ CONTENTS viii ■ Chapter 8: Digging in Deep 277 A Content Handling System 277 Iconic 298 Native Menus 304 App: Enter from Anywhere 308 Excelsior 316 ■ Part 3: Going Pro 317 ■ Chapter 9: RIM Security 319 The Ownership Question 319 Security Policies: “You Can’t Do That!” 320 User Permissions: “May I Do This?” 326 Firewall: “Don’t Go There” 337 MIDlet Permissions: “I Will Do These Things” 340 Application Signing: “Do I Know You?” 343 App: Ask for Permissions 343 Excelsior 347 ■ Chapter 10: Porting Your App 349 Understanding Hardware Differences 349 Understanding OS Differences 360 Understanding Language Differences 363 Understanding Platform Differences 371 App: Localized Text 373 Excelsior 378 ■ Chapter 11: Advanced Build Techniques 379 Moving Beyond Eclipse 379 Versioning Strategies 383 Debugging and Logging 387 Other Build Issues 389 App: Logging, Building, and Updating 392 [...]... specialized type of Field is the Manager A Manager controls the appearance and behavior for its own children fields One Manager may lay out its children horizontally, another vertically, and another as a grid By using managers, you can create elaborate and attractive user interfaces You can also subclass Field, Manager, or any other class to add your own desired functions and appearance For example,... Kawahara, Mike Ma, Chad Moats, Sasha Parry, Greg Peters, Ian Peters-Campbell, Brian Pridham, Rajiv Ramanasankaran, Dave Robaska, Tom Seago, Charles Stearns, Young Yoon, and Wayne Yurtin My apologies for anyone whose name I may have forgotten; I consider myself fortunate to have met a surplus of talented and generous people in my career A special shout-out goes to the whole gang at Gravity Mobile Gravity... the 1990s as an early way to write Java applications for extremely limited devices The ME stands for Micro Edition, and the initial requirements were very micro indeed: devices could have as little as 192 kilobytes of RAM Over the years, Java ME has expanded and matured along with the mobile market, gradually adding new features and support as they become widely available in handsets A collection of. .. some of the most exciting and compelling features available to you Chapter 1 provides a crash course in building a variety of RIM applications that can access the local filesystem and the Internet From there, learn how to use the device to shoot photos, record sound and video, and use the captured data in your app Next, see the wide variety of options available for playing video, animations, and audio... as with a hike, you can always keep going a little further, always learn something new I’ve found BlackBerry programming to be a particularly fun trail, and hope you will enjoy the journey too Keep striving, keep moving upward, and appreciate the view xv Part 1 Advanced APIs The best BlackBerry apps take advantage of the rich set of advanced APIs available on this platform The chapters in Part 1 describe... care about the UI Use a Canvas for commercial applications, and a GameCanvas for games or other high-quality interactive apps CHAPTER 1: Getting Started The rest of this book contains a good amount of information that can be applied to MIDlets To learn even more, particularly more details about the user interface options, consider reading Beginning Java ME Platform by Ray Rischpater (Apress) Most of. .. CLDC Behavior BlackBerry CLDC apps function like a hybrid between Java SE and MIDlets They do have a static main() function that starts the application and will run until completion Your main class should extend UiApplication UiApplication is the heart of a CLDC app; it provides the following crucial capabilities: An event dispatcher that is responsible for managing all user input and updates to the user... Finally, a GameCanvas offers a useful set of behaviors for developers who are writing games or other applications that demand a high degree of interactivity Screen and Canvas apps are primarily reactive, waiting for notifications and deciding how to respond GameCanvas allows you to directly query the key states and immediately start painting in response This gives you maximum control over application... other than a basic grasp of Java This chapter will walk you through downloading software, setting up your environment, and then give you a quick tour through the basics of BlackBerry app development You may linger, skim, or skip ahead as your patience demands Initial Setup As with any new language or platform, you will need to install some new software and set up your computer appropriately There are... set of sample code that runs as a stand-alone application Here, I fully handle all exceptions, include full package names, and do everything else to show how a real-world application should perform Your Media App Each chapter contains numerous small snippets of code designed to help illustrate particular points The end of each chapter is devoted to creating a useful, stand-alone application that incorporates . Kawahara, Mike Ma, Chad Moats, Sasha Parry, Greg Peters, Ian Peters-Campbell, Brian Pridham, Rajiv Ramanasankaran, Dave Robaska, Tom Seago, Charles Stearns, Young Yoon, and Wayne Yurtin. My apologies. and appreciate the view. 1 Advanced APIs The best BlackBerry apps take advantage of the rich set of advanced APIs available on this platform. The chapters in Part 1 describe some of the. in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names

Ngày đăng: 11/06/2014, 14:26

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN