LWUIT Tourist Attractions
LWUIT Tourist Attractions is a remake of the original Tourist Attractions. It is developed with LWUIT for Nokia Asha software platform and Series 40 library. The application is a location-aware tour guide to city highlights. It presents the most notable sights nearby and shows detailed information on them. The application demonstrates the use of the Location API (JSR-179) and Nokia Maps API for Java ME.
This example application demonstrates:
- LWUIT lists with a custom renderer
- LWUIT layouts
- Switching between different LWUIT forms
- Showing a map using Nokia Maps API with LWUIT
- Showing the user's location on the map
Original Tourist Attractions project page: https://github.com/nokia-developer/tourist-attractions
LWUIT Tourist Attractions project page: https://github.com/nokia-developer/lwuit-tourist-attractions
LWUIT Developer's Library: http://developer.nokia.com/Resources/Library/LWUIT/#!index.html
LWUIT Tourist Attractions wiki page: https://github.com/nokia-developer/lwuit-tourist-attractions/wiki
The main view of the application shows a list of attractions in the selected guide. You can view details of an attraction by tapping it. From the attractions list you can open the map to show your current position, or if your position is not available, the center of the guide. By opening the map from the details of an attraction, the location of the attraction is shown. From the guides list you can open a different guide or buy new guides.
- Java ME basics
3. Important classes
TouristMidlet.java: The midlet class that initialises the display, views, and starts from the splash view.
AttractionList.java: The implementation of a list of attractions.
AttractionListRenderer.java: Custom renderer component for achieving a Series 40-like list style (see Known issues).
MapComponent.java: Handlers for the map.
LocationFinder.java: Wraps Location API so that running the application is possible also without the API being on the device.
Network.java: Network component that handles all connections to the internet.
Compatibility.java: Checks compatibilities of current device to make feature-based programming easy.
Nokia Asha software platform 1.0 or later and Series 40 6th Edition and newer touch phones.
Tested on Nokia Asha 501, Nokia Asha 311, Nokia Asha 308, Nokia Asha 305, Nokia Asha 303 and Nokia X3-02.
Developed with Nokia Asha SDK 1.0 and Netbeans 7.1.2.
4.1 Required capabilities
CLDC 1.1, MIDP 2.0 and, Web Services API (JSR-172).
4.2 Known issues
- The list appearance (as of LWUIT 0.6.2) does not fully match the native Series 40 look; hence list items are drawn with a custom CellRenderer implementation to match the native style.
- On C2-03 there are occasional map problems.
- On Asha 305 the list performance is not optimal.
The text area height is sometimes set incorrectly.
5. Building, installing, and running the application
Before opening the project, make sure Nokia SDK 2.0 or newer for Java is installed and added to NetBeans.
The project can be easily opened in NetBeans by selecting Open Project from the File menu and selecting the application. Building is done by selecting Build main project.
5.3 Nokia Asha phones
You can istall the application on a phone by transferring the JAR file via Nokia Suite or over Bluetooth.
See the license text file delivered with this project. The license file is also available online at https://github.com/nokia-developer/lwuit-tourist-attractions/blob/master/LICENSE.TXT
7. Related documentation
Nokia SDK for Java
Nokia Maps API for Java ME
8. Version history
- 1.3.1 Fixed zoom buttons and background color
- 1.3 Map plugin updated and IAP removed
- 1.2 Pinch zooming of map and bug fixes
- 1.1 Changed the IAP process.
- 1.0 Initial release.