Implementation of Event-Sharing MIDlet

The MIDlet will start with a screen to define the event and send it. In this screen the user can set the destination number, the topic of the event, the start date/time, and the duration in minutes. It is also possible to look up the destination number in the contact list by using the "Find Contacts" menu item. This will display a list of contact names and phone number(s). Once a message is sent, the event is inserted in the local database.

The MIDlet will establish itself by listening for incoming messages on a given SMS port (6553). When a message is received, a new screen will pop up, the message will be decoded, and the event will be displayed on the screen. At that moment, the recipient can accept the insertion of new data to the calendar.

The MIDlet also registers itself in the PushRegistry waiting for incoming messages in the given SMS port. This registration is done statically using a MIDlet-Push entry in the JAD file.

All operations that are related to reading or writing the PIM databases are done in a separate thread to avoid deadlocks with the UI thread.

The figure below presents a simplified class diagram of the Event Sharing MIDlet application.

Figure 116: Event-sharing MIDlet class diagram

The example includes the following classes:

The following three figures present some of the screens of the application.

Figure 117: Sending meeting request screen in an S60 device

Figure 118: Look up contacts screen in a communicator

Figure 119: Incoming meeting request screen in an S60 device