Android Webview behind proxy

Android Webview behind proxy

  • Comments 4

Lately I have been working on Android platform. If you are behind a proxy in your company and working with the simulator here are the steps to get the browser working

Settings -> Wireless Networks ->mobile networks-> access point names->telkila. Now enter the proxy server address and port (which will be 80).

However, if you are working with WebView control in your app then above will not work unless your code has following line in onCreate()

WebView.enablePlatformNotifications();

You might want to restart the emulator after this to test your app again.

Comments
  • WebView.enablePlatformNotifications() causes my application to crash and have to Force Stop it.   Cant figure out how to get my webview activity to work behind proxy. Let me know if you have anything more to share

  • Hmm... I have this code running on Android 2.1/2.2 simulator and an Android 2.1 device.

  • add this permission

       <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

  • Thanks Buddy!

    webView.enablePlatformNotifications(); Helped me :)

Page 1 of 1 (4 items)
Leave a Comment
  • Please add 6 and 4 and type the answer here:
  • Post