I have a list of countries of type ListView, and when I click in Brazil I get the String "Brazil" with the "getItem (position)" but instead I would like to get another data, in the case the "BR" that is in the database. Does anyone have any idea how to get it? Note: I am getting all the data from the bank and using queries to extract results. Here is the code I'm using:
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
String stringPaises = adapter.getItem(position);
Intent i = new Intent(this, Activity2.class);
i.putExtra("stringPaises", stringPaises);
startActivityForResult(i, 0);
}