How to putExtra() in Searchable Dictionary Example
<p>based on the <a href="http://developer.android.com/resources/samples/SearchableDictionary/index.html" rel="nofollow">Searchable Dictionary</a> sample I tried to put extra data to a different activity. </p>

<pre><code> public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    Spinner distance = (Spinner) findViewById(R.id.distanceSpinner);
    ArrayAdapter&lt;CharSequence&gt; adapterDistance = ArrayAdapter.createFromResource(
                this, R.array.distance, android.R.layout.simple_spinner_item);
    adapterDistance.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    distance.setAdapter(adapterDistance);
    Intent intent = getIntent();

    if (Intent.ACTION_VIEW.equals(intent.getAction())) {         
            // handles a click on a search suggestion; launches activity to show word
         mapIntent = new Intent(this, Map.class);
         mapIntent.setData(intent.getData());         
         mapIntent.putExtra("Distance", distance.getSelectedItemPosition());
            startActivity(mapIntent);
            finish();
        }
}
</code></pre>

<p>In my Map Class Distance is always zero because distance.getSelectedItemPostion() gets the initialized value.
How can I putExtra data with a click on a search suggestion?
Thanks</p>
