@Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.search_result);

    Bundle extras = getIntent().getExtras();

    if (extras != null) {
      // Fetch all the parameters from the caller activity
      String provider_name = extras.getString("provider_name");
      String has_parking = extras.getString("has_parking");
      String accepting_new = extras.getString("accepting_new");
      String handicap = extras.getString("handicap");
      String appointment_only = extras.getString("appointment_only");
      String credit_card = extras.getString("credit_card");
      String type = extras.getString("type");
      String distance = extras.getString("distance");

      // Only load the current location when the search criteria includes distance
      // This saves the time it takes to load the search result in most cases
      if (distance.length() > 0) {
        locationClick();
        // load the longitude and latitude here
        this.m_loading_dialog =
            ProgressDialog.show(this, "", "Finding your current location. Please wait...", true);
      }

      // Obtain a list of satisfied provider by querying the backend database
      this.satisfiedproviders =
          ProviderHelper.getSatisfiedProvider(
              provider_name,
              has_parking,
              accepting_new,
              handicap,
              appointment_only,
              credit_card,
              type,
              distance,
              this.m_latitude,
              this.m_longitude);

      if (this.satisfiedproviders.size() == 0) {
        Context context = getApplicationContext();
        Toast toast =
            Toast.makeText(
                context,
                "No provider found. Please refine your search criteria",
                Toast.LENGTH_SHORT);
        toast.show();
        finish();
      }

      // Set up the list view for the search results
      this.providerList = (ListView) this.findViewById(R.id.search_result_list);
      this.providerList.setAdapter(new SearchResultAdapter(this));
    }
  }