0
I know how to get the value of an array position and compare the array values. As code below.
for (int i = 0; i < listadosWifi.size(); i++) {
/* pega o SSID e o BSSID */
providerName = "\n"+(listadosWifi.get(i).SSID).toString()+ "\n"+(listadosWifi.get(i).level);
listViwProvider = (ListView) findViewById(R.id.list_view_wifi);
listaFornecedores.add(providerName);
t1.speak("Redes Disponíveis: " + providerName, TextToSpeech.QUEUE_ADD, null, null);
t1.setPitch(1);
if (listadosWifi.get(i).level < -10 && listadosWifi.get(i).level > -50 ) {
t1.speak("Você está próximo de: " + providerName, TextToSpeech.QUEUE_FLUSH, null, null);
t1.setPitch(1);
if(listadosWifi.get(i).level < -50){
t1.speak("Você está próximo de: " + providerName, TextToSpeech.QUEUE_FLUSH, null, null);
t1.setPitch(1);
}
}
}
Now I want to match 1 value that is in 1 array with another value of another array, even if they change order. Because I want to do a real-time match. How can I do this and use thread to update periodically?
You want to check if each element of an array exists in another, traversing all two arrays?! Is that it?
– viana
No! The following, as shown in the code, is an array that stores the network name and another array that stores the signal strength. But I need to take the first value of the array (nameWifi),(signal), match them and make a comparison with all other values in real time. So that way , using TTS, the app tells me which Wifi I’m closest to and when I walk away from it, the app says I’m moving away. In this , the network that has the largest signal will pass to the previous position?
– GGF