title: How to add String - Integer pair inside Bundle?
body: <p>I have used like this but it is not working.
  I want to store as String as key and Integer as value and by invoking getInt() I should get that Integer values, which can use to make call dynamically, according to the click on list items. I have posted my code. </p>
  
  <pre><code>public class MainActivity extends Activity {
  
  ListView emrcontact;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      emrcontact=(ListView) findViewById(R.id.listView1);
  
      final String[] emergency={"Local Police", "Fire Service", "Ambulance", "Blood Bank", "Womens Helpline", "Child Helpline", "Indian Railways"};
      ArrayAdapter&lt;String&gt; adapter=new ArrayAdapter&lt;String&gt;(MainActivity.this,android.R.layout.simple_list_item_1,emergency);
      emrcontact.setAdapter(adapter);
  
  
  
  
  
      emrcontact.setOnItemClickListener(new OnItemClickListener() {
  
          @Override
          public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int pos,
                  long arg3) {
  
              Bundle dataBundle=new Bundle();
              dataBundle.putInt("Local Police",100);
              dataBundle.putInt("Fire Service",101);
              dataBundle.putInt("Ambulance",102);
              dataBundle.putInt("Blood Bank",104);
              dataBundle.putInt("Womens Helpline",181);
              dataBundle.putInt("Child Helpline",1098);
              dataBundle.putInt("Indian Railways",1322);
              Intent dataIntent = new Intent();
              dataIntent.putExtras(dataBundle);
  
              Bundle b=getIntent().getExtras();
  
              switch (pos) {
  
              case 0:
                  if(b!=null) 
                  {
                  callToemrcontact(b.getInt("Local Police"));
                  }
                  break;
  
              case 1:
  
                  if(b!=null) 
                  {
                  callToemrcontact(b.getInt("Fire Service"));
                  }
                  break;
  
              case 2:
  
                  if(b!=null) 
                  {
                  callToemrcontact(b.getInt("Ambulance"));
                  }
                  break;
  
              case 3:
  
                  if(b!=null) 
                  {
                  callToemrcontact(b.getInt("Blood Bank"));
                  }
                  break;
  
              case 4:
  
                  if(b!=null) 
                  {
                  callToemrcontact(b.getInt("Womens Helpline"));
                  }
                  break;
  
              case 5:
  
                  if(b!=null) 
                  {
                  callToemrcontact(b.getInt("Child Helpline"));
                  }
                  break;
  
              case 6:
  
                  if(b!=null) 
                  {
                  callToemrcontact(b.getInt("Indian Railways"));
                  }
                  break;
  
              default:
                  break;
              }
  
  
          }
      });
  
  
  
  
  }
  void callToemrcontact(int i)
  {
       Intent intent=new Intent(Intent.ACTION_DIAL);
       intent.setData(Uri.parse("tel:"+"i"));
       startActivity(intent);
  }
  }
  </code></pre>
  
  <p>logcat result is as below:</p>
  
  <pre><code>10-08 06:20:25.407: E/Trace(805): error opening trace file: No such file or directory (2)
  10-08 06:20:25.967: D/dalvikvm(805): GC_FOR_ALLOC freed 58K, 8% free 2442K/2640K, paused 44ms, total 52ms
  10-08 06:20:26.017: I/dalvikvm-heap(805): Grow heap (frag case) to 4.767MB for 2359312-byte allocation
  10-08 06:20:26.107: D/dalvikvm(805): GC_FOR_ALLOC freed 2K, 5% free 4743K/4948K, paused 83ms, total 83ms
  10-08 06:20:26.227: D/dalvikvm(805): GC_CONCURRENT freed &lt;1K, 5% free 4743K/4948K, paused 5ms+4ms, total 119ms
  10-08 06:20:26.467: D/dalvikvm(805): GC_CONCURRENT freed 2305K, 45% free 3115K/5616K, paused 20ms+25ms, total 79ms
  10-08 06:20:26.737: D/libEGL(805): loaded /system/lib/egl/libEGL_emulation.so
  10-08 06:20:26.747: D/(805): HostConnection::get() New Host Connection established 0x2a148e68, tid 805
  10-08 06:20:26.777: D/libEGL(805): loaded /system/lib/egl/libGLESv1_CM_emulation.so
  10-08 06:20:26.797: D/libEGL(805): loaded /system/lib/egl/libGLESv2_emulation.so
  10-08 06:20:26.877: W/EGL_emulation(805): eglSurfaceAttrib not implemented
  10-08 06:20:26.897: D/OpenGLRenderer(805): Enabling debug mode 0
  </code></pre>