Motorola MOTORAZR maxx V6 Developer's Manual page 157

Java me developer guide
Hide thumbs Also See for MOTORAZR maxx V6:
Table of Contents

Advertisement

Java ME Developer Guide
Chapter 22 - Network APIs
22.8 Push Registry Declaration
The application descriptor file will include information about static connections that
are needed by the MIDlet suite. If all static push declarations in the application
descriptor cannot be fulfilled during the installation, the MIDlet suite will not be in-
stalled. The user will be notified of any push registration conflicts despite the mech-
anism. This notification will accurately reflect the error that has occurred.
Push registration can fail as a result of an Invalid Descriptor. Syntax errors in the
push attributes can cause a declaration error resulting in the MIDlet suite installation
being cancelled. A declaration referencing a MIDlet class not listed in the MIDlet-<n>
attributes of the same application descriptor will also result in an error and cancella-
tion of the MIDlet installation.
Two types of registration mechanisms will be supported. The registration mechan-
isms to be supported are the following:
Registration during installation through the JAD file entry using a fixed port number
Dynamically register using an assigned port number
If the port number is not available on the handset, an installation failure notification
will be displayed to the user while the error code 911 push is sent to the server. This
error will cease the download of the application.
Applications that wish to register with a fixed port number will use the JAD file to
identify the push parameters. The fixed port implementation will process the MIDlet-
Push-n parameter through the JAD file.
Code Sample 10 shows the implementation of Push Registry:
Push Registry Declaration
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import javax.microedition.io.PushRegistry;
public class PushTest_1 extends MIDlet implements CommandListener{
public Display display;
DRAFT - Subject to Change
[157/201]

Advertisement

Table of Contents
loading

Table of Contents