I have xampp installed and setup "Microsoft LoopBack Adaptor" and was able to access my webpage at "http://localhost/Apryx/audiovideo/" with following snipet of code in my activity onCreate method.
WebView mainWebView = (WebView) findViewById(R.id.act1WebView);
mainWebView.getSettings().setAppCacheMaxSize( 5 * 1024 * 1024 ); // 5MB
mainWebView.getSettings().setAppCachePath( getApplicationContext().getCacheDir().getAbsolutePath() );
mainWebView.getSettings().setAllowFileAccess( true );
mainWebView.getSettings().setAppCacheEnabled( true );
mainWebView.getSettings().setJavaScriptEnabled( true );
mainWebView.getSettings().setCacheMode( WebSettings.LOAD_DEFAULT ); // load online by default
if ( !isNetworkAvailable() ) { // loading offline
mainWebView.getSettings().setCacheMode( WebSettings.LOAD_CACHE_ELSE_NETWORK );
}
mainWebView.loadUrl( "http://10.0.2.2/Apryx/audiovideo" );
Problem is, it keeps getting out and opening in browser , i want it to open in webView of app.