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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:38:02+00:00 2026-05-17T15:38:02+00:00

I have an intent filter to intercept urls from the browser on my domain.

  • 0

I have an intent filter to intercept urls from the browser on my domain. This will give the user the the choice of using the native application or the browser. I have setup the following intent filter as so.

<intent-filter> 
      <action android:name="android.intent.action.VIEW"/>
          <category android:name="android.intent.category.DEFAULT"/>
      <category android:name="android.intent.category.BROWSABLE" />
      <data android:host="myDomain" android:pathPrefix="/custom/" android:scheme="http" />
 </intent-filter>

Now, it’s not my intention to trap the user in the native application as there is much benefit from using the browser. So I would like to give the user some ability to go back to the browser within the application. I have created a button with an onClick that simply creates an intent for View and the url that would represent it. This will present the user with the choice dialog again.

The catch to this is that a user is also allowed to select a checkbox to always use the native application. While that is well and good, sometimes absolutes are wrong. So if I am reading a blog post that mentions a specific url and a specific part of that document, intercepting the url is not what the user intended but will send them to the native application. Also then upon selecting the button with the intent, they will immediately be sucked back into the application.

How can you structure a ACTION_VIEW intent for the system browser or at least detect that the user has selected always use the native app so that you can use the ACTION_WEB_SEARCH (it has a different UI behavior with the history stack, which is why I wouldn’t opt to use this action all the time).

  • 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-17T15:38:03+00:00Added an answer on May 17, 2026 at 3:38 pm

    So I have retouched this again and the answer is actually pretty simple. Use Intent.createChooser(intent, charSequence). Whatever is chosen seems to bypass the saved preferences of the OS.

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

Sidebar

Related Questions

I am trying to use an intent-filter to intercept URLs on QR codes in
I have a intent receiver in my android manifest, but would like to give
Firstly, I do not have any malicious intent out of this question. I would
I have an application that opens another class using intent : private void createRepository(){
I have code straight from Google's dev guide: Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(market://details?id=com.example.android));
i have this IntentService code which run a service once: protected void onHandleIntent(Intent intent)
I have just started using C2DM. I prefer to send REGISTRATION intent only once
I have this code: package com.powergroupbd.timer; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.os.CountDownTimer;
In my AndroidManifest.xml I have the following... <service android:name=.MyIntentService > <intent-filter> <action android:name=android.net.wifi.STATE_CHANGE />
I have seen this thread ClassNotFoundException Thrown using MapView but no help for me.

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.