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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:25:11+00:00 2026-06-06T12:25:11+00:00

My Code:- public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.webview); // defining the WebView WebView

  • 0

My Code:-

public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.webview);
    // defining the WebView
    WebView myWebView = (WebView) findViewById(R.id.web);
    // Websetting can be used to define several web related settings.
    WebSettings webSettings = myWebView.getSettings();
    // Enabling JAVASCRIPT
    webSettings.setJavaScriptEnabled(true);
    // providing navigational access
    myWebView.setWebViewClient(new WebViewClient());
    // loading the URL
    myWebView.loadUrl("http://abcd.com");
}

Its the simplest webview anyone will find out there, and i want to do some modification there but am unable to, so plz help me with it.

The site i am opening contains a lot of images, now i want to know, when a website is accessed all the images and text it contains are download to show it on the UI and when we close the page all of it is lost,if i guessed it right.To download a image, one will have to specifically download it. Like we do in Opera Browser or any other one.

So i want to download all the image my webview opens in the UI into an dir (path known /sdcard/pics) on my SDCard automatically. Is there a way?

  • 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-06T12:25:14+00:00Added an answer on June 6, 2026 at 12:25 pm

    An alternative to using the cache directory approach is to intercept all requests to images on-the-fly, as the WebView loads them. You can set a WebViewClient to your WebView that implements one of the following methods:

    • onLoadResource (since API lvl 1)
    • shouldInterceptRequest (since API lvl 11)

    The first method should work on all devices out there, but will probably result in downloading the resource twice: once manually to save it in a specific directory on the SD card, and once by the WebView itself. The second method allows you to return the downloaded resource after saving it somewhere, effectively resulting in just a single download.

    You should able to find plenty of examples here on SO or by querying your favourite search engine.

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

Sidebar

Related Questions

My Code:: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); VideoView videoView = (VideoView) findViewById(R.id.videoView1);
My timer code is: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); initializer(); fire.setOnClickListener(this); }
I try to run the following code: public void Init(Url rootUrl) { var web
i try a simple webView appication. and this is my code : public void
public Class GUi(){ // More Code public void onClick(ClickEvent event) { LoginServer loginServer =new
I have the following code: public void BeginConvert(object data) { ConverterData cObject = (ConverterData)data;
I have the following code: public void post(String message) { final String mess =
This is my code : public void AddToGrid(string value) { MessageBox.Show(value); //Message is showing
I have the below code: public void OpenFile(string FileName) { if (FileName == null)
Lets say I have this code: public void MyMethod(string Data, List<string> InputData) { //I

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.