Sunday, April 22, 2007

JAVA 認證心得 -- SCMAD (5)

Application Model/ Delivery/Lifecycle/Provisioning

  • MIDP 2.0 compliant implementations

    Ø MUST support MIDP 1.0 and MIDP 2.0 MIDlets and MIDlet Suites.

    Ø MUST implement the OTA User Initiated Provisioning specification.

    Ø MUST provide support for accessing HTTP 1.1 servers.

    Ø MUST provide support for secure HTTP connections.

    Ø MUST support PNG image transparency.

    Ø MUST support Tone Generation in the media package.

    Ø MUST implement the mechanisms needed to support “Untrusted MIDlet Suites”.

    Ø SHOULD NOT allow copies to be made of any MIDlet suite unless the device implements a copy protection mechanism.

  • DataSource is not available in MIDP 2.0
  • public boolean Medlet.platformRequest (String URL) throws ConnectionNotFoundException

    URL - The URL for the platform to load. An empty string (not null) cancels any pending requests.

    This is a non-blocking method

    Does not handle multiple requests.

  • The correct ways to find the version of midp specification

    System.getProperty (“microedition.profiles”);

    Midlet.getAppProperty (”MicroEdition-profile”);

    microedition.hostname è get hostname

  • startApp() and destroyApp() can throw a MIDletStateChangeException
  • A SecurityException will be thrown if any class other than the AMS calls the no-argument constructor of a MIDlet or its sub-class
  • An application can initiate phone calls using the native phone application of the device by providing a telephone number in the form of the URL “tel://msisdn-number” by using the MIDlet.platformRequest() call
  • The MIDlet.platformRequest() method may be used to update a running MIDlet application.
  • MIDlet.resumeRequest() used by the application to let the AMS indicate that it would like to move to the active state.
  • If a connection gets terminated during transfer, the partially transferred MIDlet will be deleted automatically.
  • Only HTTP protocol is supported by the status report mechanism
  • If a cookie was returned when the application descriptor or MIDlet suite was retrieved, and the domain and path in the coookie match the URL in the MIDlet-Install-Nofigy attribute then the cookie MUST be included in the request header so that the server can indentify the installation which has been completed.
  • Persistent data of a MIDlet suite must be preserved when updating a MIDlet. The format, contents, and versioning of the RecordStores are the responsibility of the individual MIDlet suite.
  • It is mandatory for devices to support MIDlet updates.
  • If an attempt is made to install a MIDlet that is already installed in the device, the user SHOULD be notified.
  • During the download of a MIDlet suite, the HTTP request-headers used to fetch the content should include User-Agent, Accept-Language, and Accept. If supplied when requesting MIDlet suites, this header should include application/java and application/java-archive. For retrieving application descriptors, this header should include text/
  • If the platform has the appropriate capabilities and resources available, it SHOULD bring the appropriate application to the foreground and let the user interact with the content, while keeping the MIDlet suite running in the background. If the platform does not have appropriate capabilities or resources available, it MAY wait to handle the URL request until after the MIDlet suite exits. In this case, when the requesting MIDlet suite exits, the platform MUST then bring the appropriate application (if one exists) to the foreground to let the user interact with the content.

Read more!

No comments: