How do i connect values to my listview in android and fetch them according to item click
<p>Actually I am making an emergency number app and I want phone numbers to be clicked according to list view item clicked.</p>

<p>So I want different phone numbers behind the list item click and make them to be in use there may be 2 or 3 phone number and each will be behind a button. </p>

<p>For example, like these steps:</p>

<ol>
<li>either you call from city "lahore", "karachi"   </li>
<li>and eg if karachi
button clicked, it will fetch data(phone no) according to "karachi"
city and do call.</li>
</ol>

<p>.</p>

<pre><code>public class EmergencyContacts extends ListActivity {

  static final String[] EmergencyNumbers = new String[]{
        "Ambulance","Hilal-e-Ahmar","Edhi Trust","Bomb Disposal","Board of Secondary Education",
        "Chambers of Commerce &amp; Industry","Civil Defence","Civil Secretariat","Export Promotion ",
        "Bureau","Fatmid Blood ","Transfusion ","Fire Brigade Center","General post office(GPO)",
        "Govt. transport(GTS)","Hospital Civil(casualties)","Hospital services (Casualties)",
        "Income Tax","Metropolitan corp.","News Agency(APP)","Police Emergency","Railway Station (City)",
        "PIA Flight Enquiry","PIA Reservation","PIA Cargo","Passport Office","PTV ","Pakistan Tourism Dev. Corp.",
        "PAF (Recrut)","Pakistan Army (Recruiting)","Pakistan Navy (Recruiting)","Radio Pakistan","Railway Enquiry",
        "Railway Reservation (Cantt.)","Railway Reservation (city)","Sui Gas Complaints","Time Enquiry",
        "Telephone Enquiry","Telephone Complaints","Trunk Overseas ","Booking","Trunk inland Enquiry","Phonogram",
        "Overseas Booking","Overseas Enquiry","Telegraph Enquiry","Text Book Board","University","University Allama Iqbal",
        "University of Engin and Tech","Weather (Enq)","Wapda (Enq)","PAKISTAN TOURISM DEV. CORP","PAKISTAN ARMY (RECRUITING)",
         "PAKISTAN NAVY (RECRUITING)"


   };



  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setListAdapter(new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_1,EmergencyNumbers));
    getListView().setTextFilterEnabled(true);

  }

  public void onListItemClick(ListView l, View v,int position,long id){

    //TODO Auto generated method stub
    super.onListItemClick(l,v,position,id);

    AlertDialog.Builder builder = new AlertDialog.Builder(this);
    builder.setMessage("Are you sure you want to Call to?"+"\n"+getListView().getItemAtPosition(position))
            .setCancelable(false)
            .setPositiveButton("Cancel", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int id) {

                }
            })
            .setNegativeButton("Yes", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int id) {

                   // EmergencyContacts.this.finish();


                     Intent callTo = new Intent(EmergencyContacts.this,CallTo.class);
                    startActivity(callTo);

                }
            });
    AlertDialog alert = builder.create();
    alert.show();
</code></pre>