Open nikhilgarg89 opened 5 years ago
@stealthcopter any workaround possible.. ??
@stealthcopter your help is appreciated
@stealthcopter your help is appreciated
@nikhilgarg89 Use the following method to run on the Ui thread inside onFinished
or in onDeviceFound
@Override
public void onFinished(ArrayList<Device> devicesFound) {
final List<Device> devices = devicesFound; //to be referenced inside the Handler
//run on UI thread
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
//todo manipulate UI
}
});
}
@lcabrales I have tried your solution by adding new Handler into my PortScan() function, however it still blocked my Progress Dialog and hang.
Is there any ways to prevent this blocking of Progress Dialog?
You may refer more details of my issues here: https://github.com/stealthcopter/AndroidNetworkTools/issues/58
Thanks.
@lcabrales @nikhilgarg89
Any clues on solving this issue?
Thanks.
I've just tested the sample app on android 6.0 and I'm not having any UI blocking issues. What device are you using? Try lowering the thread count in case your device is using maximum CPU and causing an actual hang.
@jerrychong25 please post your full example with ProgressDialog and I'll run some tests on it to find out what's going on.
Thanks
App is blocking the UI and crashing in android 6.0 and below when i am doing subnet devices. this is reproducible in sample code.