Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 452567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:05:08+00:00 2026-05-12T22:05:08+00:00

I have a WebView that I’m using to open some files stored in the

  • 0

I have a WebView that I’m using to open some files stored in the assets/ directory of my project. It works fine for most of the files, but there’s one in particular (and I’m sure others I haven’t found) that it just will not open.

The file I’m having problems with is named:

"assets/ContentRoot/Photos/XXX Software Logo - jpg - 75%.JPG"

When I pass it to WebView, and it shows the error page, it shows it as:

"file:///android_asset/ContentRoot/Photos/XXX%20Software%20Logo%20-%20jpg%20-%2075%.JPG"

I then tried running URLEncoder.encode() on it and got the error page with the URL presented as:

"file:///android_asset/ContentRoot/Photos/XXX+Software+Logo+-+jpg+-+75%.JPG"

Neither of these URLs were able to open the file (and they both look okay to me). Anyone have any ideas?

UPDATE: If I encode the % by hand (using %25, as commonsware.com suggested) then it loads the image, but it tries to parse it as text, not as an image, so I just get a lot of (basically) garbage.

Hosted by imgur.com

Also, referring to the image in an HTML document with a relative URL isn’t working (probably because it’s not being parsed as an image?):

<img src="../Photos/XXX%20Software%20Logo%20-%20jpg%20-%2075%.JPG" />
<img src="../Photos/XXX%20Software%20Logo%20-%20jpg%20-%2075%25.JPG" />
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T22:05:08+00:00Added an answer on May 12, 2026 at 10:05 pm

    Okay, after spending way too long on this, I’ve figured out what’s going on. Basically, if images stored in the assets/ directory contain a space (e.g., ” “) in their file name, they won’t render as images.

    myWebView.loadUrl("file:///android_asset/testimage.jpg");
    

    works fine. However,

    myWebView.loadUrl("file:///android_asset/test+image.jpg");
    

    just throws a not found error and

    myWebView.loadUrl("file:///android_asset/test image.jpg");
    // and
    myWebView.loadUrl("file:///android_asset/test%20image.jpg");
    

    show it improperly displayed (as text… see screenshot in question).

    This unexpected behaviour is present on (at least) 1.5, 1.6, and 2.0 and I filed a bug report.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 277k
  • Answers 277k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I solved the problem. The Client Access (5.9) version installed… May 13, 2026 at 2:54 pm
  • Editorial Team
    Editorial Team added an answer public static IEnumerable<UIElement> Traverse(this UIElementCollection source) { //This is the… May 13, 2026 at 2:54 pm
  • Editorial Team
    Editorial Team added an answer Without looking at the code for [self showAvailableCuts:sender]; all I… May 13, 2026 at 2:54 pm

Related Questions

I have a WebView that I'm using to open some files stored in the
I have a webview in my iPhone application, and I also have some html
I have a C++ class running in its own thread that needs to execute
So I have a webview I'd like to display as a dialog. I'd like
I have a simple WebView-based activity that follows the Hello, WebView example to enable

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.