Download PowerPoint

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Understanding Java APIs for
Mobile Devices
Trainer name
Date
© 2009 Research In Motion Limited
v0.01
Agenda
In this course, you will cover the following topics:
– Introduction to Java application development for mobile
devices
– Understanding Java APIs for mobile devices
– Developing a user interface for mobile devices
– Introduction to push technology for Java Applications
– Introduction to threading and background processing
– Network communication for mobile devices
– Testing and debugging
© 2009 Research In Motion Limited
Understanding Java APIs for mobile devices
Objectives
– What are Java APIs?
– List and describe the various APIs
– Explain the features of the various APIs
© 2009 Research In Motion Limited
What are Java APIs?
Java APIs
– An API is an exposed area of interaction between a library of
services and the program that consumes those services.
– An API usually defines the following items:
• Code vocabulary
• Naming conventions
• Function and subroutine syntax
• Public and private objects
• Data structures
What are Java APIs?
Java APIs
– APIs can be language dependent or language agnostic.
– Language dependent APIs provide APIs that serve as
frameworks to expand the abilities and services of a particular
programming language. Language agnostic APIs define
services that can be made available to programming
languages.
– The Java APIs used for application development for the
BlackBerry® smartphone are language dependent APIs.
They provide frameworks built in the Java language for use by
other Java-based applications.
What are Java APIs?
Java ME
– The main development platform for the BlackBerry is Java®
ME. Java ME is an industry standard set of Java APIs that
defines services for various embedded and mobile devices.
Applications developed using Java ME run in the BlackBerry®
Java® Virtual Machine; a custom version of the main Java
Virtual Machine optimized for the BlackBerry environment.
– As with other implementations of the JVM, the BlackBerry®
Java® Virtual Machine provides all application runtime
services and performs such functions as memory allocations,
security checks, and garbage collection.
What are Java APIs?
Java ME
– The MIDP v2.0 standard is part of Java ME and is fully
supported by most BlackBerry smartphones as defined in JSR
118
– The MIDP v2.0 standard provides a core set of Java APIs a
BlackBerry smartphone supports regardless of the underlying
operating system.
– You can develop applications in Java ME according to the
MIDP v2.0 standard once and run them on a device that is
MIDP v2.0 compliant.
– BlackBerry smartphones running Software version 4.0 or
earlier are not MIDP v2.0 compliant. These devices are MIDP
1.0 compliant.
MIDP Mobile Information Device Profile
JSR Java Specification Request
What are Java APIs?
Supported Java APIs
– The BlackBerry smartphone supports the MIDP standard and
the approximately 85 different APIs that are part of the
standard. This core set of functionality provides the majority of
the APIs required for the BlackBerry smartphone.
– In addition to this core functionality, BlackBerry development
also supports the following APIs as defined in the noted JSRs.
What are Java APIs?
Supported Java APIs
• JSR 30 CLDC version 1.0
– The CLDC defines the base APIs and virtual machine
for devices such as mobile phones, pagers, and
personal digital assistants. The CLDC, coupled with the
MIDP, provides the Java services available for
application development.
– CLDC version 1.0 is an earlier version supported by
older devices. CDLC version 1.0 is supported by
devices running BlackBerry® Device Software Version
4.0 or earlier.
CLDC Connected Limited Device Configuration
What are Java APIs?
Supported Java APIs
• JSR 37 MIDP version 1.0
– The MIDP, coupled with the CLDC, provides the core
set of Java APIs a BlackBerry smartphone supports
regardless of the underlying operating system.
– MIDP version 1.0 is an earlier version supported by
older devices. MIDP version 1.0 is supported by
devices running BlackBerry Device Software version 4.0
or earlier.
What are Java APIs?
Supported Java APIs
• JSR 75 PDA Optional Packages
– The PDA Optional Packages API provides services for
accessing PIM data and file systems. This API is only
available for devices running BlackBerry Device
Software version 4.2 or later.
• JSR 82 Java APIs for Bluetooth®
– The Java APIs for Bluetooth provides services for the
use of Bluetooth devices with Java applications. These
services allow applications to integrate with Bluetooth
devices, such as headsets, and make use of their
functionality.
PIM Personal Information Management
What are Java APIs?
Supported Java APIs
• JSR 120 WMA version 1.1
– The Wireless Messaging API version 1.1 defines a set
of standardized services for wireless communication
resources designed to run on Java ME configurations.
• JSR 135 MM API version 1.1
– The MM API defines services that allow easy access
and control of basic audio and multimedia resources. It
also addresses scalability and support of more
sophisticated features.
What are Java APIs?
Supported Java APIs
• JSR 139 CLDC version 1.1
– The CLDC defines the base APIs and virtual machine
for devices such as mobile phones, pagers, and PDAs.
The CLDC, coupled with the MIDP, provides the Java
services available for application development.
– This API is an update to CLDC version 1.0 specified in
JSR 30.
What are Java APIs?
Supported Java APIs
• JSR 172 Java Platform, ME Web Services
– The Java Platform, ME Web Services API defines
services for accessing web services using Java ME.
• JSR 177 SATSA for Java Platform, ME
– The SATSA defines services for security and trust
services.
• JSR 179 Location API for Java ME
– The Location API defines services for building locationbased applications.
What are Java APIs?
Supported Java APIs
• JSR 185 JTWI
– The JTWI API defines an overall architectural
description to coordinate JCP efforts with the wireless
industry.
• JSR 205 WMA version 2.0
– The WMA version 2.0 extends the WMA version 1.1 and
defines additional services.
JTWI Java Technology for the Wireless Industry
What are Java APIs?
Supported Java APIs
• JSR 211 Content Handler API
– The Content Handler API defines services to handle
multimedia and web content so developers can create a
seamless and integrated user environment on mobile phones
and wireless devices.
• JSR 226 Scalable 2D Vector Graphics API for Java ME
– The Scalable 2D Vector Graphics API defines services for
rendering scalable 2D vector graphics, like the W3C® SVG
format.
• JSR 238 Mobile Internationalization API
– The Mobile Internationalization API defines services for
providing culturally correct data formatting, text sorting, and
resource processing.
What are Java APIs?
Supported API extensions
– In addition to the standard Java APIs supported in the
BlackBerry® Java® development environment, a number of
API extensions are also supported. These extensions are
APIs that are not part of the standard JSR definitions. They
provide greater features and functionality over what is
available in the standard MIDP version 2.0 APIs.
What are Java APIs?
Supported API extensions
– User Interface
• Used to create all components of the graphical user
interface
– Persistent Data Storage
• Used to store persistent custom data within an application
– Networking and I/O
• Used to establish network connections and read or write
data to server-side applications
What are Java APIs?
– Supported API extensions
– Event Listeners
• Used to respond to user-initiated or system-initiated events
on a BlackBerry smartphone
– Application Integration
• used to integrate custom applications with existing
BlackBerry email message, phone, calendar, contacts,
browser, camera, media player, and task list applications
– Additional Utilities
• used for data encryption and compression, XML parsing,
Bluetooth connectivity, and location-based services
Summary
– An API is an exposed area of interaction between a library of
services and the program that consumes those services. An
API usually defines the following items:
• code vocabulary
• naming conventions
• function and subroutine syntax
• public and private objects
• data structures
Summary
– APIs can be either language dependent or language agnostic.
Language dependent APIs provide APIs that serve as
frameworks to expand the abilities and services of a particular
programming language. Language agnostic APIs define
services that can be made available to programming
languages.
– The Java APIs used for application development for the
BlackBerry smartphone are language dependent APIs. They
provide frameworks built in the Java language for use by other
Java-based applications.
– The main development platform for the BlackBerry is Java®
ME. Java ME is an industry standard set of Java APIs that
defines services for various embedded and mobile devices.
Summary
– The BlackBerry smartphone supports the MIDP standard and
the approximately 85 different APIs that are part of the
standard. This core set of functionality provides the majority of
the APIs required for the BlackBerry device. In addition to this
core functionality, BlackBerry development also supports
many other APIs.
– In addition to the standard Java APIs supported in the
BlackBerry development environment, a number of API
extensions are also supported. These extensions are APIs
that are not part of the standard JSR definitions. They provide
greater features and functionality over what is available in the
standard MIDP version 2.0 APIs.
© 2009 Research In Motion Limited
Legal Disclaimer
© 2009 Research In Motion Limited. All rights reserved. BlackBerry®, RIM®, Research
In Motion®, SurePress™ SureType® and related trademarks, names and logos are the
property of Research In Motion Limited and are registered and/or used in the U.S. and
countries around the world. <Insert third party attribution statements.> All other
trademarks are the property of their respective owners. This documentation is provided
"AS IS" and without condition, endorsement, guarantee, representation or warranty, or
liability of any kind by Research In Motion Limited and its affiliated companies, all of
which are expressly disclaimed to the maximum extent permitted by applicable law in
your jurisdiction.
© 2009 Research In Motion Limited