Scmad Chapter11


Published on

SCMAD - Chapter 11 - MIDP Deployment and Push Registry.
These slides are for only studies purposes.

Published in: Technology, Education
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Scmad Chapter11

  1. 1. By Marcel Caraciolo Chapter 11– Midlet Deployment and Push Registry SCMAD Certification 45mm 61mm
  2. 2. Agenda <ul><li>MIDP - Deployment </li></ul><ul><ul><li>MIDlet Suites </li></ul></ul><ul><ul><li>JAD Descriptor </li></ul></ul><ul><ul><li>OTA Provisioning </li></ul></ul><ul><li>MIDP – Push Registry </li></ul><ul><ul><li>Push Registry </li></ul></ul><ul><ul><li>Static Registering </li></ul></ul><ul><ul><li>PushRegistry </li></ul></ul>
  3. 3. WM MIDlet Suites <ul><li>All required classes and resources must be packaged on a single JAR </li></ul><ul><li>All classes from a MIDlet Suite run on the same enviroment, so they share: </li></ul><ul><ul><li>RMS persistence namespace </li></ul></ul><ul><ul><li>Memory heap </li></ul></ul><ul><ul><li>Classes static fields </li></ul></ul><ul><li>Suites are atomic: Single MIDlets may not be installed, updated or removed. These operations are done over the whole suite. </li></ul>
  4. 4. WM JAD Descriptor’s entries <ul><li>MicroEdition-Profile : Profile type and version (e.g. MIDP-2.0). </li></ul><ul><li>MicroEdition-Configutation: Configuration (e.g. CLDC-1.0). </li></ul><ul><li>MIDlet- Name: Suite Name. </li></ul><ul><li>MIDlet-Version: Suite Version, as major.minor.micro number. </li></ul><ul><li>MIDlet-Vendor: Suite Version. </li></ul><ul><li>MIDlet-Icon: Suite icon, packaged inside the JAR file. </li></ul>
  5. 5. WM JAD Descriptor’s entries <ul><li>MicroEdition-Description : Textual description. </li></ul><ul><li>MIDlet-Info-URL: Suite’s website. </li></ul><ul><li>MIDlet- <n>: Name, icon, class of every midlet. </li></ul><ul><li>MIDlet-JAR-URL: URL where find the JAR file. </li></ul><ul><li>MIDlet-JAR-Size: JAR Size. </li></ul><ul><li>MIDlet-Data-Size: Minimum RMS database size that will be used. </li></ul><ul><li>MIDlet-Permissions: Permissions required to running the suite. (comma-separated). </li></ul>
  6. 6. WM JAD Descriptor’s entries <ul><li>MicroEdition-Permissions-Opt : Permissions that the application may request, but it still be able to work without. </li></ul><ul><li>MIDlet-Push -<n>: Push Registry. </li></ul><ul><li>MIDlet-Install-Notify: URL where installation notifications are sent </li></ul><ul><li>to. </li></ul><ul><li>MIDlet-Delete-Notify: URL where deletion notifications are sent to. </li></ul><ul><li>MIDlet-Delete-Confirm: Message shown to the user before he confirms the suite removal. </li></ul>
  7. 7. WM Over-the-air Provisioning <ul><li>Standard way to distribute suites </li></ul><ul><li>You shall put on a web page: </li></ul><ul><ul><li>Links to the JAD file </li></ul></ul><ul><ul><li>JAD file </li></ul></ul><ul><ul><li>JAR file </li></ul></ul><ul><li>When the cell phone opens the URL, it will look for links (‘<a>’ tags) pointing to JAD files and display them all so that the user chooses which suite to install. When a suite is selected, the JAR file will be downloaded and the security permissions will be verified. </li></ul>
  8. 8. WM Over-the-air Provisioning <ul><li>Deletion notifications shall not be sent immediately, they shall be sent only when another installation notification is sent to reduce the number of network accesses. </li></ul><ul><li>Installation notifications are HTTP POST requests sent to the specified URL. The content of this request is a status message (Code + Message). The response must always be an empty “200 OK”. Errors sending the status report shall not prevent the application from being removed. </li></ul>
  9. 9. WM Over-the-air Provisioning <ul><li>When the application is already installed on a device, new installation requests must be considered update operations (RMS data is not lost) </li></ul><ul><li>Every MIDP 2.0 device must support OTA provisioning. </li></ul>
  10. 10. WM Push Registry <ul><li>Notifications will start the application automatically, triggered from an alarm or from a message. </li></ul><ul><li>Push registry is an optional feature at MIDP, and even if the device supports communications using a protocol it may not support notifications using this protocol. For JTWI, Push Registry is required. </li></ul>
  11. 11. WM Push Registry
  12. 12. WM Push Registry <ul><li>Notifications only start the midlet. The application itself must handle the message. Stream-oriented protocols may have problems because if the application takes too long to start , a timeout may happen, hence datagram oriented protocols are more appropriate for notifications. For datagrams, the devices guarantees a buffer for at least the first datagram received (the one that triggered the execution). </li></ul><ul><li>If the application is already being executed, then nothing happens. When it’s running, it’s up the application to wait for messages on the specified port. </li></ul>
  13. 13. WM Push Registry
  14. 14. WM Push Registry <ul><li>Alarms are created programatically, via PushRegistry.registerAlarm . Only one alarm per MIDlet is supported. </li></ul><ul><li>Network notifications may be set up programatically or through the JAD descriptor. </li></ul><ul><li>If a port number conflict is verified at the installation process, the installation will fail. </li></ul>
  15. 15. J JAD notifications registering <ul><li>MIDlet-Push-<n>: Defines a push notifications. The parameters below, in this order, comma-separated, are used: </li></ul><ul><ul><li>URL to receive the message (e.g. sms://1234) </li></ul></ul><ul><ul><li>MIDlet class that will be invoked (this MIDlet must be registered with MIDlet-<n>) </li></ul></ul><ul><ul><li>Network filter from acceptable senders(e.g. 192.168.*.* or 192.168.1??.10?) </li></ul></ul>
  16. 16. J <ul><li>Method (all static): </li></ul><ul><ul><li>registerAlarm(midlet,time): Registers a MIDlet to run at a specific time. Disables alarms if an argument of zero is passed. </li></ul></ul><ul><ul><li>registerConnection(connection,midlet,filter): Dynamically registers a connection. The same parameters from JAD descriptor are used here, after created, this registry behaviour is the same from a static one. </li></ul></ul>
  17. 17. J <ul><li>Method (all static): </li></ul><ul><ul><li>unregisterConnection(connection): Removes a registry </li></ul></ul><ul><ul><li>listConnections(available): List all connections registered with this suite. If available is true, we only get connections with queued messages </li></ul></ul><ul><ul><li>getMIDlet( connection), getFilter(connection): Gets the MIDlet name or filter registered at specific connection. </li></ul></ul>
  18. 18. Example Codes <ul><li>Some examples and MIDlets samples are available for reference and studying at this link: </li></ul><ul><ul><li> mpc/chapter11.rar </li></ul></ul><ul><li>The source codes include: </li></ul><ul><ul><li>AlarmSetMIDlet </li></ul></ul><ul><ul><li>AlarmShowMIDlet </li></ul></ul><ul><ul><li>SMSShowMIDlet </li></ul></ul>
  19. 19. Future Work <ul><li>Next Chapter: </li></ul><ul><ul><li>MIDP – Sound API </li></ul></ul><ul><ul><li>MIDP – MMAPI </li></ul></ul>
  20. 20. References <ul><li>ALVES F. Eduardo. SCMAD Study Guide, </li></ul><ul><li>27/04/2008. </li></ul><ul><li>JAKL Andreas, Java Platform, Micro Edition Part </li></ul><ul><li>01 slides, 12/2007. </li></ul><ul><li>Sun Certification Mobile Application Developer </li></ul><ul><li>Website: []. </li></ul>