Toggle navigation

Step 2: LocationMidlet.java

Begin with the class LocationMidlet and the method startApp. These add the UI to the displayed form. The UI displays the current locations, satellite data, and zoom level.

  1. Add the following function to LocationMidlet.java:

  2. Add the ability to get the current location. These values are saved to the attributes latitude and longitude and are displayed on the screen.

    Add the following functions to LocationMidlet.java:

  3. Add the implementation to handle actions of commands. TestCommand starts a new thread and returns the new locations. gmCommand displays a map at the current location if the location is known.

    Add the following function to LocationMidlet.java:.

Note that no implementation is needed for the methods pauseApp and destroyApp.


Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved