21
UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

Embed Size (px)

Citation preview

Page 1: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

UNDERSTANDING JAVA APIS FOR MOBILE DEVICES

v0.01

Page 2: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

Understanding Java APIs for mobile devices• Objectives

• What are Java APIs?• List and describe the various APIs• Explain the features of the various APIs

2

Page 3: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

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

3

Page 4: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

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.

4

Page 5: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

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.

5

Page 6: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

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

6

Page 7: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

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.

7

Page 8: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

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

8

Page 9: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

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.

9

Page 10: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

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

10

Page 11: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

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.

11

Page 12: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

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.

12

Page 13: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

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 location-based

applications.

13

Page 14: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

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

14

Page 15: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

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.

15

Page 16: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

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.

16

Page 17: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

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

17

Page 18: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

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

18

Page 19: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

• 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

19

Page 20: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

• 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.

20

Page 21: UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01

• 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.

21