0

I am making a website and I am using delphi server. And I created webview in android. I take ip address. like this code:

package com.mkyong.android;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

public class WebViewActivity extends Activity {

private WebView webView;

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.webview);


    webView  = (WebView) findViewById(R.id.webView1);
    webView.getSettings().setJavaScriptEnabled(true);

    webView.loadUrl("http:\\www.google.com");




}

}

its run.

but If I write webView.loadUrl("this is internet site address"); Now working actually not loading. I can not understand.

I am writting this ip(bla.bla.bla.bla:bla) its working on browser.So its loading web browser but not loading on android.

What is problem ?

1 Answer 1

1

Give this permissions in manifest.xml.

    <!-- GCM connects to Internet Services. -->
<uses-permission android:name="android.permission.INTERNET" />

  <!-- Network State Permissions -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.