Android Open Source - unicef_gis_mobile Fetch Tags Task

From Project

Back to project page unicef_gis_mobile.


The source code is released under:

MIT License

If you think the Android project unicef_gis_mobile listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.unicef.gis.ui;
/*from   ww  w  .j  a v  a 2 s.  c  om*/
import java.util.List;

import org.unicef.gis.infrastructure.ServerUrlPreferenceNotSetException;
import org.unicef.gis.infrastructure.UnicefGisApi;
import org.unicef.gis.model.Tag;

import android.os.AsyncTask;

public class FetchTagsTask extends AsyncTask<Void, Void, Integer> {
  public static final Integer RESULT_SUCCESS = 0;
  public static final Integer SERVER_URL_PREFERENCE_NOT_SET = 1;
  private final FetchTagsActivity context;
  public FetchTagsTask(FetchTagsActivity context) {
    this.context = context;
  protected Integer doInBackground(Void... arg0) {
    try {
      UnicefGisApi api = new UnicefGisApi(context);
      List<Tag> tags = api.getTags();
      UnicefGisStore store = new UnicefGisStore(context);
    } catch (ServerUrlPreferenceNotSetException e) {
    return RESULT_SUCCESS;
    protected void onPostExecute(Integer result) {

Java Source Code List