this.getActivity().findViewById(R.id.weather_current_error_message).setVisibility(View.GONE);
final CurrentTask task = new CurrentTask(
this.getActivity().getApplicationContext(),
- new CustomHTTPClient(AndroidHttpClient.newInstance("Android 4.3 WeatherInformation Agent")),
+ new CustomHTTPClient(AndroidHttpClient.newInstance(this.getString(R.string.http_client_agent))),
new ServiceCurrentParser(new JPOSCurrentParser()));
task.execute(weatherLocation.getLatitude(), weatherLocation.getLongitude());
this.setListShownNoAnimation(false);
final OverviewTask task = new OverviewTask(
this.getActivity().getApplicationContext(),
- new CustomHTTPClient(AndroidHttpClient.newInstance("Android 4.3 WeatherInformation Agent")),
+ new CustomHTTPClient(AndroidHttpClient.newInstance(this.getString(R.string.http_client_agent))),
new ServiceForecastParser(new JPOSForecastParser()));
task.execute(weatherLocation.getLatitude(), weatherLocation.getLongitude());
if (weatherLocation != null) {
final ServiceCurrentParser weatherService = new ServiceCurrentParser(new JPOSCurrentParser());
final CustomHTTPClient HTTPClient = new CustomHTTPClient(
- AndroidHttpClient.newInstance("Android 4.3 WeatherInformation Agent"));
+ AndroidHttpClient.newInstance(this.getString(R.string.http_client_agent)));
Current current = null;
try {
import name.gumartinm.weather.information.service.IconsList;
import name.gumartinm.weather.information.service.PermanentStorage;
import name.gumartinm.weather.information.service.ServiceCurrentParser;
-import name.gumartinm.weather.information.widget.WidgetConfigure;
import org.apache.http.client.ClientProtocolException;
final ServiceCurrentParser weatherService = new ServiceCurrentParser(new JPOSCurrentParser());
final CustomHTTPClient HTTPClient = new CustomHTTPClient(
- AndroidHttpClient.newInstance("Android 4.3 WeatherInformation Agent"));
+ AndroidHttpClient.newInstance(this.getString(R.string.http_client_agent)));
try {
return this.getRemoteCurrentThrowable(weatherLocation, HTTPClient, weatherService);
See the License for the specific language governing permissions and
limitations under the License.
-->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
+<resources>
<string name="app_name">Weather Information</string>
<string name="icon_weather_description">Icon weather</string>
<string name="openweahtermap_url">http://openweathermap.org/</string>
<string name="title_activity_about">About</string>
<string name="action_settings">Settings</string>
+ <string name="http_client_agent">Android WeatherInformation Agent</string>
</resources>