Friday, May 28, 2010

Re: [android-developers] WebView encoding? why?

I think your puzzlement is well justified. It would seem to make more sense that the first parameter should be byte[] instead of String.
 
Without looking at the Android source, I have some hypothesis:
 
1. The loadUrl() method indicates mimeType may be "image/jpeg" and encoding may be "base64". In this case it would be reasonable that although the first parameter is String, the correct loading of the data would require knowing the encoding (although I don't know what other encoding may be reasonable).
2. In the absence of the ContentType HTTP header, you need to specify the second and third parameters, perhaps because the WebView methods delegate to another class/method that does require them.
3. Perhaps the encoding parameter is entirely ignored in the case that the mimeType is text/*. That's where looking at the source would be helpful.
 
 

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate