I want to be able to check the weather in my Android app. I implemented it, but it seems to always be returning conditions: [2] and nothing else, despite the fact it has been raining for almost an hour now here.
Here's what it's returning:
Temp=67.0F/19.444445C, Feels=67.0F/19.444445C, Dew=58.0F/14.444445C, Humidity=71, Condition=[2]
I'm testing this on Android v5.1 and yes fine location is in my manifest and turned on on my phone.
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
Here's my code for getting the weather:
Awareness.SnapshotApi.getWeather(mGoogleApiClient)
.setResultCallback(new ResultCallback<WeatherResult>() {
@Override
public void onResult(@NonNull WeatherResult weatherResult) {
if (!weatherResult.getStatus().isSuccess()) {
System.out.println("error: /*- could not get weather");
return;
}
weather = weatherResult.getWeather();
System.out.println("weather: " + weather);
}
});