I already have one thread that should do the following work:
public class DetectionHandler extends TimerTask {
@Override
public void run() {
bluetoothAddresses = BluetoothModule.scanAddresses();
wiFiAddresses = WiFiModule.scanAddresses();
...
}
I would like this scan to be parallel. Therefore, I assume that I should use these two methods asynchronously. And when this scan is finished, I can continue to work in the DetectionHandler class.
I tried both BluetoothModule and WiFiModule implements Runnable, but no luck. Tnx
source
share