Problem solved by using
runOnUiThread(new Runnable() {
public void run() {
index.loadUrl("javascript:setSettings('" + webServiceURL + "','"
+ InputFolder + "','" + OutPutFolder + "')");
}
});