index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321268636/index/yuan_index.pdf2g...

24
Index 2G networks, 16, 30 2.5G networks, 16, 30 3D mobile games, 12 3G networks, 16 3gpp format, 347 A Active state, for MIDlets, 61 Advanced Graphics Optional Package, 48 Alert class, 125–28 Alert constructors, 125 AlertTypes, predefined, 125 Alpha blending, 235 AM_ADDR, 374, 377 AMS (application management software), 49, 61, 63–64, 96–97, 312 Anchors, listed, 147 Animated transit screens, 284–87 AnimatedWaitViewer package, 284 Animation, 154–56, 157f, 195, 207–09, 216–17 Antenna Ant tasks supported, 491–92t build3.xml file, full listing of, 502–06 bytecode obfuscation, 500–502 directive usage, examples of, 494–97 installing, 490–91 postprocessing, 499–500 preprocessing and postprocessing, need for, 488–89 preprocessor directives, 492, 493t smart linking, 499–500 third-party software requirements, 490 wtkobfuscate task, 500–501 wtkpreprocess task, 492, 497–99 wtksmartlink task, 499–500 Apache Ant automated build example, 93–96 build script, running, 95 build targets, 94–95 core tasks, 83 environment variables, configuring, 83–84 IDE support for, 85, 86 IDEs, integrating scripts into, 95–96 installing, 83 JAR size and JAD attribute, matching, 95 path directory separators, 94 API access permission MIDlet attributes, 103 AppForge, 15 ARGB arrays, image conversion to/from, 165–66 ARGB image data format, 164 assert methods, 520 Audio playback, MIDI player. See MIDI player MIDlet Authenticated devices, 377 Authentication MIDlet attributes, 100–101 Index Yuan.qrk 11/19/04 4:00 PM Page 577

Upload: others

Post on 22-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

  • Index

    2G networks, 16, 302.5G networks, 16, 303D mobile games, 123G networks, 163gpp format, 347

    A

    Active state, for MIDlets, 61Advanced Graphics Optional Package, 48Alert class, 125–28Alert constructors, 125AlertTypes, predefined, 125Alpha blending, 235AM_ADDR, 374, 377AMS (application management software), 49,

    61, 63–64, 96–97, 312Anchors, listed, 147Animated transit screens, 284–87AnimatedWaitViewer package, 284Animation, 154–56, 157f, 195, 207–09, 216–17Antenna

    Ant tasks supported, 491–92tbuild3.xml file, full listing of, 502–06bytecode obfuscation, 500–502directive usage, examples of, 494–97installing, 490–91

    postprocessing, 499–500preprocessing and postprocessing, need

    for, 488–89preprocessor directives, 492, 493tsmart linking, 499–500third-party software requirements, 490wtkobfuscate task, 500–501wtkpreprocess task, 492, 497–99wtksmartlink task, 499–500

    Apache Antautomated build example, 93–96build script, running, 95build targets, 94–95core tasks, 83environment variables, configuring, 83–84IDE support for, 85, 86IDEs, integrating scripts into, 95–96installing, 83JAR size and JAD attribute, matching, 95path directory separators, 94

    API access permission MIDlet attributes, 103AppForge, 15ARGB arrays, image conversion to/from,

    165–66ARGB image data format, 164assert methods, 520Audio playback, MIDI player. See MIDI player

    MIDletAuthenticated devices, 377Authentication MIDlet attributes, 100–101

    Index Yuan.qrk 11/19/04 4:00 PM Page 577

  • B

    bash, 88BCC (Bluetooth Control Center), 377, 386, 390BD_ADDR, 374, 377Binary FM modulation, 373BinaryMessage interface, 308–09Bloggers, 12, 356Bluetooth Host Controller Interface(HCI),

    379–80Bluetooth SIG (Special Interest Group), 373Bluetooth technology

    application testing, in an emulatedenvironment, 409–10

    authenticated devices, 377band operation, 373BCC (Bluetooth Control Center), 377, 386,

    390BTDiscovery application, discussed, 402–09cached devices, 377class of device (CoD), 382–84connectivity confirmations, suppressing,

    102data integrity, 373data throughput, 373distance range, 373Host Controller Interface(HCI), 379–80inquiry procedure, 382–83interference, 374known or preknown devices, 377links, physical and logical, 373paired devices, 377physical channels, 373power classes and consumption, 373–74profiles, 373, 381protocol stack, 379–80as provisioning option, 107Series 40 device support, 30service discovery, 384slots, 373standardization, 373Symbian OS communication layer, 55as wireless networking option, 16, 18

    Bluetooth technology, Java API (JABWT),390, 397–99

    client connection example, 401–02client connection, setting up, 388configuration menu and the BCC, 386connection URL parameters, 390DataElement attribute IDs, 396

    discover services, remote devices, 397–99discovery mode parameter, 391–92exceptions, catching, 387GCF connection interfaces and factory

    classes, 387JSR 82, 384–85L2CAP, connection types for, 387local devices, getting information about,

    391–93network devices, discovery process for,

    393–94PREKNOWN and CACHED devices, 394register services, server connections, 397remote devices, getting information about,

    394–95runtime properties, querying, 391, 392tserver application example, 399–401server connection, setting up, 387–88Service Discovery Database (SDDB), 395–97service records, 395–97stack, initializing with configuration utility,

    385submenu options, 386URL connection strings, 387the UUID (universally unique identifier),

    387–88, 388–89tBluetooth technology, piconets

    active member address (AM_ADDR), 374, 377Bluetooth device address (BD_ADDR), 374,

    377connection modes, 377master devices and slave nodes, 374–76scatternets, 375–76sniff interval, Nokia, 377

    Bluetooth technology, securityauthentication process, 378–79device authorization, per-use basis, 379encryption, 379pairing process, 378

    Boeing, 7bootclasspath options, 87–88Borland Enterprise Studio for Mobile, 85Borland JBuilder, 85Borland Mobile Studio, 85Browser applications. See also WAP

    browsers/gatewaysauthoring content, Nokia devices, 564–65content download and upload, 567–69making a phone call, 573Nokia browser developer tools, 569–70,

    571f

    578 Index

    Index Yuan.qrk 11/19/04 4:00 PM Page 578

  • phone book entries, adding, 574sending a DTMF tone, 573–74skill migration issues, 14thin-client application paradigm, 560–61wallet, 574–75WML versus XHTML MP, 565–67WMLScript, 567

    BTDiscovery application, discussed, 402–09build3.xml file, 502–06Byte arrays, 242, 245ByteArrayInputStream class, 245ByteArrayOutputStream class, 245Bytecode obfuscation, 500–502

    C

    Cached devices, 377, 394CaliberRM, 85cancel() method, 75, 76Canvas class, 145Canvas object, 64Canvas.hideNotify() method, 182Canvas.showNotify() method, 182 tag, 40, 41fCDMA networks, 16, 30Certificate interface, 303Chain of responsibility pattern, 296Chat example application

    native SMS versus chat MIDlet suite, 315receiving messages, 320–23sending messages, 317–20SMS emulation, 315–17

    checkPermission() method, 64, 102Choice interface, static constants, 121ChoiceGroup class, 137–39Class of device (CoD), 382–84classpath option, 87–88Clipping, 147, 174, 221, 222closeRecordStore() method, 248, 249collidesWith() method, 203–04Collision detection, 203–04colorSpecifier argument, 157–58Command buttons, 69Command class constructors, 116Command object, 64–65, 70, 115–16, 116–17,

    158–59Command placement, 158–60Command types, 117commandAction() method, 69, 74, 115–16,

    154Command line

    Ant build script, running, 95compiling command, 87–88shells, 88tools, 86window, bringing up, 88

    CommandListener interface, 65, 69, 114–16,423–24

    CommandListener.commandAction()callback, 65

    Command-related methods, 116, 185CommConnection interface, 268Com.nokia.mid.ui, 184–87Compiler errors, 510–11Compiling command, 87–88Concept SDKs, 81, 515Configurations, 47, 48Connected Device Configuration (CDC), 48Connected Limited Device Configuration

    (CLDC), 48Connection interface, 262–63Connector class, 261–63Connector.open()static method, 261, 263Consumer applications, 6Cookies. See also HTTP headers

    client-side tracking, 289–92server-side, 288–89

    Copyright protection, 12createAnimatedTile() method, 216–17createPlayer() method, 329–33CRM (customer relationship management)

    software, 7Crossplatform, defined, 46csh, 88CSS (cascading style sheets), 41CustomItem class, 167–71Cyclic Error Check (CRC), 373Cygwin open source project, 88

    D

    Data storage. See also Photo Viewer examplebyte arrays, 242, 245persistent storage, 241–42Random Access Memory (RAM), 241read-only storage, JAD and JAR manifest

    files, 241–42remote storage, 242

    Index 579

    Index Yuan.qrk 11/19/04 4:00 PM Page 579

  • Data storage (cont.):RMS (Record Management System), 242,

    247. See also RecordStoreserialization, Java objects, 242, 244–47

    Data synchronization, 460–61Datagrams, 268–69DataInputStream, 264DataInputStream object, 245DataOutputStream, 264DataOutputStream object, 245DataSource class, 332DateField class, 136–37Debugging. See also J2MEUnit framework;

    UI testing guidelines; Unit testingcommon errors, 510–11Exception.printStackTrace() method,

    514Java Debug Wire Protocol (JDWP), 511Java Virtual Machine Debugger Interface

    (JVMDI), 511MIDPLogger, 515–19print statements, 512–15System.out.println() method, 513–14

    Dedicated Inquiry Access Code (DIAC),382–83

    defineCollisionRectangle() method,204

    delay argument, 76delayUntilNextFrame() method, 195, 223Design patterns

    data synchronization, 460–61Model-View-Controller (MVC) pattern,

    423–25object creation, 434Singleton pattern, 439static class pattern, 434–35

    destroy() method, 70destroyApp() method, 62, 70Destroyed state, for MIDlets, 61Develop-and-optimize process. See also

    DebuggingAPI availability, 480–81enabler technologies, selecting, 477the GCF, 482Heap memory, 480JAR size limit, 479–80languages and cultures, 483the MMAPI, 481–82RMS space, 480screen characteristics, 478–79Series 40/Series 60 scalability, 477–78

    target application, building a genericversion, 477

    target devices, listing, 478thread behavior, 482UI component behavior, 482

    Developer skill migration pathsJava desktop developers, 15Java server-side developers, 14–15Visual Basic corporate developers, 15

    Developer tools. See J2ME developmenttools

    Developing Series 60 Applications: A Guidefor Symbian OS C++ Developers(Edwards and Baker), 15

    Device controls, advanced, 156–58Device SDKs. See SDKsDeviceControl utility class, 186Digital Rights Management (DRM), 26Digital signaturesCertificate interface, 303and HTTPS, 301–02JAD file, 90, 97MIDlet suite authentication, 100–101

    Digital voice and analog data networks (2Gnetworks), 16

    DirectUtils utility class, 186DiscoveryAgent class, 393DiscoveryListener class, 393Discrete event simulation, 226Display class, 64, 112–13Displayable class, 113–16, 423Displayable object, 64–65, 113, 115, 424Display.getDisplay() method, 112DoCoMo, 12Double-buffering, 146, 191, 195–97, 221Drawing methods, Graphics class, 146–47drawPixels() method, 187drawPolygon method, 187drawRGB() method, 166DTMF tones, sending, 573–74duration argument, 332DVD players, 6

    E

    Eclipse, 85–86Embedded databases, 422Enhanced Data Rates for Global Evolution

    (EDGE) networks, 16, 30

    580 Index

    Index Yuan.qrk 11/19/04 4:00 PM Page 580

  • Ericsson, 373Event strings, 336

    F

    FedEx package tracking, 7File Transfer Profile (FTP), 381fillPolygon method, 187Fish game example

    animating fish, 212–13animation speed, regulating, 223–24background, animated TiledLayer, 217–20collision detection, 205–07drawing attached layers to the screen,

    221–22fish constructor, 210layers, attaching to a LayerManager, 221loading fish image, 212manta rays, adding, 230–34move() method, 201–02pictured, 196freadInput() method implementation, 199starfish, adding, 226–29

    flushGraphics() method, 195–97, 221–22Fonts, 148Form class, 130Form object, 64, 69Forum Nokia

    device specification documents, 32Mobile Media API Technical Note, 331NDS, downloading, 78SDKs, downloading, 80total device storage information, 247value chain management, 11

    Forum Nokia PRO, 11, 56Forward Error Correcting (FEC), 373Foundation Profile, 48Frames, 202, 203f, 207–09, 224Fujitsu, 53FullCanvas class, 184–86

    G

    Game API. See also GameCanvas; Sprites;TiledLayer

    animation speed, regulating, 223–24LayerManager, 206, 220–21

    layers, 200–201z-order, 220

    Game key states, 198GameCanvas

    callbacks, suppressing unnecessary, 199full-screen mode, 197game actions versus literal keys, 197–98Graphics buffer, 195–97main game processing, 191, 193–95simultaneous key presses, 199

    Games. See also Fish game example; GameAPI; Trivia game example

    action key mapping, 150–51, 197–98animation speed, regulating, 223–24backlight, 235components, 191discrete event simulation, 226double-buffering, 191, 195–97, 221frames, dropping, 224the game loop, 190GameCanvas class, 191high frequency sampling, 225LCDUI low-level API, 111–12menu, placing MIDlet suite under, 105–06MIDlet, skeleton code for, 191–92multiplayer and 3D visual, 12simultaneous key presses, 199splash screens, 191, 192thread, for main game loop, 193–95transparency and pixel arrays, 235transparent images, importance of, 164usage model, 415

    Garbage collection, 45–46, 223, 241, 434Gauge object, 139–42GaugeWaitViewer package, 279gb2312 encoding, 265General Inquiry Access Code (GIAC), 382, 391General Packet Radio Service (GPRS), 16Generic Access Profile (GAP), 381Generic Connection Framework (GCF) API.

    See also Cookies; HTTP headers;HttpClient; HttpConnectioninterface; Photo Viewer example,networked

    Certificate interface, 303CommConnection interface, 268Connection interface, 262–63connectivity, importance of, 260Connector class, 261–63Connector.open()static method, 261, 263HttpsConnection interface, 266, 301–02

    Index 581

    Index Yuan.qrk 11/19/04 4:00 PM Page 581

  • optimizing, 482SecureConnection interface, 267SecurityInfo interface, 302serial ports, retrieving list of, 268ServerSocketConnection interface, 267SocketConnection interface, 266static factory methods, use of, 261supported protocols, 261, 263UDPDatagramConnection interface, 268–69URL schemes, 261–62WMA integration, 309

    Generic Object Exchange Profile (GOEP), 381Generic visual thread framework. See also

    Trivia game example; Worker threadscode for use of, 451components, 450fvisual threads, examples, 451fWaitScreen class, 453–54WorkerRunnable interface, 452WorkerThread class, 452

    getAppProperty() method, 63, 69getCurrent() method, 113getFont() method, 148getFrameSequenceLength() method, 208getKeyStates() method, 197–98getPixels() method, 187getRawFrameCount() method, 208GIF images, 133Graphics class, 146–47Graphics.copyArea() method, 166Graphics.drawRegion() method, 166GSM Data networks, 16, 309

    H

    Header Error Check (HEC), 373High frequency sampling, 225Hold mode, 377HSQLDB, 421–23HTML pages, retrieving, 264–65HTTP authentication, 98HTTP GET operation, 264HTTP headers. See also Cookies

    authentication protocol, 295handlers, implementing, 298–99HttpClient framework, 295–98querying, 265–66session tracking, 287–88

    HTTP POST operation, 98, 103, 264

    HttpClientchain of responsibility pattern, 296framework, 295–98header handlers, implementing, 298–99utility, 295–301

    HttpConnection interfacedata streams, opening, 264GET and POST operations, 264HTML pages, retrieving, 264–65HTTP headers, 265–66metadata, 265status codes, 265text versus encoded content, querying, 265URL scheme, 264

    HttpsConnection interface, 266, 301–02

    I

    IBMBluetooth SIG (Special Interest Group), 373mobile sales solutions, 7WMQe, 307

    ibus//Mobile, 307IDEs (Integrated Development Environments)

    Ant scripts, integrating, 95–96Apache Ant support, 85, 86Borland JBuilder, 85Eclipse, 85–86NDS integration with, 78Sun Java Studio, 85visual RAD tool support, 15

    Image transforms, 209–10Image transparency, 164, 165fImageItem class, 131–33, 160ImageWaitViewer package, 280–82ImageWaitViewer2 package, 282Implicit lists, 121–23Information delivery technologies

    customer adoption of, 8innovations in, listed, 4–5technology diffusion curve, 8–9

    Infrared (IrDA) networks, 30, 55, 107, 268InputStream class, 244, 332InputStreamReader class, 245Intel, 373Interactive gauges, 140International Data Corporation (IDC), 12ISM band, 373iso-2022-jp encoding, 265

    582 Index

    Index Yuan.qrk 11/19/04 4:00 PM Page 582

  • isShown() method, 113Item abstract class, 130–45Item commands, 142–44Item subclassesChoiceGroup class, 137–39DateField class, 136–37exclusive ChoiceGroup, 137–38Gauge object, 139–42gauge states, listed, 140input constraints, TextField class, 133,

    134tinteractive and noninteractive gauges, 140mode argument, DateField class, 136popup ChoiceGroup, 137–38StringItem and ImageItem classes,

    131–33text input modes, 133, 135tTextField class, 133–35, 136–37

    ItemCommandListener interface, 142ItemStateListener interface, 144

    J

    J2ME development tools. See IDEs(Integrated Development Environments);J2ME Wireless Toolkit (J2ME WTK);Nokia Developer’s Suite (NDS) for J2ME

    J2ME Personal Profile, 37J2ME (Java 2 Micro Edition) technology. See

    also MIDP (Mobile Information DeviceProfile)

    architecture, 47–48CDC, 48CLDC, 48configurations, 47, 48KVMs, 46, 48optional packages, 47, 48profiles, 47, 48smart clients, developing, 15, 26Web Services API, 466

    J2ME Wireless Toolkit (J2ME WTK), 81–82,85

    J2MEUnit frameworkassert methods, 520TestCase class, 521–23TestRunner class, 525TestSuite, 523–24

    JAD (Java application descriptor) file, 96,312. See also MIDlet attributes

    application behavior, customizing, 484attributes, required versus custom, 90digital signatures, 90, 97execution triggers, registering, 73generating with NDS, 90–92MIME type association, OTA provisioning,

    98and OTA provisioning, 96property values, retrieving, 63, 90read-only storage, 241–42RMS storage required, specifying, 247WMA, permissions related to, 314t

    jar command, 89–90JAR manifest file. See also MIDlet attributes

    application resource files, 88creating, 89–90generating with NDS, 90–92MIME type association, OTA provisioning,

    98and OTA provisioning, 96property values, retrieving, 63, 90read-only storage, 241–42size limit, optimizing, 479–80size, matching with JAD attribute, 95

    Java AWT (Abstract Widget Toolkit), 48Java bootstrap classes, 87Java Community Process (JCP), 26, 49Java Debug Wire Protocol (JDWP), 511Java Integrated Development Environments.

    See IDEsJava Native Interface (JNI), 48Java objects serialization, 242, 244–47Java Portlets, 14Java runtime, 15, 78Java Specification Requests (JSRs), 49Java Store Procedures, 423Java technology

    benefits of, 45crossplatform, defined, 46garbage collectors, 45–46Java 2 Platform, 46Java Virtual Machines (JVMs), 46, 61main()method, 61open interfaces, 48–49WORA versus Java Everywhere, 46

    Java Virtual Machine Debugger Interface(JVMDI), 511

    javac utility, 87java.io package, 244–45JavaOne conferences, 46JavaServer Faces, 14

    Index 583

    Index Yuan.qrk 11/19/04 4:00 PM Page 583

  • javax.microedition.io package, 261javax.microedition.rms package, 247JBuilder Mobile Edition, 85JCP Executive Committees (ECs), 49JDBC (Java DataBase Connectivity) API, 48,

    421JPEG images, 133JTWI (Java Technology for the Wireless

    Industry) specification, 50

    K

    Key codes, 149–50Key-event handlers, 149, 152–54Kilobyte Virtual Machines (KVMs), 46Known devices, 377. See also Preknown

    devices

    L

    LayerManager, 206, 220–21Layers, 200–201, 220–21layout attribute, 160Layout management, 160–63Lead software, 30Life cycle states, 63f, 334–36Limited Inquiry Access Code (LIAC), 382,

    392–93List class, 120–25List constructors, 121listRecordStores() static method, 248listType parameter, 121LocalDevice class, 391–93Logic errors, 511Logical Link Control and Adaptation Protocol

    (L2CAP), 379, 381, 387

    M

    main() method, 61Main-window UI paradigm, 423Manager class

    data stream and MIME type,createPlayer() method, 330–31

    DataSource, createPlayer() method, 332

    duration argument, 332media types and protocols, querying, 332musical notes, tone frequencies and MIDI

    values, 332, 333tplaying tones, 332–33SourceStream versus InputStream, 332system properties, retrieval of device, 333,

    334tURI locator strings, createPlayer()

    method, 329–30manipulation argument, 187Media capture. See Multimedia blog

    applicationMedia time, 337MediaPlayer MIDletCanvas, video playback on, 354–55capabilities, 347Form, video playback on, 352–54initializing players, 348menu, 347System Properties menu action, 347video playback, 350–52wav audio file playback, 348–50worker thread technique, 347–48

    MessageConnection interface, 309–10MessagePart class, 324–25MIDI player MIDlet

    code, 339–42MIDIControl, 346objectives, 338–39PitchControl, 346player controls, 344–46player events, 343–44player initialization process, 342–43RateControl, 345StopTimeControl, 345TempoContol, 345VolumeControl, 345

    MIDlet attributesAPI access permission, 103authentication, 100–101Games menu, placing MIDlet suite under,

    105–06notification and reporting, 105, 106optional informational, 100push-related, 100required, 99size, matching JAR with JAD attribute, 95

    MIDlets. See also JAD (Java applicationdescriptor) file; JAR manifest file; MIDletattributes; Replaceable modules

    584 Index

    Index Yuan.qrk 11/19/04 4:00 PM Page 584

  • the AMS, 49, 61, 63–64API specification, 49compiling, 87–88deployment options, in the NDS, 106–07exiting, 69–70life cycle states, 63fMIDP Push Registry, 72–73MIDP UI, 64–65multithread programming, 73–74MVC pattern, 423–25preverification process, 88provisioning options, 106–07. See also OTA

    (over-the-air) provisioningresource files, copying, 88RMS storage required, specifying, 247sample code, minimal MIDlet, 49–50state changes, 61–62, 182states, listed, 61suite authentication, 100–101trusted versus untrusted, 90, 101–02, 312UI states, background and foreground,

    62–63, 182UI thread, 74

    MIDletStateChangeException, 70MIDP (Mobile Information Device Profile).

    See also MIDlet attributes; MIDlets1.0 versus 2.0, 50the AMS, 49, 61, 63–64and J2ME architecture, 48JBuilder Mobile Edition, 85optional packages, 50, 51–52tPush Registry, 72–73security model, 101–02UI basics, 64–65

    MIDP Generic Connection Frameworkspecification, 72

    MIDP LCDUI. See also Nokia UI APIextensions

    Command objects, mapping, 116–17Display class, 112–13Displayable class, 113–16low-level API, 111–12observer design pattern, 114–16sample application, API demo screens,

    118–20screen display size, querying, 113–14screen-switch, 423–24title and ticker, manipulating, 114

    MIDP LCDUI, advanced conceptsARGB arrays, image conversion to/from,

    165–66

    ARGB image data format, 164background state, Series 60 devices, 182color schemes, specifying, 157–58Command objects, mapping to soft keys,

    158–60commands, display order rules, 158–60custom item image button example, 168–71CustomItem class, 167–71device controls, 156–58Graphics.drawRGB() method, 166image sizes, querying the best, 158images, drawing parts to specified regions,

    166layout management, 160–63layout options example, 161–63NDS MIDP UI designer, 182–84options menu, allocating soft keys for,

    159–60phone vibration, 156–57pixel manipulation, 166row alignment, vertical and horizontal, 160row breaks, 161screen backlight, flashing, 156–57screen, querying physical characteristics of,

    157scrollable text screen example, 176–78space, allocating to items and rows, 161splash screens, 171–74, 192text wrap, automatic, 178–81transparency, 164, 165fvirtual Canvas, clipping and scrolling,

    174–78MIDP LCDUI, high-level API

    alarm alert, code, 126–27Alert class, 125–28Alert constructors, 125alert, specifying the duration of, 126AlertTypes, predefined, 125Choice interface, static constants, 121default command event, setting, 121–22Form class, 130image size, 121, 128implicit lists, 121–23introduced, 111Item abstract class, 130–45. See also Item

    subclassesItem commands, 142–44item state changes, 144–45List class, 120–25List constructors, 121listType parameter, 121

    Index 585

    Index Yuan.qrk 11/19/04 4:00 PM Page 585

  • multiple selection list, code, 124–25Screen abstract class, 120–30selected options, retrieval of, 122selection flags, setting, 122text box demo, code, 128–30text, programmatically altering, 128TextBox class, 128–30TextBox constructor, 128TextBox, retrieving information from, 128TextField class, 128

    MIDP LCDUI, low-level API, 145–46anchors, listed, 147animation example, 154–56, 157fCanvas class, 145clipping areas, specifying, 147double-buffering, 146drawing methods, Graphics class, 146–47fonts, 148game keys, 150–51Graphics class, 146–47key codes, 149–50key handler example, movable text, 152–54key-event handlers, 149paint() method, 145–46, 154, 167pointer events, capturing, 150, 152stroke-style constants, Graphics class, 146

    MIDPLogger, 515–19MIME plugins, 13MIME types, MMAPI implementation, 330–31MMAPI (Mobile Media API). See also

    Manager class; Player interfacearchitecture, 329audio playback, MIDI player. See MIDI

    player MIDletControl interface, 337–38implementation, querying, 333, 334tmedia capture. See Multimedia blog

    applicationmedia playback, audio and video. See

    MediaPlayer MIDletoptimizing, 481–82

    MMS (Multimedia Messaging Services)application interaction, 41–42architecture, 41, 42fasynchronous model tradeoff, 43benefits and opportunities, 531infrastructure, 531–33message delivery sequence, 41MMSC (Multimedia Messaging Service

    Center), 41, 531, 533, 545–46mobile entertainment, 12

    Nokia device characteristics, 536–38open standard technologies, 26pervasiveness of, 44SMIL. See Synchronized Multimedia

    Integration Language (SMIL)uses and support for, 530–31

    MMS application modesoriginating, 535originating-terminating, 535peer-to-peer messaging, 534terminating, 534, 535f

    Mobile advantages, 5–6Mobile applications

    open standards, importance of, 25social design considerations, 20

    Mobile commercebrowser and messaging applications, 14–15consumer applications, 6enterprise applications, 12–13government sectors, 8information delivery technologies, 4–5Internet, effects of, 5killer application groups, 11–13sales and workplace automation, 7–8strategies, 9supply chain management, 6–7technology diffusion curve, 8–9user needs, 5value chain, 10–11

    Mobile development platforms. See alsoNokia Developer Platforms

    developer skill migration, 13–14migration path issues. See Developer skill

    migration pathsproviders, in value chain, 11

    Mobile devicescustomization of, 5limitations and solutions, 16, 17–18tmanufacturers, role in value chain, 11market potential, 5

    Mobile enterprise applications, 12–13Mobile entertainment. See also Games

    applications, types of, 12digital content download, 6digital content downloads, 12

    Mobile Media API Technical Note, ForumNokia, 331

    Mobile networks. See Wireless networkingtechnologies

    Mobile value chain, 10–11Mobile workers

    586 Index

    Index Yuan.qrk 11/19/04 4:00 PM Page 586

  • enterprise tasks of, 13number of, in U.S. and Europe, 12

    Model-View-Controller (MVC) pattern,423–25. See also Trivia game example

    Moore’s law, 8, 25Motorola, 53move() method, 200–201MP3 players, 6Multimedia blog application

    audio capture, 361–63blog entries, submitting, 363–64blog servlet, 364–68camera viewfinder, Series 60 emulator, 357,

    359fimage capture, 357–61process overview, 355–56

    MultipartMessage class, 324–25Multiplayer games, 12Multiple selection lists, 124–25Multithread programming, 73–74

    N

    NetBeans open source project, 85Network traffic monitor, 277–78newMessage factory method, 310Nokia

    Bluetooth SIG (Special Interest Group), 373mobile sales solutions, 7sniff interval, 377

    Nokia Connectivity Framework, 315Nokia Developer Platforms. See also Series

    40 Developer Platform; Series 60Developer Platform

    application certification, 56architecture, 27–28develop-and-optimize approach, 27–28. See

    also Develop-and-optimize processdeveloper skill migration, 14devices, number sold in 2004, 24, 55–56four technology pillars, 24Java developer’s perspective, 27fas market leader, 55–56marketing assistance, 56open standard technologies, listed, 26pre- and post-2004 released devices, 28Series 80, 37Series 90, 38, 53–54support and resources, 56

    thin-client application paradigm, 44Nokia Developer’s Suite (NDS) for J2ME

    deployment options, MIDlet suites, 106–07digital signatures, 100–101, 103, 104fdownloading and installing, 78emulators, testing and running with, 92IDE integrated edition, 78JAR manifest and JAD files, generating,

    90–92JDK software requirement, 78major features, 79–80OTA process, testing, 97SDKS, pre-installed, 80. See also SDKsstandalone application, 78viewport, 184, 185fvisual UI designer, 182–84Windows and Linux editions, 78

    Nokia Developer’s Suite (NDS) for MMS,542–45

    Nokia devices. See also Series 40 devices;Series 60 devices

    6800, 137700 multimedia phone, 12advanced controls, 156–58Communicators, 13, 37, 54computing power of, 8JPEG image support, 133MMS, characteristics for, 536–38N-Gage game deck, 12, 15, 35PNG image support, 133Series 80, 15Series 90, 15system properties, retrieval of, 333, 334t

    Nokia Mobile Server Services Libraryconnection configuration, Nokia API, 547–48connection configuration, SAMS API, 548instantiating the driver, Nokia API, 546–47instantiating the driver, SAMS API, 547MMSC, direct access via Java API calls,

    545–46receiving messages, Nokia API, 555receiving messages, SAMS API, 556–57simple messaging, Nokia API, 549–50SMIL message, Nokia API, 550–51SMIL message, SAMS API, 551–53SMS message, SAMS API, 553–54

    Nokia Networks, 13Nokia Tradepoint program, 56Nokia UI API extensionsDeviceControl utility class, 186DirectGraphics class, 186–87

    Index 587

    Index Yuan.qrk 11/19/04 4:00 PM Page 587

  • DirectUtils utility class, 186drawPixels() method, 187drawPolygon() and fillPolygon()

    methods, 187FullCanvas class, 184–86getPixels() method, 187manipulation argument, 187

    Noninteractive gauge, 140, 279–80Normal mode, 377Notification and reporting MIDlet attributes,

    105, 106notifyDestroyed() method, 62, 64, 70notifyPaused() method, 62, 63

    O

    Object Exchange Protocol (OBEX), 380, 381Object management. See also Trivia game

    exampleback screen stack, 447factory methods, 439object pools, 443–44Singletons, 439static class, 434–38

    Object Push Profile (OPP), 381Occasionally connected application

    paradigm, 417OMA Client Provisioning, 26Open Mobile Alliance (OMA) standard, 26openDataInputStream() method, 264, 266,

    268openDataOutputStream() method, 266,

    268openRecordStore() method, 248, 249OptimizeIt, 85Optional informational MIDlet attributes, 100Options menu, allocating soft keys, 159–60Originating mode, MMS, 535Originating-terminating mode, MMS, 535OTA (over-the-air) provisioning. See also

    MIDlet attributesinstallation events, notification and

    reporting of, 103, 105MIME type association, JAD/JAR files, 98NDS, testing process using, 97process steps, 96–97server setup, 98

    Otis, 7

    OutputStream class, 244OutputStreamReader class, 245

    P

    Packet-switch networks (2.5G networks), 16paint() method, 145–46, 154, 167, 176Paired devices, 377Panasonic, 53Park mode, 377Path directory separators, 94pauseApp() method, 62, 63Paused state, for MIDlets, 61PBP (Personal Basis Profile), 48Peer-to-peer messaging mode, MMS, 534Persistent storage, 241–42Photo Viewer example

    automated build with Ant, 93–96automatic slide show, running, 73–77code, 66–68, 70–72, 76–77compiling, 87–88data serialization, 246–47End key versus Exit command, 69–70exiting, 69–70file structure and subdirectories, 86–87the JAD file, 90–92JAR manifest and JAD files, generating,

    90–92MIDlet constructor, 69multithreading, 73–74packaging, 89–90preverifying, 88primary functionality, 65the process, 65, 66f, 69project content, prior to building, 87record store, storing ImageAttribute data

    in, 250–51resource files, copying, 88search and sort, 255–56test and run, 92Timer class, 75–76TimerTask class, 75TimerTask objects, scheduling, 75–76

    Photo Viewer example, networkedanimated transit screen, 284–87application screen, pictured, 277fFetchWorker, 273–77, 292–94HTTP cookies, 288–92

    588 Index

    Index Yuan.qrk 11/19/04 4:00 PM Page 588

  • HTTP header handlers, 296–99HTTP protocol, use of, 269noninteractive gauge, 279–80objectives, 269PhotoServlet, 270–72, 288–89PhotoViewer, 272–73servlet/MIDlet communication, 269session based photo viewer, pictured,

    295fstill-image transit screen, 280–82still-image transit screen, improved, 282–84tight coupling, 269–70

    Piconets. See Bluetooth technology, piconetsPixel manipulation, 166Pixel refresh rate, 223Pixel-level collision, 203–04platformRequest() method, 64Player interface

    event strings, 336implicit state changes, 336life cycle states, 334–36loops, setting number of, 337media files, querying the status of, 336–37media time, 337PlayerListener interface, 336resource consumption, 334synchronizing players, 337

    Player.close() method, 335Player.deallocate() method, 335PlayerListener interface, 336Player.prefetch() method, 335Player.realize() method, 335Player.start() method, 335Player.stop() method, 335Pleumann, Jörg, 490PNG images, 133, 235Pointer events, capturing, 150, 152Postprocessing, 499–500PP (Personal Profile), 48Preknown devices, 377, 394Preprocessing and postprocessing, 488–89.

    See also AntennaPreprocessor directives, 492, 493tPreverification process, 88processAlpha argument, 165Profiles, 47, 48, 373, 381Psion, 53Public keys, 301–02Push Access Protocol (PAP), 572Push Proxy Gateway (PPG), 571–72

    PushRegistry class, 72–73Push-related MIDlet attribute, 100

    R

    Random Access Memory (RAM), 241Rapid Application Development (RAD) tools,

    15Read-only storage, JAD and JAR manifest

    files, 241–42readXXX() method, 245RecordComparator, 254–55RecordEnumeration, 252–53RecordFilter, 253–54RecordListener interface, 251–52RecordStore. See also Photo Viewer

    examplebrowsing, using RecordEnumeration,

    252–53closing, 248, 249creating, 247–48debugging output, redirecting with

    MIDPLogger, 516filtering, using RecordFilter, 253–54listeners, 251–52listing stores, 248record IDs, 249–50records, manipulating, 249shared, creating and accessing, 248size limitations, 247size, version, and last modified date,

    querying, 249sorting, using RecordComparator, 254–55

    Rectangle collision, 203–04Reference pixels, 209Refresh rate, 223registerAlarm() method, 72registerConnection() method, 72–73Remote storage, 242RemoteDevice class, 394repaint() method, 145, 154, 167Replaceable modules

    the build workflow, 487fclass, replacing part of, 487–88customized JAD files, 484purpose for using, 483–84resource file modules, 484–85source code modules, 485–87

    Index 589

    Index Yuan.qrk 11/19/04 4:00 PM Page 589

  • Required MIDlet attributes, 99resumeRequest() method, 62, 63RFCOMM protocol, 380, 381Ringtones, 12RMI (Remote Method Invocation) Optional

    Package, 48RMS (Record Management System), 242,

    247, 480. See also RecordStoreRow alignment, vertical and horizontal, 160RPC protocol, 456, 460run() method, 75Runtime errors, 511

    S

    safeShutdown() method, 70Samsung, 53Sanyo, 53SAP, 7scanlen argument, 165Scatternets, 375–76schedule() method, 76scheduleAtFixedRate() method, 76scheduledExecutionTime() method, 75Screen abstract class, 120–30Screen-switch navigation model, 423–24Screen-switch paradigm, 423Scrolling, 174–78SDKs

    concept SDKs, 81installing, 80–81internal file structure, 82–83JBuilder Mobile Edition, 85network traffic monitor, 277–78preverify program, 88

    SecureConnection interface, 267SecurityInfo interface, 302SELECT_COMMAND, 121Sendo, 53September 11, 2001, 8Serial port connectivity, 268Serial Port Profile (SPP), 381Serialization, Java objects, 242, 244–47Series 40 Developer Platform

    devices covered, 28enabler technologies and APIs supported,

    30font sizes, standard Latin, 148

    J2ME technology, use of, 15, 30lead software, installing, 30native client applications, 29–30network traffic monitor, 277–78Nokia Connectivity Framework, 315software stack, 29–30target market, 28

    Series 40 devices. See also MIDI playerMIDlet

    alert screen, 127fBluetooth stack, activating, 385fbrowser, launching the, 64connectivity protocol support, 30exclusive ChoiceGroup, 138fextensions, 30gauges, 141fimplicit list, 122findividual elements, interaction with, 32,

    34fItem command for the StringItem, 143fLCD display, 30menu hierarchy, 32, 33fMIME types supported, 331multiple selection list, 124fOptions soft key, use of, 33fpictured, 31fpopup ChoiceGroup, 138fRMS storage, 247scrollable text screen, 177fStringItem and ImageItem, 132ftext wrap, automatic, 181fTextField and DateField, 135ftitle and ticker, 114fuser interface, 32–34

    Series 60 Developer Platformversus Series 60 Platform, 35software stack, 35Symbian OS C++ technology, use of, 15, 35,

    53Series 60 devices. See also MediaPlayer

    MIDlet; Multimedia blog applicationalert screen, 127fbackground MIDlet, 182browser, launching the, 64data storage, 36exclusive ChoiceGroup, 138fgauges, 141fGIF image support, 133implicit list, 122fkeypad-based, Symbian, 53

    590 Index

    Index Yuan.qrk 11/19/04 4:00 PM Page 590

  • multiple selection list, 124fnumbers sold in 2004, 34pictured, 36popup ChoiceGroup, 138fRMS storage, 247scrollable text screen, 177fStringItem and ImageItem, 132ftext wrap, automatic, 181fTextField and DateField, 135ftitle and ticker, 114fuser interface, 35–36

    Series 80 Developer Platform, 37Series 90 Developer Platform, 38, 53–54Server API for Mobile Services (SAMS), 546ServerSocketConnection interface, 267Service Discovery Database (SDDB), 395–97Service Discovery Protocol (SDP), 379, 381Service Indication, 572Service Loading, 572–73Service patterns, 397Service-Oriented Architecture (SOA), 307ServiceRecord class, 396serviceRepaints() method, 145Session key, 302SessionViewer package, 287setAnimatedTile() method, 217, 220setCell() method, 215, 216set-cookie header, 288, 289setCurrent() method, 64, 113setFrameSequence() method, 208setFullScreenMode() (Boolean) method,

    197setInitialInputMode() method, 133setPosition() method, 200setSelectCommand() method, 121setSocketOption() method, 266setStaticTileSet() method, 215setTimeout() method, 125–26setTransform() method, 209, 210Short range radio networks, 16, 18showImage() method, 69Siemens, 53Singleton objects, 46, 112, 391Singleton pattern, 439Slots, 373Smart linking, 499–500SMS (Short Message Service), 13, 308, 309,

    315–17Sniff mode, 377SocketConnection interface, 266

    Soft keys, mapping, 158–60Sony Ericsson P800, 53–54SourceStream class, 332Splash screens, 171–74, 191, 192SplashScreenThread class, 171–72, 174Sprites

    animation, 207–09collision detection, 203–04constructors, 202frame sequencing, 208frames, numbering and storage, 202, 203f,

    207–09images, loading, 212nonanimated versus animated, 202reference pixels, 209sequence length versus frame count, 208transforms, 209–10, 211t

    stackmap attribute, 88startApp() method, 62, 66, 69, 171–72StarTeam, 85Static factory methods, 261, 439Still-image transit screen, 280–84StringItem class, 131–33Stroke-style constants, Graphics class, 146Sun Java Studio, 85Sun Microsystems, 46, 56, 292Supply chain management, 6–7Symbian OS C++ technology

    API, 53application utility layer, 55architecture, 54–55base system APIs, 55communications, 55evolution of, 53GUI framework and services, 55keyboard-based, 54keypad-based, 53low-level device features, accessing, 15N-Gage game deck games, 35as open standard, 26OS, described, 53partners and licensees, 53pen-based, 53–54product lines, 53–54

    Synchronization pattern, 460–61Synchronized Multimedia Integration

    Language (SMIL)capabilities and functions of, 43, 538, 539fdocument structure, 539layout management, 540–42

    Index 591

    Index Yuan.qrk 11/19/04 4:00 PM Page 591

  • media elements, 540, 541tmusic slide show example, 542playback control elements, 539–40transition effects, 542

    SyncML, 14System.gc(), 46, 223, 241System.out.println() method, 513–14

    T

    Technology diffusion curve, 8–9Telephony Control Protocol Specification

    (TCS binary), 380Terminating mode, MMS, 534, 535fTestCase class, 521–23TestRunner class, 525TestSuite, 523–24Text wrap, automatic, 178–81TextBox class, 128–30TextField class, 128, 133–35, 136–37TextMessage interface, 308–09Thawte, 101, 302Thin-client application paradigm, 44, 560–61Third-Generation Partnership Project (3GPP),

    26Thread, defined, 74TiledLayer

    animation, slowing, 220background images, creating, 213, 215fcell animation, 216–17constructor, 214–15source image numbering, 214tile number versus index number, 214, 216tile placement in cells, 215

    tileWidth and tileHeight parameters,214

    Time-Division Duplex (TDD), 373Timer class, 75–76TimerTask class, 75TimerTask objects, 75–76TogetherSoft, 85Toshiba, 373transform argument, 166Transit screens

    animated, 284–87need for, 278–79noninteractive gauge, 279–80still-image, 280–84

    Transparency, 164, 165f, 235

    Trivia game exampleback screen stack, implementing, 447–49backend database setup, 420–23chat messaging, 419, 420fclient/backend synchronization, history

    menu, 417–19the controller, 428–29database structure, 422directive usage, Antenna, 494–97implementation, selecting at runtime, 443menu options, 415, 416fthe model, 429–34multimedia content, storage of, 422multiple implementations, selecting from,

    442–43MVC pattern implementation, 425–34object pools, 444–46RPC transaction, client side, 456–58RPC transaction, server side, 458–60search sessions, Google, 419Singleton pattern, 439–42stateful static class, 435–36static class, requiring initialization, 436–39synchronization, client side, 461–64synchronization, server side, 464–66trivia questions, types of, 415–17, 418fthe view screens, 425–28Web Services gateway, client side, 467–68Web Services gateway, server side, 468–73worker thread implementation, 454–56

    U

    UDPDatagramConnection interface, 268–69UI testing guidelines, 526–27UIQ devices, 53–54Understanding Web Services: XML, WSDL,

    SOAP, and UDDI (Newcomer), 466Unit testing, 519–20. See also J2MEUnit

    frameworkUniversal Mobile Telecommunications

    system (UMTS) networks, 16, 30UPS package tracking, 7URI locator strings, 329–30URL schemes, 261–62, 309–10USB networks, 30, 55UTF-8 encoding, 245, 265UUIDs (universally unique identifiers),

    387–88, 388–89t

    592 Index

    Index Yuan.qrk 11/19/04 4:00 PM Page 592

  • Index 593

    V

    Value chain, mobile, 10–11Verisign, 101, 302Verizon, 12Viewport, 184, 185fVodafone, 12VPN (virtual private network), 13

    W

    WaitScreen class, 453–54Wallet application, 574–75WAP browsers/gateways, 572–73

    tag, 40, 41fapplication model, 39CSS (cascading style sheets) support, 41dual mode, 41network architecture, 39–40, 561and OTA provisioning, 98pervasiveness of, 44protocol stack, 562Push Access Protocol (PAP), 572Push Proxy Gateway (PPG), 571–72Service Indication, 572Service Loading, 572–73wireless profiled TCP/IP stack, 563–64Wireless Session Protocol (WSP), 563Wireless Telephony Applications Interface

    (WTAI), 573–74Wireless Transport Layer Security (WTLS)

    protocol, 563WML, 26, 40, 562, 565–67WMLScript, 567XHTML MP, 40–41

    Web Services gateway, 466, 467fWiFi (wireless fidelity) networks, 16WiFi (wireless fidelity) providers, 10Wireless Application Environment (WAE),

    562Wireless carriers, 10, 12Wireless Markup Language (WML), 26, 40,

    562, 565–67Wireless Messaging API (WMA). See also

    Chat example applicationaccess permissions, 312, 314tconcatenation, SMS messages in GSM

    networks, 309

    connection interfaces, 310, 311fenterprise messaging middleware, 307versus HTTP, 306–07MessageConnection interface, 309–10methods, MessageConnection interface,

    310MIDlets, trusted versus untrusted, 312MMS capabilities, 323mobile messaging, advantages, 307MultipartMessage and MessagePart

    classes, 324–25multiple recipients, 311new features, version 2.0, 323–25push registry, message listener in, 313–14receiving messages, 312restricted ports, 313security, 312–13sending messages, 310–11server mode connection, 311SMS emulation, 315–17SMS, uses with smart clients, 308TextMessage and BinaryMessage

    interfaces, 308–09URL schemes, 309–10, 323–24versions, 308

    Wireless networking technologieslimitations and solutions, 18–19listed, 16, 18

    Wireless profiled TCP/IP stack, 563–64Wireless Session Protocol (WSP), 563Wireless Telephony Applications Interface

    (WTAI), 573–74Wireless Transport Layer Security (WTLS)

    protocol, 563WMLScript, 567WORA (Write Once, Run Anywhere), 46Worker threads. See also Generic visual

    thread framework; Trivia game examplemain application, hanging, 267MediaPlayer MIDlet, 347–48Photo Viewer example, 273–77preemptive starting of, 279and transit screen display, 282–83

    WorkerRunnable interface, 452WorkerThread class, 452World Wide Web Consortium (W3C), 26, 40,

    43, 264writeXXX() method, 245wtkobfuscate task, 500–501wtkpreprocess task, 492, 497–99wtksmartlink task, 499–500

    Index Yuan.qrk 11/19/04 4:00 PM Page 593

  • X

    Xerox, 7XHTML Mobile Profile (MP), 26, 40–41,

    565–67XML Web Services, 13XML/SOAP API, 26, 466

    Z

    Z-order, 220

    594 Index

    Index Yuan.qrk 11/19/04 4:00 PM Page 594

  • Index Yuan.qrk 11/19/04 4:00 PM Page 595

  • Index Yuan.qrk 11/19/04 4:00 PM Page 596

  • Index Yuan.qrk 11/19/04 4:00 PM Page 597

  • Index Yuan.qrk 11/19/04 4:00 PM Page 598

  • Index Yuan.qrk 11/19/04 4:00 PM Page 599

  • Index Yuan.qrk 11/19/04 4:00 PM Page 600