title: Passing multiple parameters from a database using onItemClick android
body: <p>I'm trying to figure out a way to pass multiple parameters when a user clicks a string using my app. I can currently only pass one string but I have to pass another string as well. I'm passing a city (IE an actually city string, Boston, Miami etc..). My goal is to pass the associated state along with the city. For example, Boston would also pass Massachusetts, Mimi would pass Florida etc... </p>
  
  <p>My question is, how would I pass the state parameter that's associated with that city?</p>
  
  <p>The information I'm passing is coming from a URL on the internet</p>
  
  <p>My URL looks like this
  <a href="http://mywebsite.com/getDealershipCity.php?StateID=florida&amp;CityID=miami" rel="nofollow">http://mywebsite.com/getDealershipCity.php?StateID=florida&amp;CityID=miami</a></p>
  
  <pre><code>    getAllCitiesTextView.setOnItemClickListener(new OnItemClickListener(){
  
          @Override
          public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
  
  
              String cityClicked = null;
              try {
                  cityClicked = jsonArray.getString(position);
              } catch (JSONException e) {
                  e.printStackTrace();
              }
  
              Log.e("showing position before method = ", cityClicked);
  
              APIConnector haveToAccessAMethod = new APIConnector();
              String cityClickedAfterMethod = haveToAccessAMethod.returnTheCityString(cityClicked);
  
              Log.e("showing position after method = ", cityClickedAfterMethod);
  
              Intent show = new Intent(getApplicationContext(), DealerDetailsActivity.class);
              show.putExtra("cityID", cityClickedAfterMethod);
  
              startActivity(show);
  
  
          }
  
  
      });
  
  }
  </code></pre>