Skip to content
Snippets Groups Projects
Commit 33992c74 authored by Harrion VENIER's avatar Harrion VENIER
Browse files

add var name device for save to bdd

parent 04f618e2
Branches
No related merge requests found
......@@ -41,6 +41,7 @@ public class SendActivity extends AppCompatActivity {
SendActivity myApp = this;
ListView listView;
ClientClass clientClass;
String[] nameDevice;
String test ="yolo";
byte[] imageData;
......@@ -108,7 +109,7 @@ public class SendActivity extends AppCompatActivity {
@Override
public void onClick(View v) {
Set<BluetoothDevice> bt=bluetoothAdapter.getBondedDevices();
String[] strings=new String[bt.size()];
nameDevice=new String[bt.size()];
btArray=new BluetoothDevice[bt.size()];
int index=0;
......@@ -118,11 +119,11 @@ public class SendActivity extends AppCompatActivity {
{
btArray[index]= device;
System.out.println(btArray[index]);
strings[index]=device.getName();
nameDevice[index]=device.getName();
index++;
}
ArrayAdapter<String> arrayAdapter=new ArrayAdapter<String>(myApp.getApplicationContext(),android.R.layout.simple_list_item_1,strings);
ArrayAdapter<String> arrayAdapter=new ArrayAdapter<String>(myApp.getApplicationContext(),android.R.layout.simple_list_item_1,nameDevice);
listView.setAdapter(arrayAdapter);
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment