I've got following method in a class, which is a custom adapter for an ListView.
convertView.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
String test = availableDevices.get(position).getAddress().toString();
}
});
The String test
contains a mac-address of a device. My question is: How can I pass this variable to a new activity. It seems to me that I cant do it the usual way like this:
Intent intent = new Intent();
intent.setClass(Activity1.this, Activity2.class);
startActivityForResult(**,**);