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

  • Home
  • SEARCH
  • 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 8533227
In Process

The Archive Base Latest Questions

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

Problem Description I am writing Android application and I need to add to my

  • 0

Problem Description

I am writing Android application and I need to add to my application some functionality, when user open standard web browser in Android and navigate to me web page (http://mywebpage.com) and there press on some button (Test Button) web page must detect if my application is already installed on the Android phone.

What I do to solve this problem

I have read many articles and ask here some questions and I understand that I can’t do something in order my web page can understand if My Application is installed on the phone or not, the one thing that I can do it write some code in the manifest file

<a href="my.special.scheme://other/parameters/here">

<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:scheme="my.special.scheme" />
</intent-filter>

But this is not enough for me as if application is not installed on the phone when user press on the link in my web site it give an 404 error saying that there is no such URL my.special.scheme://other/parameters/here I want to find another solution for this and here what I think.

Solution for the problem

How I can throw some exception from my web site when user press on the link <a href="my.special.scheme://other/parameters/here"> and it show 404 error. I mean can I make some AJAX or JAVA Script calls in order to determine that url refer to not valid link and redirect to another link in that case.

Solution for the problem 2

I use intent filter like this

<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:scheme="http" android:host="commonsware.com" android:path="LaunchApp"/>
</intent-filter>

and place a link on a web page like this

<a href="commonsware.com/LaunchApp">Start App</a>.

Question

How I can redirect to the URL which I specify when the real URL does not exist or it give 404 error. Please provide me an examples as I am not strong in AJAX and JAVA Script coding

  • 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-11T09:54:49+00:00Added an answer on June 11, 2026 at 9:54 am

    I have done something like that, based on this answer of Diane Hackborn here:

    Please don’t use a scheme unless it is one that you have registered.
    Schemes are global to the universe, and since you will be putting this
    out in the universe via your web page you want to follow the rules for
    them.

    Another approach you can take is to just create an Intent that you
    want to have launched, and print the result of Intent.toUri() to get
    the string to use in your link. (This should be an intent: URI.)
    Then you probably want to just make your own action following the
    standard naming conventions which that Intent will use. You can even
    use Intent.setPackage() to make sure that only your app can be
    launched from the link, if you want. (Do note you can’t use
    Intent.setComponent() for this for security reasons.)

    I built an Intent as to launch the desired activity and then, as described, converted the Intent to an URI and printed that to stdout. This URI (it starts with intent: as a scheme) I used in my web-page like so:

    <a href="intent:/...">Start App</a>.

    This will start the Activity, if the Application is installed, otherwise it brings up the Play-Store App, already showing the App’s page (if found in the Play-Store, that is) for the User to download and install.

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

Sidebar

Related Questions

Problem Description I am writing application for Android and use native code, And test
I am writing some kind of search engine for my web application and i
I have file writing permission denied problem in my web application, below is the
Problem Description I'm writing module for Android (JAVA) that use native code (C) .
Problem Description I am writing a Java application that lets programmers query for page
Problem description : - Step 1: Take input FILE_NAME from user at main thread.
Description: I have a problem regarding DataGridView . I need to show a Client_Name
I'm writing an application updater that pulls installation package from our distribution web site
I'm writing application for downloading CSV file from web and inserting data into table
I'm writing a simple xmpp client in android and I have a problem 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.