Back to project page android-weather-demo-application.
The source code is released under:
GNU General Public License
If you think the Android project android-weather-demo-application listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.openweathermap.asynctask; /* ww w . j a v a2 s . c om*/ import org.openweathermap.WeatherApplication; import org.openweathermap.asynctask.base.BaseAsyncTask; import org.openweathermap.asynctask.base.BaseResponse; import org.openweathermap.asynctask.base.IParam; import org.openweathermap.asynctask.response.GetCitiesResponse; import org.openweathermap.sql.model.CityModel; import android.content.Context; /** * @author samkirton */ public class GetCitiesAsyncTask extends BaseAsyncTask { public GetCitiesAsyncTask(Context context) { super(context); } @Override protected BaseResponse run(IParam param) { CityModel[] cityModelArray = WeatherApplication.getInstance().getSQLProvider().selectAll( CityModel.class, new CityModel(), "lastViewedTimestamp DESC", "0, 20" ); GetCitiesResponse getCitiesResponse = new GetCitiesResponse(); getCitiesResponse.setCityModelArray(cityModelArray); return getCitiesResponse; } }