public final class

WeatherInfo

extends Object
implements Parcelable
java.lang.Object
   ↳ lineageos.weather.WeatherInfo

Class Overview

This class represents the weather information that a WeatherProviderService will use to update the weather content provider. A weather provider service will be called by the system to process an update request at any time. If the service successfully processes the request, then the weather provider service is responsible of calling complete(ServiceRequestResult) to notify the system that the request was completed and that the weather content provider should be updated with the supplied weather information.

Summary

Nested Classes
class WeatherInfo.Builder Builder class for WeatherInfo  
class WeatherInfo.DayForecast This class represents the weather forecast for a given day. 
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<WeatherInfo> CREATOR
Public Methods
int describeContents()
boolean equals(Object obj)
String getCity()
int getConditionCode()
List<WeatherInfo.DayForecast> getForecasts()
double getHumidity()
double getTemperature()
int getTemperatureUnit()
long getTimestamp()
double getTodaysHigh()
double getTodaysLow()
double getWindDirection()
double getWindSpeed()
int getWindSpeedUnit()
int hashCode()
String toString()
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<WeatherInfo> CREATOR

added in API level 5

Public Methods

public int describeContents ()

added in API level 5

Returns
int

public boolean equals (Object obj)

Parameters
obj Object
Returns
boolean

public String getCity ()

added in API level 5

Returns
String city name

public int getConditionCode ()

added in API level 5

Returns
int An implementation specific weather condition code

public List<WeatherInfo.DayForecast> getForecasts ()

added in API level 5

Returns
List<WeatherInfo.DayForecast> List of WeatherInfo.DayForecast. This list will contain the forecast weather for the upcoming days. If you want to know today's high and low temperatures, use getTodaysHigh() and getTodaysLow()

public double getHumidity ()

added in API level 5

Returns
double humidity

public double getTemperature ()

added in API level 5

Returns
double current temperature

public int getTemperatureUnit ()

added in API level 5

Returns
int temperature unit

public long getTimestamp ()

added in API level 5

Returns
long time stamp when the request was processed

public double getTodaysHigh ()

added in API level 5

Returns
double today's high temperature

public double getTodaysLow ()

added in API level 5

Returns
double today's low temperature

public double getWindDirection ()

added in API level 5

Returns
double wind direction (degrees)

public double getWindSpeed ()

added in API level 5

Returns
double wind speed

public int getWindSpeedUnit ()

added in API level 5

Returns
int wind speed unit

public int hashCode ()

Returns
int

public String toString ()

Returns
String

public void writeToParcel (Parcel dest, int flags)

added in API level 5

Parameters
dest Parcel
flags int