I have an Activity which is basically a big webview with some other buttons. Normally, I load urls to the webview, and everything works fine. But there is one website, of which all urls are loaded as source files instead of normal html (the browser shows plain text containing the html tags). The strange thing is that using the phone’s browser this url loads just fine.
http://pelephone.ynet.mobile1.co.il/default.aspx?N=/ynet/ArticleList.aspx?category=3
Maybe this has something to do with the aspx file? in my laptop computer the url is not loaded, but downloaded as a file. but still, the phone’s browser handles it just fine.
Thanks so much for your help!
It’s definitely an issue with the URL, or in general with WML URLs.
The mime type of the supplied URL is “text/vnd.wap.wml”. Android does not support that,
it displays the source of such pages as plain text. You can find the relevant piece of code
in git://android.git.kernel.org/platform/frameworks/base.git/core/java/android/webkit/LoadListener.java (line 375).
So that’s the correct framework behavior (which applies to WebViews).
Im not sure why the browser displays that, basically it should not, and does not here (Tested with an 1.6. and 2.3 emulator and my 2.2. HTC desire). Are you sure your browser is stock? Maybe you are using an alternative browser such as Opera. Or your provider/manufacturer added some wap support for their “premium-content” (if your phone is branded and/or has custom stuff like sense).