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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:29:54+00:00 2026-06-11T02:29:54+00:00

On create of my activity I am firing a loading handler (whilst a spinner

  • 0

On create of my activity I am firing a loading handler (whilst a spinner is shown), amongst other things in that handler code I call loadURL on three private WebView objects.

The purpose of this is to pre-cache these webpages, each it then shown dependent on a button touch event. The actual loading and displaying is working fine, except that sometimes (can’t see a pattern yet) I (or my testers) get browser choice screen (such as Chrome / Firefox) for no reason.

So my first question is what would cause that, and how to prevent it from happening?

Otherwise how else would you perform the following:

  1. Pre-cache the result of three webpages (simple HTML, tables etc with no images).
  2. Dependent on a button touch display the result of the webpage in a layout on screen (same layout each time, so when button 2 is touched it’s corresponding webpage replaces the previous one).
  • 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-11T02:29:56+00:00Added an answer on June 11, 2026 at 2:29 am

    Never like answering my own questions, but as the only answer wasn’t relevant to the question.

    It seems that the problem was caused by a redirect, the webpage being loaded did not actually have a redirect it it, but the server was performing an internal redirect from a sub-domain. I got around the problem with the following code.

    this.wvBasic.setWebViewClient(new WebViewClient() {
        private String pendingUrl;
    
        @Override
        public void onPageStarted(WebView view, String url, Bitmap favicon) {
            if (pendingUrl == null) {
                pendingUrl = url;
            }
        }
    
        @Override
        public void onPageFinished(WebView view, String url) {
            if (!url.equals(pendingUrl)) {
                Log.d(TAG, "Detected HTTP redirect " + pendingUrl + "->" + url);
                pendingUrl = null;
            }
        }
    });
    this.wvBasic.getSettings().setJavaScriptEnabled(false);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Like in topic - I want to create activity above tabHost that I already
I need to develop an android app that achieves the following: Create an activity
I'm just playing around with some code. I create an Activity and simply do
Any idea why this doesn't create an activity that looks like a popup instead
I want to create an activity that has sidebar on the left that is
I need to create an activity that starts a service that monitors the users
I've been assigned to create an activity that displays table of changes made to
So I'm trying to create an activity that passes some values into another activity
Is there other way to create an Activity inside an Activity without using Dialog
I want to create an Activity in Android 2.3 when the application starts that

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.