Essentially, for the Windows machine, you need to know the IP address. This is the address on the network that other devices will use to contact it. If you have an open TCP/IP socket already, then you already know this address.
HTTP is a TCP-based protocol. It works just like your HTTP socket, listening by default for connections on port 80. From the documentation, it looks as though the default port for Wamp is port 80.
From your connection activity containing the webview (from here):
private WebView webview;
public void onCreate(Bundle savedInstanceState) {
[initialize stuff as needed ...]
this.webview = (WebView)findViewById(R.id.webview);
WebSettings settings = this.webview.getSettings();
settings.setJavaScriptEnabled(true);
this.webview.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
webview.setWebViewClient(new WebViewClient() {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
Log.i(TAG, "Processing webview url click...");
view.loadUrl(url);
return true;
}
public void onPageFinished(WebView view, String url) {
Log.i(TAG, "Finished loading URL: " +url);
if (progressBar.isShowing()) {
progressBar.dismiss();
}
}
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
Log.e(TAG, "Error: " + description);
Toast.makeText(activity, "Oh no! " + description, Toast.LENGTH_SHORT).show();
alertDialog.setTitle("Error");
alertDialog.setMessage(description);
alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
return;
}
});
alertDialog.show();
}
});
}
Then, whenever you want to load or reload the URL into the web view:
this.webview.loadUrl("http://ipaddress/");
Where ipaddress is the IP you use to connect using your TCP socket. If for some reason your Windows machine does not run the HTTP server on port 80 (configurable in the httpd.conf that comes with the Apache inside Wamp), you can specify the port in the URL as well (port 8080 in this example):
this.webview.loadUrl("http://ipaddress:8080/");