This code is not reading the value from the spinner it's reading only the first value always,
btnResult.setOnClickListener(new View.OnClickListener()
{
final String USN = spnConversions.getSelectedItem().toString();
@Override
public void onClick(View v)
{
Intent i = new Intent(getApplicationContext(), DatabaseResult.class);
i.putExtra("getData",USN.toString());
startActivity(i);
}
});
try this
Why you are using onClickListener for Spinner ? You should use OnItemSelectedListener() for Spinner see the below example code,
Now register listener using following code,
You can pass it using following code,
// Sending Code
// Receiving code,