App Indexing – Launch Your App via Mobile Browser

Sometimes you might want your app to be launched via a browser on our mobile platform, cause that will provide a better user experience for customers, especially when your website is not RWD ready.

So, how to achieve that goal? Here is the answer.

  1. prepare your domain name, for example, you already have a domain name called,, and you would have your package name,, as well.

  2. You need to modify your AndroidManifest.xml

<activity android:name=".MainActivity">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:host="" android:scheme="http" />
        <data android:host="" android:scheme="http" />

        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />

Please note here, sometimes you might need to add two data fields into your app, cause Android App might not be able to response for only 1 data field. And if you wanna listen to, you need to add an extra field into AndroidManifest.xml


So, now, you can receive browser calling and launch your own app when users click a link in a web page, for example, But there’s always a special case here. In scheme field, we listen to HTTP protocol now. But actually, there are two other different ways that you can use, either “intent” or “your own customized scheme“. For intent, Google engineer would suggest developers to use “HTTP” or “intent” (please refer reference 3).

Trade-offs between the two (quotation from stackoverflow):

  • HTTP URIs require you have a domain you own. The user will always get the option to show the URI in the browser. It has very nice fall-back properties where if your app is not installed, they will simply land on your web site.
  • intent URIs require that your app already be installed and only on Android phones. The allow nearly any intent (but always have the BROWSABLE category included and not supporting explicit components). They allow you to direct the launch to only your app without the user having the option of instead going to the browser or any other app.

But, in fact, we also can use our own scheme to launch applications. For example, android:scheme=”my.special.scheme”. That’s also doable.

So, next step, we need to modify the web links as following.

// for intent scheme
<a href="intent://;scheme=http;package=com.your.package;end">Open Application</a>

// for http scheme 
<a href="">Open Application</a>

That’s it. Happy coding.

1. Airbnb DeepLink dispatch
2. StackOverflow Reference1.
3. StackOverflow Reference2 – Google Engineer


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s