From 8cf0af64048481989bc9e938d63e0558c188c0d2 Mon Sep 17 00:00:00 2001 From: "gu.martinm@gmail.com" Date: Mon, 5 May 2014 06:12:25 +0200 Subject: [PATCH] WeatherInformation: wake up service with alarm --- AndroidManifest.xml | 15 ++- res/values/arrays.xml | 14 +++ res/values/strings.xml | 4 +- res/xml/weather_preferences.xml | 12 +- .../exampletdd/WeatherInformationActivity.java | 123 -------------------- .../exampletdd/WeatherInformationBatch.java | 74 +++--------- .../exampletdd/WeatherInformationBootReceiver.java | 39 +++++++ .../exampletdd/WeatherInformationMapActivity.java | 10 -- src/de/example/exampletdd/WeatherTabsActivity.java | 79 +++++++++++-- .../exampletdd/activityinterface/GetWeather.java | 10 -- .../WeatherInformationCurrentDataFragment.java | 34 +++--- .../WeatherInformationOverviewFragment.java | 127 +++++++++++---------- .../WeatherInformationPreferencesFragment.java | 41 +++++-- .../exampletdd/httpclient/CustomHTTPClient.java | 10 +- src/de/example/exampletdd/model/GeocodingData.java | 40 +++++++ 15 files changed, 319 insertions(+), 313 deletions(-) delete mode 100644 src/de/example/exampletdd/WeatherInformationActivity.java create mode 100644 src/de/example/exampletdd/WeatherInformationBootReceiver.java delete mode 100644 src/de/example/exampletdd/activityinterface/GetWeather.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 9b37dd1..134f903 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -25,10 +25,7 @@ - - - - + + + + + + + + android:enabled="true" /> 10-Day Forecast 14-Day Forecast + + 60 + 120 + 300 + 600 + 900 + + + 1 minute + 2 minutes + 5 minutes + 10 minutes + 15 minutes + diff --git a/res/values/strings.xml b/res/values/strings.xml index 4beeadf..46edf0e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -39,8 +39,8 @@ Fahrenheit Celsius Unit of measurement for temperature - weather_preferences_language - Language + weather_preferences_update_time_rate + Update Time Rate weather_preferences_day_forecast Forecast days number city not found diff --git a/res/xml/weather_preferences.xml b/res/xml/weather_preferences.xml index 3490cb6..8ee76dc 100644 --- a/res/xml/weather_preferences.xml +++ b/res/xml/weather_preferences.xml @@ -10,14 +10,14 @@ android:persistent="true" android:defaultValue="Celsius" /> + android:summary="1 minute"/> >> 32)); + temp = Double.doubleToLongBits(this.longitude); + result = (prime * result) + (int) (temp ^ (temp >>> 32)); + return result; + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (this.getClass() != obj.getClass()) + return false; + final GeocodingData other = (GeocodingData) obj; + if (this.city == null) { + if (other.city != null) + return false; + } else if (!this.city.equals(other.city)) + return false; + if (this.country == null) { + if (other.country != null) + return false; + } else if (!this.country.equals(other.country)) + return false; + if (Double.doubleToLongBits(this.latitude) != Double.doubleToLongBits(other.latitude)) + return false; + if (Double.doubleToLongBits(this.longitude) != Double.doubleToLongBits(other.longitude)) + return false; + return true; + } } -- 2.1.4