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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:09:54+00:00 2026-05-30T07:09:54+00:00

I already tried the following but without success. My project is using API level

  • 0

I already tried the following but without success.
My project is using API level 4.

from stackoverflow

from android documentation

Here is my code:

webView.loadUrl("android.resource://com.package.name.from.manifest/" + R.drawable.pic); 

And I’ve got the following error in the WebView widget:

Web page not available

The Web page at
android.resource://com.package.name.from.manifest/2130837504 might be
temporarily down or it may have moved permanently to a new web
address.

Am I missing something? Should I create html page which will include a link to the resource as < img …> tag?

  • 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-30T07:09:55+00:00Added an answer on May 30, 2026 at 7:09 am

    In the end I have done the following:

    I had an array of file name extensions of each of the image in resources.
    And then I could call the following method with the resource ID and it’s file name extension.

    protected String getResourceURL(int resourceId, String extension) {
        String resName = getResources().getResourceName(resourceId);
        int index = resName.indexOf("/");
        resName = resName.substring(0, index);
        index = resName.indexOf(":");
        String resType = resName.substring(index + 1);
    
        StringBuilder link = new StringBuilder(128);
        link.append("file:///android_res/");
        link.append(resType).append("/");
        link.append(getResources().getResourceEntryName(resourceId));
        link.append(".").append(extension);
        return link.toString();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I cannot import a maven project with WTP features enabled. I have already tried:
I am using OpenOffice in my system and already I tried about it, also
Following various example configurations from Spring documentation as well as some forums on the
I've been using cucumber without trouble for with Rails 3 for a while, but
I try similar questions but without success. Please, Can someone help me on the
I already tried getting the current URL of my UIWebView with: webview.request.URL . Unfortunately
I have already tried PreRenderComplete and unload is too late
Has anyone already tried this, anything particulair that I need to be aware of?
In .NET I have already tried the configuration below successfully: <system.net> <connectionManagement> <add address=*
Is there anyone who has already tried to use the Microsoft Bing translator web

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.