Motorola i88s manual J2ME Networking, Http Https

Page 14

Motorola Inc.

i88s J2ME Developers’ Guide

2 J2ME Networking

2.1Overview

The J2ME platform on the i88s phone provides a variety of networking functionalities beyond those specified in MIDP. The additional networking protocols are added through the Generic Connection Interface in order to simplify the interface to the application as well as to reduce the need for additional classes. Most of the additional network connections are invoked using a runtime parameter similar to HTTP, reducing the learning curve for developers as well as the reducing potential application porting efforts. The following is a list of networking features for the i88s phone:

HTTP

HTTPS

TCP Sockets

SSL Secure Sockets

Server Sockets

UDP Sockets

Serial Port Access

The standard networking protocol specified in MIDP 1.0 is HTTP. Although HTTP is useful and flexible for most data exchanges, many of the applications fall outside the standard request/response models of most browsers. Applications such as games and stock tickers require networking protocols with different characteristics. In order to accommodate these types of applications with reasonable efficiency, additional protocol stacks including UDP, TCP Sockets, SSL, and HTTPS have been added. These added networking functionalities not only provide the application developer with more communication options, it alleviates the need to perform inefficient workarounds for a strict HTTP environment. Other applications may also choose to take advantage of the bottom connector on the devices. The bottom connector is a serial port enabling communication with a variety of other devices. The i88s phone also provides serial port access through the Generic Connection Framework in order to provide applications a means to communicate to external devices such as GPS, OBD, PCs, etc.

Version 1.0 - Page 14

Image 14
Contents I88s Multi-Communication Device J2ME Developers’ Guide J2ME Networking Document Overview DisclaimerAcronyms Used In This Guide Terminology Definition Contact InformationAcronyms and Definitions Agps On The i88s Phone OverviewAssist Data Position APIAccuracy Example PositionConnection ClassAlmanac Out Of Date GetPosition Method DescriptionsRetrieving Position in Java GetPositionString nameUsing Position in Java GetStatusExample Using PositionConnection Positionresponsenoalmanacoverride Addition, to obtain better accurate speed and direction Recommendation J2ME Networking Http HttpsClass Descriptions Supported Protocols on the i88s Phone HttpHttps ServerSockets TCP SocketsSSL Secure Sockets Serial Port Access UDP SocketsConnection Optional Parameters Communicating on a PortExample using StreamConnection Implementation NotesTips Concurrent Connections For The i88s Phone Protocol MaximumMethod Descriptions Opening a file File I/OClass Description Code Examples Deleting a fileReading and Writing Example # 2 Complete MIDlet code Motorola Inc I88s J2ME Developers’ Guide Os = sc.openOutputStream //get InputStream Sc.close Caveats Motorola Inc I88s J2ME Developers’ Guide
Related manuals
Manual 43 pages 17.94 Kb