2

i am able to open google.com from emulator browser.but in coding i am not able to show any thing.that is my code.i already write internet permission.any extra emulator setting?

public class TestActivity extends Activity { WebView webview; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); System.setProperty("http.proxyHost","192.168.0.2"); System.setProperty("http.proxyPort","8080"); webview = (WebView) findViewById(R.id.webview); webview.getSettings().setJavaScriptEnabled(true); webview.loadUrl("http://www.google.com"); } } 
6
  • stackoverflow.com/questions/6979797/… Commented Oct 11, 2011 at 12:07
  • thanks for reply but i already did all stuff.it's not working.it show me"the web page at 'google.com' temporarily down or it may be move permanently".Any other emulator setting? Commented Oct 11, 2011 at 12:18
  • Please make sure that internet permission statement is correct ` <uses-permission android:name="android.permission.INTERNET" > </uses-permission>` Commented Oct 11, 2011 at 12:47
  • no sandy i have checked many times.one more question i want to ask,Is android emulator browser support pdf file?can i open pdf file by url in android emulator? Commented Oct 11, 2011 at 13:01
  • Browser does not support pdf. To view pdf through browser you have to install pdf viewer. <uses-permission> tag should have only one parent that is <manifest>. If u put permission statement in correct position then you will see Internet permission on permission tab. Pls check that also.. Commented Oct 11, 2011 at 13:15

1 Answer 1

3

open CMD prompt and go to SDK path...

D:\Android Setup\android-sdk-windows\tools 

write down this following command...

emulator -avd "name" -dns-server 8.8.8.8 
Sign up to request clarification or add additional context in comments.

1 Comment

thanks for reply but it's not working.it show me"the web page at 'google.com'; temporarily down or it may be move permanently".Any other emulator setting?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.