background image

BlackBerry Java Development Environment

Version: 4.7.0

Fundamentals Guide

Содержание JAVA DEVELOPMENT ENVIRONMENT - - FUNDAMENTALS GUIDE

Страница 1: ...BlackBerry Java Development Environment Version 4 7 0 Fundamentals Guide...

Страница 2: ...SWDT499912 499912 1212115921 001...

Страница 3: ...pplications with desktop synchronization 10 Applications with wireless access wireless synchronization or wireless alerting 10 MIDlet applications 10 CLDC applications 11 API control and code signing...

Страница 4: ...y device 27 RAM garbage collection on a BlackBerry device 27 Full garbage collection on a BlackBerry device 27 Idle garbage collection on a BlackBerry device 27 5 Data management 28 Support for APIs t...

Страница 5: ...cation authentication 36 Server side authentication 36 Controlled APIs and code signing 36 BlackBerry APIs with controlled access 37 IT policy support 38 Application control 38 File encryption on micr...

Страница 6: ...n 43 Distribute an application from a computer 43 Distribute an application from a web page 43 Distribute an application for testing 43 Application distribution over the wireless network 43 Wireless p...

Страница 7: ...have a longer latency period than standard LANs have less available memory have shorter battery life display one screen at a time Mobile device users use applications on their mobile device different...

Страница 8: ...Berry JVM version 4 0 Applications that you create using BlackBerry JDE Version 4 0 only work on BlackBerry devices running BlackBerry Device Software version 4 0 or later You can use the following cr...

Страница 9: ...standard addresses the API and BlackBerry JVM needs of a constrained wireless device with a user interface The BlackBerry device supports the Java ME MIDP standard as defined in JSR 118 The Java MEMI...

Страница 10: ...tion Networking and I O APIs You can use these APIs to establish network connections and read or write data to a server side application Event Listeners You can use the Event Listeners to respond to B...

Страница 11: ...es wireless access to email attachments and access to Internet content The BlackBerry Internet Service includes support for direct HTTP and TCP IP connectivity to the Internet from a third party Black...

Страница 12: ...evice user must initiate the data synchronization process manually After the applicationisinstalledontheBlackBerrydevice theBlackBerrydeviceusermustsynchronizeinformationmanuallybyconnecting their Bla...

Страница 13: ...applications that the BlackBerry Java Development Environmentincludes use the CLDC application model All of the core BlackBerry applications including message list contacts list calendar and the brows...

Страница 14: ...eive your set of code signing keys in about 10 days Object modeling Whether you use the MIDlet or the CLDC application model you must use an object oriented approach when you design your applicationfo...

Страница 15: ...numeration Perform casts using instanceof Evaluate conditions using instanceof Avoid using StringBuffer append StringBuffer Avoid returning null Avoid passing null into methods Use caution when passin...

Страница 16: ...by using static variables not final instead of constants final The opposite is true for primitive data types such as int For example you might create a String object as follows private static final St...

Страница 17: ...0 i size i for int i vector size 1 i 0 i Optimizing subexpressions If you use the same expression twice use a local variable Code sample int tmp i 1 one tmp two tmp Optimizing division operations Div...

Страница 18: ...vailable in the Java ME Code sample for int i v size 1 i 0 i o v elementAt i synchronized v for int i v size 1 i 0 i o v elementAt i Performing casts using instanceof Use instanceof to evaluate whethe...

Страница 19: ...the method should throw an appropriate exception which forces the caller of the method to deal explicitly with the problem The caller of the method might not need to check for a null return value unl...

Страница 20: ...e Code sample catch Throwable t t printStackTrace Best practice Using objects judiciously To allow a BlackBerry Java Application to efficiently use memory resources consider the following questions Gi...

Страница 21: ...id creating interfaces unless you foresee multiple implementations of the API Interfaces produce larger slower code Using static inner classes When you use an inner class to hide one class inside anot...

Страница 22: ...nguages depending on the locale of the BlackBerry device user without requiring new resource bundles YoucanusetheBlackBerryIntegratedDevelopmentEnvironmenttocompileeachresourcebundleintoaseparatelycom...

Страница 23: ...BlackBerry device stores the picture in the file system on the BlackBerry device A BlackBerry Java Application can access the pictures by using the File Connection API for Java ME that is available i...

Страница 24: ...he number of ticks along an axis surpasses the threshold of the system or a BlackBerry Java Application a navigation event along that axis is dispatched to the software layer and the system resets the...

Страница 25: ...ons Screen components provide a standard screen layout a default menu and a standard behavior when the BlackBerry device user presses the Escape key or clicks the trackwheel or trackball Field compone...

Страница 26: ...ly 10 MB to 15 MB of flash memory depending on the version Flash memory can store the BlackBerry device user s email messages organizer data and other personal information as well as the data that a B...

Страница 27: ...sible when the BlackBerry device is low on memory resources Identifying low memory availability on a BlackBerry device The following conditions can cause the low memory manager to attempt to free memo...

Страница 28: ...ds can quickly exhaust the number of persistent object handles A persistent object consumes a persistent object handle and an object handle A transient object consumes only an object handle For exampl...

Страница 29: ...any nonpersistent object handles in RAM and flash memory The system might initiate a full garbage collection operation in the following situations The BlackBerry Java Virtual Machine cannot allocate...

Страница 30: ...ts on a persistent store however the limit for an individual object within the store is 64 KB The BlackBerry Persistent Store APIs do not provide a relational database model You must create an effecti...

Страница 31: ...data to a file on a computer and to restore data to the BlackBerry device When an application uses the Synchronization API the BlackBerry Desktop Manager can back up and restore the application databa...

Страница 32: ...ackBerry Desktop Manager add in which notifies the application on the BlackBerry device to send the data to the computer application You can also write data to the computer application using the nativ...

Страница 33: ...Java Application to use it as a secure gateway for managing HTTP and TCP IP connections to the intranet If your application connects to the Internet you might be able to use the BlackBerry Enterprise...

Страница 34: ...s of an email message Using SMS to transport data You can use the BlackBerry APIs to create applications that use SMS as a transport mechanism for sending and receiving data The BlackBerry APIs allow...

Страница 35: ...mation The following examples demonstrate how a BlackBerry device application can invoke a BlackBerry Device Software application The BlackBerry device application invokes the calendar to display a sp...

Страница 36: ...kBerry device user performs a local event You can use the email and organizer data listeners to notify a BlackBerry Java Application when new entries arrive or when the BlackBerry device user makes ch...

Страница 37: ...T policy to make sure that all BlackBerry device user data stored in the BlackBerry device applications is encrypted locally in flash memory You can create aBlackBerry Java Application that uses APIs...

Страница 38: ...erver or to the Internet or an intranet you might want to include additional authentication features when the BlackBerry device users log into the server Most applications that require user authentica...

Страница 39: ...search In Motion before you can install these applications on BlackBerry devices You can use the following categories of RIM controlled APIs Runtime APIs BlackBerry Application APIs BlackBerry Cryptog...

Страница 40: ...tion on the BlackBerry device cannot access the phone application TheadministratorcanapplyapplicationcontrolpoliciesonlywhentheBlackBerrydeviceisassociatedwithaBlackBerryEnterprise Server If theadmini...

Страница 41: ...card password If the BlackBerry device has a password the BlackBerry device user can use the prompt to change the microSD media card password to the BlackBerry device password IT policies and the mic...

Страница 42: ...the amount of processing that the BlackBerry device must perform when you install yourapplication TopartiallyverifyyourclassesbeforeyouinstallyourapplicationonaBlackBerrydevice youcanusethePreverify...

Страница 43: ...ne and Internet browsing The BlackBerry Smartphone Simulator also serves as a platform on which applications can run This includes the ability for the applicationstomakenetworkconnections storedata an...

Страница 44: ...Simulator and either a messaging application such as Microsoft Outlook or POP3 and SMTP servers You do not require a BlackBerry Enterprise Server To get the BlackBerry Email Simulator visit www blackb...

Страница 45: ...users with a simple way to install applications from their computers without running the BlackBerry Desktop Manager Distribute an application for testing The BlackBerry Java Development Environment i...

Страница 46: ...ackBerry device Wireless push server initiated In the BlackBerry Enterprise Server environment the administrator can push applications to BlackBerry device users over the wireless network for mandator...

Страница 47: ...t Transfer Protocol over Secure Sockets Layer I O input output IMAP Internet Message Access Protocol IPC interprocess communication JDWP Java Debug Wire Protocol JSR Java Specification Request JTWI Ja...

Страница 48: ...tion Program Compiler RMS Record Management System SHA Secure Hash Algorithm SMS Short Message Service SMTP Simple Mail Transfer Protocol SRAM static random access memory SSL Secure Sockets Layer TCP...

Страница 49: ...WAP Wireless Application Protocol XML Extensible Markup Language Fundamentals Guide Glossary 47...

Страница 50: ...updates enhancements or other additions to this documentation to you in a timely manner or at all This documentation might contain references to third party sources of information hardware or softwar...

Страница 51: ...DING AIRTIME SERVICE PROVIDERS AND THEIR RESPECTIVE DIRECTORS EMPLOYEES AND INDEPENDENT CONTRACTORS IN ADDITION TO THE LIMITATIONS AND EXCLUSIONS SET OUT ABOVE IN NO EVENT SHALL ANY DIRECTOR EMPLOYEE...

Страница 52: ...TOSUPERSEDEANYEXPRESSWRITTENAGREEMENTSORWARRANTIES PROVIDED BY RIM FOR PORTIONS OF ANY RIM PRODUCT OR SERVICE OTHER THAN THIS DOCUMENTATION Research In Motion Limited 295 Phillip Street Waterloo ON N2...

Отзывы: