1
If I try to access the server’s localhost directly through Chrome I can log in but through an application the page is empty, follow the code:
public class WebActivity extends Activity {
private WebView webView;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.webcontent);
webView = (WebView) findViewById(R.id.webView);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("192.168.1.66/sir1415/teste/teste.html");
}
Does a logcat error appear in the IDE? Did you ever try to put the protocol in the url? e. g:
http://192.192.168.1.66/sir1415/teste/teste.html
. I believe the browser does this transparently.– Wakim
No error appears and this setting also does not work
– SaPires
Try to use
http://10.0.2.2/
. This is a special IP address for routes the emulator uses for localhost on your machine.– iTSangar