The BROWSABLE category revealed

Assume that you on your desktop computer browse to a web page with the following page source


Clicking on the first link you expect your browser to start a new tab and navigate to the url that was specified in the href. If you click on the second link you would expect that the browser opens up your favourite email client. The third link would probably just give you an error message since the browser has no idea how to react on a link like foo://

On Android we can control how the device should react when the user clicks on a link in the web browser, or more specific control which Activity should be started. Every time the user clicks on a link the browser sends an intent to the platform with the following content.

action = android.intent.action.VIEW
category = android.intent.category.BROWSABLE
data = the text from the href tag

If we navigate to a web page with the following page source on our Andoid device we could expect a few interesting things to happen when we click on the links.


The first link will generate an intent with the following information

action = android.intent.action.VIEW
category = android.intent.category.BROWSABLE
data = "tel:123456"

This will start the Dialer application and preset the phone number to 123456.


Clicking on the second link will not surprisingly open up the email client in your device with a preset receiver address. What about clicking on the third link? Well, by default it would just return a “page not available” error message in the browser. The intent sent from the browser will look like this

action = android.intent.action.VIEW
category = android.intent.category.BROWSABLE
data = "foo://"

This means that if we install an Activity with the following IntentFilter


this Activity will start when the user clicks on the third link. Pretty cool, isn’t it?

This Post Has 12 Comments

  1. Akshata

    It is very nice article. I just want to ask one more question.. How we can pass the values to that application from same html page so that we can access these value in application

  2. Raheem

    great explanation by differentiating the html web and android web.

  3. Jonas Wahlfrid

    Is it possible to use the BROWSABLE category in a filter for a receiver or a service?

  4. Saravanan

    Hi ,

    A very good explanation, but I tried to launch the native app using the method specified in the link and it was not launching. In the LogCat, debug log , I could find the following line:

    06-02 12:02:10.658: INFO/ActivityManager(60): Starting: Intent { act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=foo:// (has extras) } from pid 533.

    After that , I’m not able to view the native app and only the error message
    “Webpage not available is being displayed.”. Is there any other things I need to do .Am I missing something. Can anyone provide any solutions for this…..

  5. Leo26781

    Akshata ,

    were you able to pass the values from html page to android application and acces them within the app ? If so can you share it ?

  6. francesco

    maybe too late for your work.
    However try:

    In your webpage:
    Foo? What’s that?

    In your Activity add:

    onCreate(Bundle savedInstanceState) {

    Intent i = getIntent();
    String strdata = i.getDataString();

    strdata will contain foo://
    That is you can get what is passed by the webpage.

  7. francesco

    I see that my comment was interpreted as html.
    I meant in the web page try an HREF like the following:

  8. Ahmed

    Is it possible to pass values from the application back to the calling page?

  9. I am actually delighted to glance at this weblog posts
    which consists of plenty of valuable facts, thanks for providing these

  10. Brent

    Excellent post. I was checking continuously this blog and
    I am inspired! Very useful info specifically the closing section :)
    I handle such info a lot. I used to be seeking this particular
    info for a very lengthy time. Thank you and
    good luck.

Leave a Reply