java.lang.Object | |
↳ | cyanogenmod.weather.CMWeatherManager |
Provides access to the weather services in the device.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CMWeatherManager.LookupCityRequestListener | Interface used to receive notifications upon completion of a request to lookup a city name | ||||||||||
CMWeatherManager.RequestStatus | The different request statuses | ||||||||||
CMWeatherManager.WeatherServiceProviderChangeListener | Interface used to be notified when the user changes the weather service provider | ||||||||||
CMWeatherManager.WeatherUpdateRequestListener | Interface used to receive notifications upon completion of a weather update request |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Cancels a request that was previously submitted to the weather service.
| |||||||||||
Gets the service's label as declared by the active weather service provider in its manifest
| |||||||||||
Gets or creates an instance of the
CMWeatherManager
| |||||||||||
Request the active weather provider service to lookup the supplied city name.
| |||||||||||
Registers a
CMWeatherManager.WeatherServiceProviderChangeListener to be notified when a new weather
service provider becomes active.
| |||||||||||
Forces the weather service to request the latest weather information for the provided
WeatherLocation.
| |||||||||||
Forces the weather service to request the latest available weather information for
the supplied
Location location.
| |||||||||||
Unregisters a listener
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Cancels a request that was previously submitted to the weather service.
requestId | The ID that you received when the request was submitted |
---|
Gets the service's label as declared by the active weather service provider in its manifest
Gets or creates an instance of the CMWeatherManager
Request the active weather provider service to lookup the supplied city name.
city | The city name |
---|---|
listener | CMWeatherManager.LookupCityRequestListener To be notified once the request has been
completed. Upon success, a list of
WeatherLocation
will be provided |
Registers a CMWeatherManager.WeatherServiceProviderChangeListener
to be notified when a new weather
service provider becomes active.
listener | CMWeatherManager.WeatherServiceProviderChangeListener to register
|
---|
Forces the weather service to request the latest weather information for the provided WeatherLocation. This is the preferred method for requesting a weather update.
weatherLocation | A WeatherLocation that was previously
obtained by calling
lookupCity(String, LookupCityRequestListener) |
---|---|
listener | CMWeatherManager.WeatherUpdateRequestListener To be notified once the active weather
service provider has finished
processing your request |
Forces the weather service to request the latest available weather information for
the supplied Location
location.
location | The location you want to get the latest weather data from. |
---|---|
listener | CMWeatherManager.WeatherUpdateRequestListener To be notified once the active weather
service provider has finished
processing your request |
Unregisters a listener
listener | A previously registered CMWeatherManager.WeatherServiceProviderChangeListener
|
---|