I have already one thread that has to do following work:
public class DetectionHandler extends TimerTask {
@Override
public void run() {
bluetoothAddresses = BluetoothModule.scanAddresses();
wiFiAddresses = WiFiModule.scanAddresses();
...//when scanning is finished, continue work
}
I would like that scanning to be parallel. So I assume that I have to call that two methods asynchronously. And when that scanning is finished, then I can continue work in DetectionHandler class.
I've tried the way that BluetoothModule and WiFiModule implements Runnable but had no luck. Tnx