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

  • SEARCH
  • Home
  • 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 8425835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:23:00+00:00 2026-06-10T04:23:00+00:00

Hi I have implemented an android web server and I am serving html pages

  • 0

Hi I have implemented an android web server and I am serving html pages on the fly, based on the uri requested.

When I try to include images from my sdcard they are not showing up on the html page. I have the requisite permissions in the manifest. I have tried looking around but, most of the examples involve images within webview. I am using the following code to get path to the .png files on the sdcard.

String file_icon=Environment.getExternalStorageDirectory().getAbsolutePath()+"/file_icon.png";
String folder_icon=Environment.getExternalStorageDirectory().getAbsolutePath()+"/folder_icon.png";

and I am writing to the outputstream using the following

writer.write("<tr><td><input type=\"checkbox\" name=\""+files.toString()+"\" value=\"file\"/></td><td><a href=\"\"><img src=\""+file_icon+"\"/>"+files.toString()+"</a></tr>");
writer.write("<tr><td><input type=\"checkbox\" name=\""+files.toString()+"\" value=\"file\"/></td><td><a href=\"\"><img src=\""+folder_icon+"\"/>"+files.toString()+"</a></tr>");

When I fire up the emulator and visit the page I see no images.
screen http://img820.imageshack.us/img820/7973/capturekuw.png

Any ideas or pointers in the right direction would be greatly appreciated.Thanks.

  • 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-06-10T04:23:01+00:00Added an answer on June 10, 2026 at 4:23 am

    After looking around I found out that I needed to implement a ContentProvider and override the openFile() method.
    http://www.techjini.com/blog/2009/01/10/android-tip-1-contentprovider-accessing-local-file-system-from-webview-showing-image-in-webview-using-content/

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

Sidebar

Related Questions

I have implemented an Android code that calls a SOAP web service. The web
I have a requirement to do a web based interactive application in which server
I have Restful Web Service implemented by Jersey. I connect from Android via HTTP
I have implemented onRetainNonConfigurationInstance() on one of my Activity to handle android screen orientation.
I have made an android app which working fine. I implemented the Login functionality
I have android device with root and i try to implement some small app.
I am a begginer in android,here I have activity that use web service: SoapObject
I have web services written using java which interacts with the android application only
I have implemented an HTTPOperations class in Android that can successfully produce an HTTP
I am developing an android game application,I have implemented all the screens.Now i want

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.