Package javax.microedition.location.services

Contains the classes and interfaces related to location based services.

See:
          Description

Interface Summary
GeocodingServiceProvider This interface collects the services that geocoding service providers offer.
Map This class represents a dynamic map generated by a map service provider.
MapServiceListener This interface provides a callback mechanism for the map service providers to send information about the service request to applications.
MapServiceProvider This interface collects the services that map providers offer.
NavigationServiceListener This interface provides a callback mechanism for navigation service providers to announce their state and results to applications.
NavigationServiceProvider This interface collects the services that navigation providers offer.
ServiceListener This is a super interface for all listeners related to different services.
ServiceProvider This is a super interface for all service providers defined in this API.
 

Class Summary
GeocodingServicePreferences This class captures the preferences related to geocoding service provider.
MapServicePreferences This class captures the preferences related to map service provider.
NavigationInstruction This class collects the instructions for navigating a route segment.
NavigationServicePreferences This class encapsulates the preferences that are used when requesting routing services from a navigation service provider.
ProviderCapabilities This class collects the information about the capabilities of a service provider.
ProviderManager This class is the starting point for using service provider interfaces in Location API 2.0.
Route This class represents a route.
RouteSegment This class represents a segment of a route.
ServicePreferences This class is a superclass for service preferences.
 

Exception Summary
ServiceException The ServiceException is thrown when an error related to handling service provider requests has occurred.
 

Package javax.microedition.location.services Description

Contains the classes and interfaces related to location based services.

Location API 2.0 extends version 1.0 also with a general client interfaces to different location based services. Through these interfaces the applications are able to use services that are provider by the terminal implementation. Examples of these services are map, navigation and geocoding services.

The geocoding service allows applications to convert street addresses into coordinates and vice versa. With map service applications are able to display maps and selected location or landmarks to the user or select an area, landmark or a location from a map. The navigation service offers applications the possibility to request navigation related services from the service provider.

Architecture

This specification defines client interfaces that applications can use to access location based services provided by the terminal implementation. This specification does not define a mechanism to include dynamic service provider implementations to the ternminal implementations. They are out of scope for JSR 293. More information about service provider implementations and their installation can be found from Appendix D.

The mechanism how applications use services may be categorized into two different types. These types are based on the level of interaction applications want to have with the service provider. In this specification the following service types are used.

  1. NO-CONTROL: An application requests a service from the service provider and it is not interested in any details of the service or does not need access to any data. In many cases there is a listener through which the service provider notifies applications about the state of the service request. An example of this functionality is when application requests a map service provider to display map using MapServiceProvider.displayMap method.
  2. CONTROL: The application sets preferences for the service provider how to serve the service request should be handled. Applications may also request an object back from the service provider to later do some rendering or embedding with the object. An example of controlled functionality is that an application requests a route from the navigation service provider with method NavigationServiceProvider.getRoute and then draws the returned route to the screen itself.

In this API the service provider interfaces are managed through ProviderManager class. This class offers static methods to find and select service providers. Information about the service provider is stored in ProviderCapabilities class. With this information about the capabilities of the service provider, applications are able to select the right service provider that meets their requirements.

This API provides a common ServiceProvider interface that acts as a super interface for all different service interfaces and collects the methods common to all providers. This API also defines detailed service interfaces for geocoding, map and navigation services. Most service provider interface, including the super interface, have a corresponding listener to allow applications to receive information about the state of the service. The following class diagram depicts the whole service provider architecture.

service interfaces

Since:
2.0


Copyright © 2003-2008 Nokia Corporation. All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.