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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:35:28+00:00 2026-06-17T20:35:28+00:00

I tried including the relevant bit. I’m new at this and working with existing

  • 0

I tried including the relevant bit. I’m new at this and working with existing code. I hope someone can point me in the right direction.

Basically, say my website is http://www.mywebsite.com (lets call this ‘A’ since I can only post two hyperlinks) and you decide to do a search, so now the URL looks like this:

http://www.mywebsite.com/?s=notes (call it ‘B’)

You then get the SearchPage activity with the search results. Now say I tap a link from the search results. Example:

the url above/category/easy-news/ (call it ‘C’)

Website ‘C’ should load in PageActivity (which it does) but still loads up in SearchPageActivity which was initially showing ‘B’.

On top of all of that, there seems to be a 3rd PageActivity (though it doesn’t look like it opens a third time). One that also loads ‘C’ again. As mentioned, it is still the PageActivity, though. Pressing back closes the PageActivity and shows another PageActicity with the URL ‘C’.

Closing that a second time takes me back to SearchPageActivity with the same URL ‘C’ which was initially ‘B’. Pressing back one more time takes me back to ‘B’ within the same activity.

I don’t seem to have this issue with the MainActivity, only in the SearchPage activity. In the MainActivity, things work fine. The code below is from SearchPage activity.

Sorry for the long winded message. I hope someone can help. Thanks.

Thanks.

private boolean isAppOrGamePage(String paramString) {
        if ((paramString == null)
                || paramString.length() < 24
                || (!paramString.substring(0, 24).equals(
                        "http://www.mywebsite.com")))
            return false;

        String str1 = paramString.substring(24);
        String str2 = str1.substring(0, 1 + str1.indexOf('/', 2));
        if ((!mAppIdentifiers.contains(str2))
                && (!mGameIdentifiers.contains(str2)))
            return false;
        return true;
    }

    public boolean shouldOverrideUrlLoading(WebView paramWebView,
            String paramString) {

        if (MainActivity.DEBUG)
            Log.e("shouldOverride", paramString);
        if (Uri.parse(paramString).getHost() != null
                && (!Uri.parse(paramString).getHost()
                        .equals("myspace.com"))
                && (!paramString.contains("facebook.com"))
                && (!Uri.parse(paramString).getHost()
                        .contains("twitter.com"))
                && (!Uri.parse(paramString).getHost()
                        .equals("goo.gl"))
                && (!Uri.parse(paramString).getHost().contains("bit.ly"))
                && (!Uri.parse(paramString).getHost()
                        .contains("plus.google.com"))
                && (!Uri.parse(paramString).getHost()
                        .contains("youtube.com")))
            if (isAppOrGamePage(paramString)) {
                final Intent intent = new Intent(SearchActivity.this,
                        PageActivity.class);
                intent.putExtra("app_url", paramString);
                startActivity(intent);
            } else
                return false;
        return false;

    }
}
  • 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-17T20:35:29+00:00Added an answer on June 17, 2026 at 8:35 pm

    Return true when you open the other activity. You need to consume that call.

    Returning true tells the webview that you have handled it, and don’t want it to do anything with it.

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

Sidebar

Related Questions

I have this code http://jsfiddle.net/xNHKP/6/ (not working in the fiddle for some reason which
Today I tried including the apache.commons.codec package in my Android application and couldn't get
I have tried all the solutions that have been provided including using PRAGMA but
I've tried everything. Every combination of the helpers raw , html_safe to_json including some
I've read about postion:absolute problems and tried almost every possible solution. Including positioning divs
Tried to search for this online and didn't get very far, so I'm asking
Bit of an obscure one this. My setup is all running on my local
I'm trying to get the apns daemon at http://code.google.com/p/apnsd/ working, and am having problems
Ok, I've looked over results for this off and on all day (including search
Hello all I have a question I hope you guys can help me with.

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.