Getting back to the original issue: it's an Android bug.
Even if the space is encoded properly (as %20) it may not open in the
built-in HtmlViewer application on some devices.
This is from my own little app's logcat output:
04-19 00:38:53.939 I/MimeUtil(23624): Intent: Intent {
act=android.intent.action.VIEW
dat=file:///mnt/sdcard/download/test%202.html typ=text/html flg=0x80000 }
04-19 00:38:53.939 I/MimeUtil(23624): Resolved package
com.android.htmlviewer, name com.android.htmlviewer.HTMLViewerActivity
The original filename is "test 2.html".
On an Xperia Arc with 2.3.4, the Html viewer comes up, and the window
says "Web page not available".
It also contains a link that is differnet from what was specified by the
intent, something like "content://com.android.htmlfileprovider/<file
path here>?text/html".
On an HTC Incredible S it's working now, but I received an OTA firmware
update just recently, and before then, it was also broken.
It's also broken on my Galaxy Nexus with 4.0.2, so the fix on the
Incredible S was made by HTC just for their own firmwares.
On the devices where this fails, an almost identical link but without
the embedded (and encoded) space works just fine.
-- K
On 04/19/2012 12:11 AM, Justin Anderson wrote:
Jovish, you need to ask these questions elsewhere (like
StackOverflow or the Android Developers list).
According to
http://developer.android.com/resources/community-groups.html, this
list is for ANYTHING related to Android.
/The "water cooler" of Android discussion. You can discuss just about
anything Android-related here, ideas for the Android platform,
announcements about your applications, discussions about Android
devices, community resources... As long as your discussion is related
to Android, it's on-topic here.
/
But the OP should also be aware that it also says "/However, if you
have a discussion here that could belong on another list, you are
probably not reaching all of your target audience here and may want to
consider shifting to a more targeted list."/
Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware
On Wed, Apr 18, 2012 at 1:34 PM, Nadeem Hasan <[email protected]
<mailto:[email protected]>> wrote:
Also, see this:
http://android.stackexchange.com/questions/4775/how-can-i-open-an-html-file-i-have-copied-from-pc-to-sd-card-of-phone
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to
[email protected]
<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]
<mailto:android-developers%[email protected]>
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en