Contents

Foreword

Preface

Acknowledgments

About the Author

SECTION I: GETTING STARTED

Chapter 1. Overview

1.1. Not Plastics, but Wireless

1.2. MIDP, the Heart and Soul of Mobile Java Technology

1.3. The First Umbrella: JTWI

1.4. A Bigger Umbrella: MSA

1.5. Understanding MSA APIs

1.5.1. Basic MIDP Platform

1.5.2. Advanced Networking

1.5.3. Multimedia

1.5.4. Advanced Graphics

1.5.5. Security and Transactions

1.5.6. Location

1.5.7. Advanced Application Invocation

1.5.8. Advanced Application Services

1.6. Looking beyond MSA 1.0

1.7. What about JavaFX Mobile?

1.8. Summary

Chapter 2. Tools

2.1. Sun Java Wireless Toolkit for CLDC: A Toaster Oven

2.2. NetBeans Mobility Pack: A Gourmet Kitchen

2.3. Eclipse, Too

2.4. Inside a MIDlet Suite

2.5. Building a MIDlet Suite

2.6. The Command Line: A Campfire

2.7. Preprocessors

2.8. Obfuscators

2.9. Emulators

2.10. Device Testing

2.11. Summary

Chapter 3. Quick Start

3.1. Make Something That Runs

3.2. Put Something on the Screen

3.3. Give the User Something to Do

3.4. Get the Source Code Online

3.5. Summary

Chapter 4. Core APIs

4.1. JVM Features You Might Miss

4.2. Strings, Primitive Types, and System Methods

4.3. Threads

4.4. Using Streams for Input and Output

4.4.1. Be Clean

4.4.2. Reading Input Data Completely

4.5. Dates, Collections, and Random Numbers

4.6. Summary

SECTION II: THE LIVES OF MIDLETS

Chapter 5. The MIDlet Habitat

5.1. The MIDlet Life Cycle

5.1.1. AMS, the MIDlet Puppeteer

5.1.2. What about That unconditional Argument?

5.1.3. MIDlets Can Control Their Destinies

5.2. Using the Browser and Making Calls

5.3. Application Properties

5.4. Protection Domains and Signed MIDlet Suites

5.5. Permissions

5.6. The Bottom Line on MIDlet Signing

5.7. Summary

Chapter 6. Starting MIDlets Automatically

6.1. Responding to Network Connections

6.1.1. Dynamic Registration

6.1.2. Static Registration

6.1.3. Finding Incoming Connections

6.1.4. A Push Registry Example

6.2. Running a MIDlet at a Specific Time

6.3. Responding to Content

6.3.1. Invoking a Content Handler

6.3.2. Writing a Content Handler MIDlet

6.3.3. Putting It All Together

6.3.4. Static Content Handler Registration

6.4. Summary

SECTION III: USER INTERFACE

Chapter 7. Basic User Interface

7.1. How to Show Screens

7.2. TextBox, the Runt of the Litter

7.3. Input Modes

7.4. Using Alerts for Notifications

7.5. A Very Quick Introduction to Images

7.6. Putting It Together

7.7. Good for the Old Ticker

7.8. The Whole Story on Commands

7.9. Command Placement

7.10. Summary

Chapter 8. More User Interface

8.1. Lists

8.2. List Selections

8.3. Handling List Events

8.4. Three Lists in One Example

8.5. Advanced List Control

8.6. Using Forms

8.7. Working with Items

8.8. Gauges

8.9. Controlling Item Layout

8.10. Please Drink Form Responsibly

8.11. Item Change Events and Item Commands

8.12. Summary

SECTION IV: GRAPHICS

Chapter 9. Creating Custom Screens

9.1. Getting Information about the Display

9.2. How Painting Works

9.3. Making Colors

9.4. Drawing Lines and Shapes

9.5. Drawing Text

9.6. Measuring Text

9.7. Creating Images

9.8. Drawing Images

9.9. Keeping Resources Small

9.10. Drawing on Images

9.11. Getting Your Fingers on the Bits

9.12. Clipping

9.13. Event Handling

9.14. Controlling Command Placement

9.15. Summary

Chapter 10. Custom Items

10.1. Custom Item Sizing

10.2. Painting

10.3. A Pretty Wait Indicator

10.4. Handling Events in Custom Items

10.5. Internal Traversal

10.6. An Interactive Example

10.7. Summary

Chapter 11. Using the Game API

11.1. Tight Looping with GameCanvas

11.2. Building Scenes with Layers

11.3. Tiled Layers

11.4. Sprites

11.5. Detecting Collisions

11.6. Assembling a Game Scene

11.7. A Blocky Example

11.8. Summary

Chapter 12. Scalable Vector Graphics

12.1. The Simplest Way to Show SVG Content

12.2. Working with Animated Documents

12.3. Digging into an SVG Document

12.4. Displaying an SVG Document on Your Own Canvas

12.5. Creating New SVG Elements

12.6. SVG Event Handling

12.7. Summary

Chapter 13. 3D Graphics

13.1. Creating M3G Files

13.2. Displaying 3D Content the Easy Way

13.3. Doing It the Hard Way

13.4. Summary

SECTION V: STORAGE AND RESOURCES

Chapter 14. Record Stores

14.1. Itsy Bitsy Teenie Weenie Databases

14.2. Working with Record Stores

14.3. Manipulating Records

14.4. Making Queries

14.5. Iterating through Records

14.6. A Place to Keep Your Stuff

14.7. Summary

Chapter 15. Reading and Writing Files

15.1. The Quick Story

15.2. Working with Files and Directories

15.3. Somewhere, a Place for Us

15.4. Finding Pictures, Music, and Other Goodies

15.5. Starting from the Top

15.6. Ask for Permission

15.7. An Example

15.8. Summary

Chapter 16. Contacts and Calendars

16.1. Understanding the PIM API

16.2. Working with Lists

16.2.1. Item Queries

16.2.2. String Array Fields

16.2.3. Labels

16.2.4. Categories

16.2.5. Special Methods for Contact Lists

16.2.6. Special Methods for Calendars and Appointments

16.2.7. Special Methods for To-Do Lists

16.3. Where Do Lists Come From?

16.4. Importing and Exporting

16.5. What’s Supported?

16.6. Don’t Forget Permissions

16.7. Example

16.8. Summary

Chapter 17. Mobile Internationalization

17.1. About Locales

17.2. Using Resources

17.3. Finding Resources

17.4. Resource Inheritance

17.5. Formatting Numbers and Dates

17.6. Sorting Strings

17.7. Take It Out for a Spin

17.8. Summary

SECTION VI: NETWORKING

Chapter 18. The Generic Connection Framework

18.1. Making Connections

18.2. Clean Up

18.3. Use Threads

18.4. Image Loading via HTTP

18.5. Advanced HTTP Techniques

18.6. Tips for Success

18.7. Using HTTPS

18.8. Other Connection Types

18.9. Incoming Connections

18.10. Connection Permissions

18.11. Summary

Chapter 19. Text and Multimedia Messaging

19.1. Why Messaging?

19.2. Sending Messages

19.3. Sending Binary Messages

19.4. Sending Multipart Messages

19.5. Receiving Messages

19.6. A Simple Messaging Application

19.7. Summary

Chapter 20. Bluetooth and OBEX

20.1. Control Your Own Bluetoothiness

20.2. Finding Other Bluetooth Devices and Services

20.3. Cheap Shots

20.4. Making a Client Connection

20.5. Setting Up a Server

20.6. Authorization and Encryption

20.7. What about OBEX?

20.8. Don’t Forget the Push Registry

20.9. Permissions for Bluetooth and OBEX

20.10. The BlueChew Application

20.11. Summary

Chapter 21. XML and Web Services

21.1. Parsing XML

21.2. Creating a Handler

21.3. Parsing RSS

21.4. Parsing XML without JSR 172

21.5. Using WS-* Web Services

21.6. Harness the World

21.7. A Mobile Client for Flickr

21.8. Summary

Chapter 22. Session Initiation Protocol

22.1. Understanding SIP

22.2. Development Tools

22.3. Setting Up a Notifier

22.4. Sending Requests

22.5. Receiving SIP Requests and Sending Responses

22.6. GoSIP and SIPDemo

22.7. Summary

SECTION VII: MULTIMEDIA

Chapter 23. Playing and Recording Sound and Video

23.1. Boring Background Information

23.2. Tones

23.3. Using Players

23.4. Supported Content Types

23.5. Threading and Listening

23.6. Taking Control

23.7. Playing Sampled Audio Content

23.8. Playing Video Content

23.9. The Tone Sequence Player

23.10. The Interactive MIDI Player

23.11. Recording Audio

23.12. Capturing Video

23.13. You Can’t Make Everyone Happy

23.14. About MMMIDlet

23.15. Summary

Chapter 24. Advanced Multimedia

24.1. Image Processing

24.2. Controlling Image Format

24.3. Music

24.4. 3D Audio

24.5. Audio Special Effects

24.6. More Camera Control

24.7. Plain Old Radio

24.8. Summary

SECTION VIII: SECURITY AND TRANSACTIONS

Chapter 25. Smart Cards and Cryptography

25.1. Smart Cards? Really?

25.2. Testing SATSA Applications with the Emulator

25.3. Basic Smart Card Communication

25.4. Smart Card Communication with Java Card RMI

25.5. Generating Signatures

25.6. Managing Certificates

25.7. Cryptography

25.7.1. Using Message Digests

25.7.2. Using Signatures

25.7.3. Using Ciphers

25.8. Summary

Chapter 26. Mobile Payments

26.1. Show Me the Money!

26.2. Matching Applications to Payment Providers

26.3. Editing Payment Provisioning Information

26.4. Security and Payments

26.5. Summary

Chapter 27. Know Where You Are

27.1. The Short Story

27.2. An Even Shorter Story

27.3. Receiving Periodic Location Updates

27.4. Getting Close

27.5. Landmark Databases

27.6. Orientation

27.7. Simulating Device Location

27.8. Summary

Chapter 28. Application Architecture

28.1. Use the Strengths of Java ME

28.2. Use the Strengths of the Internet

28.3. Don’t Cram the Desktop into a Java ME Application

28.4. Developing for Multiple Devices

28.5. Stretchy Screens

28.6. Make It Just Work

28.7. Summary

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.91.254