|
Guest lecture, Bluetooth, and Persistent Storage - room 0.19
You may find the slides from the lecture here
- 16:00 - 16:50: Project work in Computer Games: guest lecture by Susana Tosca
- 17:00 - 17:30: Bluetooth
- 17:30 - 18:30: Persistent Storage
Reading
Homework for April 1
- Create a MIDlet with a "new-user" form that allows a new user to enter
login-information, e.g. userid and password. It must be able to store this
information for later use (Persistent Storage). It should be possible to
create several users.
Expand the MIDlet with a "login" form where a user enters userid and
password, which is validated against the stored login-information. The
validation must return the recordId if the userid and passwords are correct.
- Create a MIDlet that will store the information in the file:
http://www.it-c.dk/courses/JPMA/F2004/JPMApart.txtin a record store.
The file has this format:
List of students JPMA Spring 2004
name, e-mail, studyline
...
Extend the MIDlet with a form that will allow you to type in the
name of a study-line e.g. K-MMT or K-SWU and which will then disply
the nuber of students from that study-line on the list of JPMA
students.
Extend the MIDlet with a search form that you can use to find the e-mail
of a particular student.
- This exercise is based on the example of using Bluetooth
contained in the three files listed below (Btp2pTest.java, BluetoothServer.java,
and BluetoothClient.java). Please note that this code CANNOT be compiled
(and executed) with version 2.1 of the J2ME SDK.
Go through the code and make sure that you understand all parts of it. Maybe
you need to consult the
Download JSR-82 Bluetooth API documentation.
Revise the code of both the client and the server to make it possible to
exchange a number of messages (and not just a single message as in the original code)
Examples from lecture on Bluetooth
Btp2pTest.java
BluetoothServer.java
BluetoothClient.java
Installation of a Bluetooth API
In order to be able to compile and execute J2ME programs using Bluetooth,
it is necessary to install an extension to the J2ME toolkit. Yoy may get an
extension for Nokia Series 60 here
(in the Java section select: Series 60 MIDP Concept SDK Beta 0.3.1, Nokia Edition).
If you are not already registered at the Nokia developer site, you will need
to do that. After downloading this
extension, install it in the directory ..\wtk21\wtklib\devices. During the installation
you will be asked for an installation key that you obtain when registering with Nokia.
When the extension has been installed a new menu item becomes available
in the (J2ME SDK) KToolbar Device selection. Select "
Series 60 MIDP Concept SDK Beta 0.3.1, Nokia Edition". You should now be able to
compile and run J2ME programs using the Bluetooth API.
Course organizor: Jørgen Staunstrup e-mail
You may send e-mail to all particpants by clicking
here
|
| |
|
 |