Paso 4: Android: código parte 1 de la clase.
Hay otro método llamado myListClickListener. Permite el control ListView al hacer clic.
private AdapterView.OnItemClickListener myListClickListener = new AdapterView.OnItemClickListener() { public void onItemClick (AdapterView av, View v, int arg2, long arg3) { // Get the device MAC address, the last 17 chars in the View String info = ((TextView) v).getText().toString(); String address = info.substring(info.length() - 17); // Make an intent to start next activity. Intent i = new Intent(DeviceList.this, ledControl.class); //Change the activity. i.putExtra(EXTRA_ADDRESS, address); //this will be received at ledControl (class) Activity startActivity(i); } };