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 6900597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:33:55+00:00 2026-05-27T07:33:55+00:00

I have went through all the posts on displaying local images on android phone.

  • 0

I have went through all the posts on displaying local images on android phone. I can see the local image on emulator but on phone – “Webpage not available”. However I can load other webpages on phone with webView.loadUrl(“http://www.google.com/”);

I have set internet permissions

<uses-permission android:name="android.permission.INTERNET"/>

The image is in raw folder and using display.html file to read it

WebView webView = (WebView) findViewById(R.id.webview);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setPluginsEnabled(true);
webView.loadUrl("file:///android_res/raw/display.html");

// display.html in raw folder

<html>
  <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <img src="file:///android_res/raw/image.jpg" width="50px" alt="Hello">
  </body>
</html>
  • 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-27T07:33:56+00:00Added an answer on May 27, 2026 at 7:33 am

    Are you by any chance running the code on a phone with API Level < 8 (Android 2.1 and lower) and testing it on an emulator running a more recent version?

    file:///android_res/... only works for 2.2+.

    Alternatively you can try putting the image in the assets folder and reference it by file:///android_asset/..., which apparently is also supported on devices running older versions. Unfortunately you will lose the ability to automatically load up resources appropriate to the device’s screen size and density.

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

Sidebar

Related Questions

I have went through a few links here, not all of them, regarding MKPinAnnotationView
I have went through google api documentation and so many reference links. but i
I went through all the questions on SOF and did my homework but still
I will admit right now I have gone through all of the posts though
I went through all the steps on the android dev site, installed all the
Introduction I'm relatively new to C++. I went through all the basic stuff and
I went through a similar question here . But I am yet not clear
I went through all the examples online and could not figure out how to
I have went through couple of questions already asked related with this and i
i've recently released an app to the App store, i went to have a

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.