Java Reference
In-Depth Information
3.
Build the project.
4.
Set the MIDlet properties in Table 12-8.
5.
Using KToolbar, create a project called OBEX2 with MIDlet name OBEXMIDlet .
Copy the source files to the src directory of OBEX2.
6.
7.
Build the project.
8.
Set the MIDlet properties for OBEX2, with the values in Table 12-9.
9.
Start an emulator instance of OBEX2 and launch the MIDlet.
10.
Open the OBEXMIDlet project.
11.
Start an emulator instance of OBEXMIDlet and launch the MIDlet.
Table 12-8. MIDlet Properties for OBEXMIDlet Project
Key
Value
OBEXMIDlet-mycontact
tallguy@yahoo.com
OBEXMIDlet-myheight
tall
OBEXMIDlet-mypref
male
OBEXMIDlet-seekheight
short
OBEXMIDlet-seekpref
female
Table 12-9. MIDlet properties for OBEX2 Project
Key
Value
OBEXMIDlet-mycontact
shortgal@yahoo.com
OBEXMIDlet-myheight
short
OBEXMIDlet-mypref
female
OBEXMIDlet-seekheight
tall
OBEXMIDlet-seekpref
male
Coding the OBEX Dating Service Client
Listing 12-3 shows DateClient.java , a singleton instance with the client logic in the run() method.
The connector URL string used in Connector.open() is “irdaobex://discover;ias=DatingService”.
This provides the instruction for the underlying OBEX infrared transport to discover the associated
dating service.
 
Search WWH ::




Custom Search