Add my browser in the default browser selection list in android?












9















Following the suggestions from How to add my browser in the default browser selection list in android? I have specified my intent in the manifest file.



<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http"/>
<data android:scheme="https"/>
</intent-filter>


I have also added the permission



<uses-permission android:name="android.permission.INTERNET"></uses-permission>


But still my browser is not showing in the default app options for the browser category in the settings.



Do I need to do anything else for my app to show up in the default options for browser?










share|improve this question




















  • 1





    you probably need also the https scheme.

    – Vladyslav Matviienko
    Nov 22 '18 at 8:37











  • Tried with both but still not working.

    – Gokul N K
    Nov 30 '18 at 11:27
















9















Following the suggestions from How to add my browser in the default browser selection list in android? I have specified my intent in the manifest file.



<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http"/>
<data android:scheme="https"/>
</intent-filter>


I have also added the permission



<uses-permission android:name="android.permission.INTERNET"></uses-permission>


But still my browser is not showing in the default app options for the browser category in the settings.



Do I need to do anything else for my app to show up in the default options for browser?










share|improve this question




















  • 1





    you probably need also the https scheme.

    – Vladyslav Matviienko
    Nov 22 '18 at 8:37











  • Tried with both but still not working.

    – Gokul N K
    Nov 30 '18 at 11:27














9












9








9








Following the suggestions from How to add my browser in the default browser selection list in android? I have specified my intent in the manifest file.



<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http"/>
<data android:scheme="https"/>
</intent-filter>


I have also added the permission



<uses-permission android:name="android.permission.INTERNET"></uses-permission>


But still my browser is not showing in the default app options for the browser category in the settings.



Do I need to do anything else for my app to show up in the default options for browser?










share|improve this question
















Following the suggestions from How to add my browser in the default browser selection list in android? I have specified my intent in the manifest file.



<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http"/>
<data android:scheme="https"/>
</intent-filter>


I have also added the permission



<uses-permission android:name="android.permission.INTERNET"></uses-permission>


But still my browser is not showing in the default app options for the browser category in the settings.



Do I need to do anything else for my app to show up in the default options for browser?







android android-intent default






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 30 '18 at 11:26







Gokul N K

















asked Nov 22 '18 at 8:20









Gokul N KGokul N K

1,69612135




1,69612135








  • 1





    you probably need also the https scheme.

    – Vladyslav Matviienko
    Nov 22 '18 at 8:37











  • Tried with both but still not working.

    – Gokul N K
    Nov 30 '18 at 11:27














  • 1





    you probably need also the https scheme.

    – Vladyslav Matviienko
    Nov 22 '18 at 8:37











  • Tried with both but still not working.

    – Gokul N K
    Nov 30 '18 at 11:27








1




1





you probably need also the https scheme.

– Vladyslav Matviienko
Nov 22 '18 at 8:37





you probably need also the https scheme.

– Vladyslav Matviienko
Nov 22 '18 at 8:37













Tried with both but still not working.

– Gokul N K
Nov 30 '18 at 11:27





Tried with both but still not working.

– Gokul N K
Nov 30 '18 at 11:27












6 Answers
6






active

oldest

votes


















9





+100









Try to include the <category android:name="android.intent.category.BROWSABLE" /> in your target activity's intent-filter as developer documentation said:




If the user is viewing a web page or an e-mail and clicks on a link in the text, the Intent generated execute that link will require the BROWSABLE category, so that only activities supporting this category will be considered as possible actions.




It is required in order for the intent-filter to be accessible from a clickable link. Without it, clicking a link cannot resolve to your app.



<activity ...>

<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" />
<data android:scheme="https" />
</intent-filter>

</activity>


.



Additional Tip: (If you want to force your app to be the default browser)



Android App Links on Android 6.0 (API level 23) and higher allow an app to designate itself as the default handler of a given type of link. If the user doesn't want the app to be the default handler, they can override this behavior from their device's system settings.



To enable link handling verification for your app, set android:autoVerify="true" in intent-filter tag:



<activity ...>

<intent-filter android:autoVerify="true">

...

</intent-filter>

</activity>





share|improve this answer

































    0














    You can do it with Intent-Filter by making your Activity Browsable.using below code in Android manifest File.



    You can do it with Launcher Activity.



    <activity android:name="BrowsableActivity">
    <intent_filter>
    <action android:name="android.intent.action.VIEW"/>
    <category android:name="android.intent.category.BROWSABLE"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.LAUNCHER"/>
    </intent_filter>
    </activity>


    And you must provide scheme as http and https for links to be open with your Application.






    share|improve this answer































      0














      As mentioned in documentation over developer.android.com



      you need to set intent filer as below



      <activity ...>
      <intent-filter>
      <action android:name="android.intent.action.VIEW" />
      <!-- Include the host attribute if you want your app to respond
      only to URLs with your app's domain. -->
      <data android:scheme="http" android:host="www.example.com" />
      <category android:name="android.intent.category.DEFAULT" />
      <!-- The BROWSABLE category is required to get links from web pages. -->
      <category android:name="android.intent.category.BROWSABLE" />
      </intent-filter>
      </activity>





      share|improve this answer































        0














        You need to consider various cases that may be applicable.



        Please refer the intent-filters below. Also link is provided at the end.




        <activity android:name="BrowserActivity"
        android:label="@string/application_name"
        android:launchMode="singleTask"
        android:alwaysRetainTaskState="true"
        android:configChanges="orientation|keyboardHidden"
        android:theme="@style/BrowserTheme"
        android:windowSoftInputMode="adjustResize" >
        <intent-filter>
        <action android:name="android.speech.action.VOICE_SEARCH_RESULTS" />
        <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <!-- For these schemes were not particular MIME type has been
        supplied, we are a good candidate. -->
        <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" />
        <data android:scheme="https" />
        <data android:scheme="about" />
        <data android:scheme="javascript" />
        </intent-filter>
        <!-- For these schemes where any of these particular MIME types
        have been supplied, we are a good candidate. -->
        <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.BROWSABLE" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="http" />
        <data android:scheme="https" />
        <data android:scheme="inline" />
        <data android:mimeType="text/html"/>
        <data android:mimeType="text/plain"/>
        <data android:mimeType="application/xhtml+xml"/>
        <data android:mimeType="application/vnd.wap.xhtml+xml"/>
        </intent-filter>
        <!-- We are also the main entry point of the browser. -->
        <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.LAUNCHER" />
        <category android:name="android.intent.category.BROWSABLE" />
        </intent-filter>
        <!-- The maps app is a much better experience, so it's not
        worth having this at all... especially for a demo!
        <intent-filter android:label="Map In Browser">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="vnd.android.cursor.item/postal-address" />
        </intent-filter>
        -->
        <intent-filter>
        <action android:name="android.intent.action.WEB_SEARCH" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="" />
        <data android:scheme="http" />
        <data android:scheme="https" />
        </intent-filter>
        <intent-filter>
        <action android:name="android.intent.action.MEDIA_SEARCH" />
        <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <intent-filter>
        <action android:name="android.intent.action.SEARCH" />
        <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <meta-data android:name="android.app.searchable"
        android:resource="@xml/searchable" />
        </activity>





        Look at the different types of intent-filters you might need in order to cover all possible cases.



        Refer to this link - complete manifest file of froyo browser.






        share|improve this answer































          0














          Consider using CATEGORY_APP_BROWSER with your main filter:




          Used with ACTION_MAIN to launch the browser application. The activity should be able to browse the Internet.




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





          share|improve this answer































            0














            You can achieve this programatically, like this:



            Intent share = new Intent(android.content.Intent.ACTION_SEND);
            share.setType("text/plain");
            share.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
            share.setPackage("your.app.package.name");
            startActivity(share);


            and also it will be good, if you put a check for the app existence on phone.



            Happy Coding :)






            share|improve this answer























              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53426557%2fadd-my-browser-in-the-default-browser-selection-list-in-android%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              6 Answers
              6






              active

              oldest

              votes








              6 Answers
              6






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              9





              +100









              Try to include the <category android:name="android.intent.category.BROWSABLE" /> in your target activity's intent-filter as developer documentation said:




              If the user is viewing a web page or an e-mail and clicks on a link in the text, the Intent generated execute that link will require the BROWSABLE category, so that only activities supporting this category will be considered as possible actions.




              It is required in order for the intent-filter to be accessible from a clickable link. Without it, clicking a link cannot resolve to your app.



              <activity ...>

              <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" />
              <data android:scheme="https" />
              </intent-filter>

              </activity>


              .



              Additional Tip: (If you want to force your app to be the default browser)



              Android App Links on Android 6.0 (API level 23) and higher allow an app to designate itself as the default handler of a given type of link. If the user doesn't want the app to be the default handler, they can override this behavior from their device's system settings.



              To enable link handling verification for your app, set android:autoVerify="true" in intent-filter tag:



              <activity ...>

              <intent-filter android:autoVerify="true">

              ...

              </intent-filter>

              </activity>





              share|improve this answer






























                9





                +100









                Try to include the <category android:name="android.intent.category.BROWSABLE" /> in your target activity's intent-filter as developer documentation said:




                If the user is viewing a web page or an e-mail and clicks on a link in the text, the Intent generated execute that link will require the BROWSABLE category, so that only activities supporting this category will be considered as possible actions.




                It is required in order for the intent-filter to be accessible from a clickable link. Without it, clicking a link cannot resolve to your app.



                <activity ...>

                <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" />
                <data android:scheme="https" />
                </intent-filter>

                </activity>


                .



                Additional Tip: (If you want to force your app to be the default browser)



                Android App Links on Android 6.0 (API level 23) and higher allow an app to designate itself as the default handler of a given type of link. If the user doesn't want the app to be the default handler, they can override this behavior from their device's system settings.



                To enable link handling verification for your app, set android:autoVerify="true" in intent-filter tag:



                <activity ...>

                <intent-filter android:autoVerify="true">

                ...

                </intent-filter>

                </activity>





                share|improve this answer




























                  9





                  +100







                  9





                  +100



                  9




                  +100





                  Try to include the <category android:name="android.intent.category.BROWSABLE" /> in your target activity's intent-filter as developer documentation said:




                  If the user is viewing a web page or an e-mail and clicks on a link in the text, the Intent generated execute that link will require the BROWSABLE category, so that only activities supporting this category will be considered as possible actions.




                  It is required in order for the intent-filter to be accessible from a clickable link. Without it, clicking a link cannot resolve to your app.



                  <activity ...>

                  <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" />
                  <data android:scheme="https" />
                  </intent-filter>

                  </activity>


                  .



                  Additional Tip: (If you want to force your app to be the default browser)



                  Android App Links on Android 6.0 (API level 23) and higher allow an app to designate itself as the default handler of a given type of link. If the user doesn't want the app to be the default handler, they can override this behavior from their device's system settings.



                  To enable link handling verification for your app, set android:autoVerify="true" in intent-filter tag:



                  <activity ...>

                  <intent-filter android:autoVerify="true">

                  ...

                  </intent-filter>

                  </activity>





                  share|improve this answer















                  Try to include the <category android:name="android.intent.category.BROWSABLE" /> in your target activity's intent-filter as developer documentation said:




                  If the user is viewing a web page or an e-mail and clicks on a link in the text, the Intent generated execute that link will require the BROWSABLE category, so that only activities supporting this category will be considered as possible actions.




                  It is required in order for the intent-filter to be accessible from a clickable link. Without it, clicking a link cannot resolve to your app.



                  <activity ...>

                  <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" />
                  <data android:scheme="https" />
                  </intent-filter>

                  </activity>


                  .



                  Additional Tip: (If you want to force your app to be the default browser)



                  Android App Links on Android 6.0 (API level 23) and higher allow an app to designate itself as the default handler of a given type of link. If the user doesn't want the app to be the default handler, they can override this behavior from their device's system settings.



                  To enable link handling verification for your app, set android:autoVerify="true" in intent-filter tag:



                  <activity ...>

                  <intent-filter android:autoVerify="true">

                  ...

                  </intent-filter>

                  </activity>






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 30 '18 at 18:43

























                  answered Nov 30 '18 at 11:52









                  aminographyaminography

                  5,88521131




                  5,88521131

























                      0














                      You can do it with Intent-Filter by making your Activity Browsable.using below code in Android manifest File.



                      You can do it with Launcher Activity.



                      <activity android:name="BrowsableActivity">
                      <intent_filter>
                      <action android:name="android.intent.action.VIEW"/>
                      <category android:name="android.intent.category.BROWSABLE"/>
                      <category android:name="android.intent.category.DEFAULT"/>
                      <category android:name="android.intent.category.LAUNCHER"/>
                      </intent_filter>
                      </activity>


                      And you must provide scheme as http and https for links to be open with your Application.






                      share|improve this answer




























                        0














                        You can do it with Intent-Filter by making your Activity Browsable.using below code in Android manifest File.



                        You can do it with Launcher Activity.



                        <activity android:name="BrowsableActivity">
                        <intent_filter>
                        <action android:name="android.intent.action.VIEW"/>
                        <category android:name="android.intent.category.BROWSABLE"/>
                        <category android:name="android.intent.category.DEFAULT"/>
                        <category android:name="android.intent.category.LAUNCHER"/>
                        </intent_filter>
                        </activity>


                        And you must provide scheme as http and https for links to be open with your Application.






                        share|improve this answer


























                          0












                          0








                          0







                          You can do it with Intent-Filter by making your Activity Browsable.using below code in Android manifest File.



                          You can do it with Launcher Activity.



                          <activity android:name="BrowsableActivity">
                          <intent_filter>
                          <action android:name="android.intent.action.VIEW"/>
                          <category android:name="android.intent.category.BROWSABLE"/>
                          <category android:name="android.intent.category.DEFAULT"/>
                          <category android:name="android.intent.category.LAUNCHER"/>
                          </intent_filter>
                          </activity>


                          And you must provide scheme as http and https for links to be open with your Application.






                          share|improve this answer













                          You can do it with Intent-Filter by making your Activity Browsable.using below code in Android manifest File.



                          You can do it with Launcher Activity.



                          <activity android:name="BrowsableActivity">
                          <intent_filter>
                          <action android:name="android.intent.action.VIEW"/>
                          <category android:name="android.intent.category.BROWSABLE"/>
                          <category android:name="android.intent.category.DEFAULT"/>
                          <category android:name="android.intent.category.LAUNCHER"/>
                          </intent_filter>
                          </activity>


                          And you must provide scheme as http and https for links to be open with your Application.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 30 '18 at 11:57









                          Chetan JoshiChetan Joshi

                          3,48011420




                          3,48011420























                              0














                              As mentioned in documentation over developer.android.com



                              you need to set intent filer as below



                              <activity ...>
                              <intent-filter>
                              <action android:name="android.intent.action.VIEW" />
                              <!-- Include the host attribute if you want your app to respond
                              only to URLs with your app's domain. -->
                              <data android:scheme="http" android:host="www.example.com" />
                              <category android:name="android.intent.category.DEFAULT" />
                              <!-- The BROWSABLE category is required to get links from web pages. -->
                              <category android:name="android.intent.category.BROWSABLE" />
                              </intent-filter>
                              </activity>





                              share|improve this answer




























                                0














                                As mentioned in documentation over developer.android.com



                                you need to set intent filer as below



                                <activity ...>
                                <intent-filter>
                                <action android:name="android.intent.action.VIEW" />
                                <!-- Include the host attribute if you want your app to respond
                                only to URLs with your app's domain. -->
                                <data android:scheme="http" android:host="www.example.com" />
                                <category android:name="android.intent.category.DEFAULT" />
                                <!-- The BROWSABLE category is required to get links from web pages. -->
                                <category android:name="android.intent.category.BROWSABLE" />
                                </intent-filter>
                                </activity>





                                share|improve this answer


























                                  0












                                  0








                                  0







                                  As mentioned in documentation over developer.android.com



                                  you need to set intent filer as below



                                  <activity ...>
                                  <intent-filter>
                                  <action android:name="android.intent.action.VIEW" />
                                  <!-- Include the host attribute if you want your app to respond
                                  only to URLs with your app's domain. -->
                                  <data android:scheme="http" android:host="www.example.com" />
                                  <category android:name="android.intent.category.DEFAULT" />
                                  <!-- The BROWSABLE category is required to get links from web pages. -->
                                  <category android:name="android.intent.category.BROWSABLE" />
                                  </intent-filter>
                                  </activity>





                                  share|improve this answer













                                  As mentioned in documentation over developer.android.com



                                  you need to set intent filer as below



                                  <activity ...>
                                  <intent-filter>
                                  <action android:name="android.intent.action.VIEW" />
                                  <!-- Include the host attribute if you want your app to respond
                                  only to URLs with your app's domain. -->
                                  <data android:scheme="http" android:host="www.example.com" />
                                  <category android:name="android.intent.category.DEFAULT" />
                                  <!-- The BROWSABLE category is required to get links from web pages. -->
                                  <category android:name="android.intent.category.BROWSABLE" />
                                  </intent-filter>
                                  </activity>






                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Nov 30 '18 at 12:18









                                  Karan MerKaran Mer

                                  4,49232764




                                  4,49232764























                                      0














                                      You need to consider various cases that may be applicable.



                                      Please refer the intent-filters below. Also link is provided at the end.




                                      <activity android:name="BrowserActivity"
                                      android:label="@string/application_name"
                                      android:launchMode="singleTask"
                                      android:alwaysRetainTaskState="true"
                                      android:configChanges="orientation|keyboardHidden"
                                      android:theme="@style/BrowserTheme"
                                      android:windowSoftInputMode="adjustResize" >
                                      <intent-filter>
                                      <action android:name="android.speech.action.VOICE_SEARCH_RESULTS" />
                                      <category android:name="android.intent.category.DEFAULT" />
                                      </intent-filter>
                                      <!-- For these schemes were not particular MIME type has been
                                      supplied, we are a good candidate. -->
                                      <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" />
                                      <data android:scheme="https" />
                                      <data android:scheme="about" />
                                      <data android:scheme="javascript" />
                                      </intent-filter>
                                      <!-- For these schemes where any of these particular MIME types
                                      have been supplied, we are a good candidate. -->
                                      <intent-filter>
                                      <action android:name="android.intent.action.VIEW" />
                                      <category android:name="android.intent.category.BROWSABLE" />
                                      <category android:name="android.intent.category.DEFAULT" />
                                      <data android:scheme="http" />
                                      <data android:scheme="https" />
                                      <data android:scheme="inline" />
                                      <data android:mimeType="text/html"/>
                                      <data android:mimeType="text/plain"/>
                                      <data android:mimeType="application/xhtml+xml"/>
                                      <data android:mimeType="application/vnd.wap.xhtml+xml"/>
                                      </intent-filter>
                                      <!-- We are also the main entry point of the browser. -->
                                      <intent-filter>
                                      <action android:name="android.intent.action.MAIN" />
                                      <category android:name="android.intent.category.DEFAULT" />
                                      <category android:name="android.intent.category.LAUNCHER" />
                                      <category android:name="android.intent.category.BROWSABLE" />
                                      </intent-filter>
                                      <!-- The maps app is a much better experience, so it's not
                                      worth having this at all... especially for a demo!
                                      <intent-filter android:label="Map In Browser">
                                      <action android:name="android.intent.action.VIEW" />
                                      <category android:name="android.intent.category.DEFAULT" />
                                      <data android:mimeType="vnd.android.cursor.item/postal-address" />
                                      </intent-filter>
                                      -->
                                      <intent-filter>
                                      <action android:name="android.intent.action.WEB_SEARCH" />
                                      <category android:name="android.intent.category.DEFAULT" />
                                      <category android:name="android.intent.category.BROWSABLE" />
                                      <data android:scheme="" />
                                      <data android:scheme="http" />
                                      <data android:scheme="https" />
                                      </intent-filter>
                                      <intent-filter>
                                      <action android:name="android.intent.action.MEDIA_SEARCH" />
                                      <category android:name="android.intent.category.DEFAULT" />
                                      </intent-filter>
                                      <intent-filter>
                                      <action android:name="android.intent.action.SEARCH" />
                                      <category android:name="android.intent.category.DEFAULT" />
                                      </intent-filter>
                                      <meta-data android:name="android.app.searchable"
                                      android:resource="@xml/searchable" />
                                      </activity>





                                      Look at the different types of intent-filters you might need in order to cover all possible cases.



                                      Refer to this link - complete manifest file of froyo browser.






                                      share|improve this answer




























                                        0














                                        You need to consider various cases that may be applicable.



                                        Please refer the intent-filters below. Also link is provided at the end.




                                        <activity android:name="BrowserActivity"
                                        android:label="@string/application_name"
                                        android:launchMode="singleTask"
                                        android:alwaysRetainTaskState="true"
                                        android:configChanges="orientation|keyboardHidden"
                                        android:theme="@style/BrowserTheme"
                                        android:windowSoftInputMode="adjustResize" >
                                        <intent-filter>
                                        <action android:name="android.speech.action.VOICE_SEARCH_RESULTS" />
                                        <category android:name="android.intent.category.DEFAULT" />
                                        </intent-filter>
                                        <!-- For these schemes were not particular MIME type has been
                                        supplied, we are a good candidate. -->
                                        <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" />
                                        <data android:scheme="https" />
                                        <data android:scheme="about" />
                                        <data android:scheme="javascript" />
                                        </intent-filter>
                                        <!-- For these schemes where any of these particular MIME types
                                        have been supplied, we are a good candidate. -->
                                        <intent-filter>
                                        <action android:name="android.intent.action.VIEW" />
                                        <category android:name="android.intent.category.BROWSABLE" />
                                        <category android:name="android.intent.category.DEFAULT" />
                                        <data android:scheme="http" />
                                        <data android:scheme="https" />
                                        <data android:scheme="inline" />
                                        <data android:mimeType="text/html"/>
                                        <data android:mimeType="text/plain"/>
                                        <data android:mimeType="application/xhtml+xml"/>
                                        <data android:mimeType="application/vnd.wap.xhtml+xml"/>
                                        </intent-filter>
                                        <!-- We are also the main entry point of the browser. -->
                                        <intent-filter>
                                        <action android:name="android.intent.action.MAIN" />
                                        <category android:name="android.intent.category.DEFAULT" />
                                        <category android:name="android.intent.category.LAUNCHER" />
                                        <category android:name="android.intent.category.BROWSABLE" />
                                        </intent-filter>
                                        <!-- The maps app is a much better experience, so it's not
                                        worth having this at all... especially for a demo!
                                        <intent-filter android:label="Map In Browser">
                                        <action android:name="android.intent.action.VIEW" />
                                        <category android:name="android.intent.category.DEFAULT" />
                                        <data android:mimeType="vnd.android.cursor.item/postal-address" />
                                        </intent-filter>
                                        -->
                                        <intent-filter>
                                        <action android:name="android.intent.action.WEB_SEARCH" />
                                        <category android:name="android.intent.category.DEFAULT" />
                                        <category android:name="android.intent.category.BROWSABLE" />
                                        <data android:scheme="" />
                                        <data android:scheme="http" />
                                        <data android:scheme="https" />
                                        </intent-filter>
                                        <intent-filter>
                                        <action android:name="android.intent.action.MEDIA_SEARCH" />
                                        <category android:name="android.intent.category.DEFAULT" />
                                        </intent-filter>
                                        <intent-filter>
                                        <action android:name="android.intent.action.SEARCH" />
                                        <category android:name="android.intent.category.DEFAULT" />
                                        </intent-filter>
                                        <meta-data android:name="android.app.searchable"
                                        android:resource="@xml/searchable" />
                                        </activity>





                                        Look at the different types of intent-filters you might need in order to cover all possible cases.



                                        Refer to this link - complete manifest file of froyo browser.






                                        share|improve this answer


























                                          0












                                          0








                                          0







                                          You need to consider various cases that may be applicable.



                                          Please refer the intent-filters below. Also link is provided at the end.




                                          <activity android:name="BrowserActivity"
                                          android:label="@string/application_name"
                                          android:launchMode="singleTask"
                                          android:alwaysRetainTaskState="true"
                                          android:configChanges="orientation|keyboardHidden"
                                          android:theme="@style/BrowserTheme"
                                          android:windowSoftInputMode="adjustResize" >
                                          <intent-filter>
                                          <action android:name="android.speech.action.VOICE_SEARCH_RESULTS" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          </intent-filter>
                                          <!-- For these schemes were not particular MIME type has been
                                          supplied, we are a good candidate. -->
                                          <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" />
                                          <data android:scheme="https" />
                                          <data android:scheme="about" />
                                          <data android:scheme="javascript" />
                                          </intent-filter>
                                          <!-- For these schemes where any of these particular MIME types
                                          have been supplied, we are a good candidate. -->
                                          <intent-filter>
                                          <action android:name="android.intent.action.VIEW" />
                                          <category android:name="android.intent.category.BROWSABLE" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          <data android:scheme="http" />
                                          <data android:scheme="https" />
                                          <data android:scheme="inline" />
                                          <data android:mimeType="text/html"/>
                                          <data android:mimeType="text/plain"/>
                                          <data android:mimeType="application/xhtml+xml"/>
                                          <data android:mimeType="application/vnd.wap.xhtml+xml"/>
                                          </intent-filter>
                                          <!-- We are also the main entry point of the browser. -->
                                          <intent-filter>
                                          <action android:name="android.intent.action.MAIN" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          <category android:name="android.intent.category.LAUNCHER" />
                                          <category android:name="android.intent.category.BROWSABLE" />
                                          </intent-filter>
                                          <!-- The maps app is a much better experience, so it's not
                                          worth having this at all... especially for a demo!
                                          <intent-filter android:label="Map In Browser">
                                          <action android:name="android.intent.action.VIEW" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          <data android:mimeType="vnd.android.cursor.item/postal-address" />
                                          </intent-filter>
                                          -->
                                          <intent-filter>
                                          <action android:name="android.intent.action.WEB_SEARCH" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          <category android:name="android.intent.category.BROWSABLE" />
                                          <data android:scheme="" />
                                          <data android:scheme="http" />
                                          <data android:scheme="https" />
                                          </intent-filter>
                                          <intent-filter>
                                          <action android:name="android.intent.action.MEDIA_SEARCH" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          </intent-filter>
                                          <intent-filter>
                                          <action android:name="android.intent.action.SEARCH" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          </intent-filter>
                                          <meta-data android:name="android.app.searchable"
                                          android:resource="@xml/searchable" />
                                          </activity>





                                          Look at the different types of intent-filters you might need in order to cover all possible cases.



                                          Refer to this link - complete manifest file of froyo browser.






                                          share|improve this answer













                                          You need to consider various cases that may be applicable.



                                          Please refer the intent-filters below. Also link is provided at the end.




                                          <activity android:name="BrowserActivity"
                                          android:label="@string/application_name"
                                          android:launchMode="singleTask"
                                          android:alwaysRetainTaskState="true"
                                          android:configChanges="orientation|keyboardHidden"
                                          android:theme="@style/BrowserTheme"
                                          android:windowSoftInputMode="adjustResize" >
                                          <intent-filter>
                                          <action android:name="android.speech.action.VOICE_SEARCH_RESULTS" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          </intent-filter>
                                          <!-- For these schemes were not particular MIME type has been
                                          supplied, we are a good candidate. -->
                                          <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" />
                                          <data android:scheme="https" />
                                          <data android:scheme="about" />
                                          <data android:scheme="javascript" />
                                          </intent-filter>
                                          <!-- For these schemes where any of these particular MIME types
                                          have been supplied, we are a good candidate. -->
                                          <intent-filter>
                                          <action android:name="android.intent.action.VIEW" />
                                          <category android:name="android.intent.category.BROWSABLE" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          <data android:scheme="http" />
                                          <data android:scheme="https" />
                                          <data android:scheme="inline" />
                                          <data android:mimeType="text/html"/>
                                          <data android:mimeType="text/plain"/>
                                          <data android:mimeType="application/xhtml+xml"/>
                                          <data android:mimeType="application/vnd.wap.xhtml+xml"/>
                                          </intent-filter>
                                          <!-- We are also the main entry point of the browser. -->
                                          <intent-filter>
                                          <action android:name="android.intent.action.MAIN" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          <category android:name="android.intent.category.LAUNCHER" />
                                          <category android:name="android.intent.category.BROWSABLE" />
                                          </intent-filter>
                                          <!-- The maps app is a much better experience, so it's not
                                          worth having this at all... especially for a demo!
                                          <intent-filter android:label="Map In Browser">
                                          <action android:name="android.intent.action.VIEW" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          <data android:mimeType="vnd.android.cursor.item/postal-address" />
                                          </intent-filter>
                                          -->
                                          <intent-filter>
                                          <action android:name="android.intent.action.WEB_SEARCH" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          <category android:name="android.intent.category.BROWSABLE" />
                                          <data android:scheme="" />
                                          <data android:scheme="http" />
                                          <data android:scheme="https" />
                                          </intent-filter>
                                          <intent-filter>
                                          <action android:name="android.intent.action.MEDIA_SEARCH" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          </intent-filter>
                                          <intent-filter>
                                          <action android:name="android.intent.action.SEARCH" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          </intent-filter>
                                          <meta-data android:name="android.app.searchable"
                                          android:resource="@xml/searchable" />
                                          </activity>





                                          Look at the different types of intent-filters you might need in order to cover all possible cases.



                                          Refer to this link - complete manifest file of froyo browser.






                                          <activity android:name="BrowserActivity"
                                          android:label="@string/application_name"
                                          android:launchMode="singleTask"
                                          android:alwaysRetainTaskState="true"
                                          android:configChanges="orientation|keyboardHidden"
                                          android:theme="@style/BrowserTheme"
                                          android:windowSoftInputMode="adjustResize" >
                                          <intent-filter>
                                          <action android:name="android.speech.action.VOICE_SEARCH_RESULTS" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          </intent-filter>
                                          <!-- For these schemes were not particular MIME type has been
                                          supplied, we are a good candidate. -->
                                          <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" />
                                          <data android:scheme="https" />
                                          <data android:scheme="about" />
                                          <data android:scheme="javascript" />
                                          </intent-filter>
                                          <!-- For these schemes where any of these particular MIME types
                                          have been supplied, we are a good candidate. -->
                                          <intent-filter>
                                          <action android:name="android.intent.action.VIEW" />
                                          <category android:name="android.intent.category.BROWSABLE" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          <data android:scheme="http" />
                                          <data android:scheme="https" />
                                          <data android:scheme="inline" />
                                          <data android:mimeType="text/html"/>
                                          <data android:mimeType="text/plain"/>
                                          <data android:mimeType="application/xhtml+xml"/>
                                          <data android:mimeType="application/vnd.wap.xhtml+xml"/>
                                          </intent-filter>
                                          <!-- We are also the main entry point of the browser. -->
                                          <intent-filter>
                                          <action android:name="android.intent.action.MAIN" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          <category android:name="android.intent.category.LAUNCHER" />
                                          <category android:name="android.intent.category.BROWSABLE" />
                                          </intent-filter>
                                          <!-- The maps app is a much better experience, so it's not
                                          worth having this at all... especially for a demo!
                                          <intent-filter android:label="Map In Browser">
                                          <action android:name="android.intent.action.VIEW" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          <data android:mimeType="vnd.android.cursor.item/postal-address" />
                                          </intent-filter>
                                          -->
                                          <intent-filter>
                                          <action android:name="android.intent.action.WEB_SEARCH" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          <category android:name="android.intent.category.BROWSABLE" />
                                          <data android:scheme="" />
                                          <data android:scheme="http" />
                                          <data android:scheme="https" />
                                          </intent-filter>
                                          <intent-filter>
                                          <action android:name="android.intent.action.MEDIA_SEARCH" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          </intent-filter>
                                          <intent-filter>
                                          <action android:name="android.intent.action.SEARCH" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          </intent-filter>
                                          <meta-data android:name="android.app.searchable"
                                          android:resource="@xml/searchable" />
                                          </activity>





                                          <activity android:name="BrowserActivity"
                                          android:label="@string/application_name"
                                          android:launchMode="singleTask"
                                          android:alwaysRetainTaskState="true"
                                          android:configChanges="orientation|keyboardHidden"
                                          android:theme="@style/BrowserTheme"
                                          android:windowSoftInputMode="adjustResize" >
                                          <intent-filter>
                                          <action android:name="android.speech.action.VOICE_SEARCH_RESULTS" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          </intent-filter>
                                          <!-- For these schemes were not particular MIME type has been
                                          supplied, we are a good candidate. -->
                                          <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" />
                                          <data android:scheme="https" />
                                          <data android:scheme="about" />
                                          <data android:scheme="javascript" />
                                          </intent-filter>
                                          <!-- For these schemes where any of these particular MIME types
                                          have been supplied, we are a good candidate. -->
                                          <intent-filter>
                                          <action android:name="android.intent.action.VIEW" />
                                          <category android:name="android.intent.category.BROWSABLE" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          <data android:scheme="http" />
                                          <data android:scheme="https" />
                                          <data android:scheme="inline" />
                                          <data android:mimeType="text/html"/>
                                          <data android:mimeType="text/plain"/>
                                          <data android:mimeType="application/xhtml+xml"/>
                                          <data android:mimeType="application/vnd.wap.xhtml+xml"/>
                                          </intent-filter>
                                          <!-- We are also the main entry point of the browser. -->
                                          <intent-filter>
                                          <action android:name="android.intent.action.MAIN" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          <category android:name="android.intent.category.LAUNCHER" />
                                          <category android:name="android.intent.category.BROWSABLE" />
                                          </intent-filter>
                                          <!-- The maps app is a much better experience, so it's not
                                          worth having this at all... especially for a demo!
                                          <intent-filter android:label="Map In Browser">
                                          <action android:name="android.intent.action.VIEW" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          <data android:mimeType="vnd.android.cursor.item/postal-address" />
                                          </intent-filter>
                                          -->
                                          <intent-filter>
                                          <action android:name="android.intent.action.WEB_SEARCH" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          <category android:name="android.intent.category.BROWSABLE" />
                                          <data android:scheme="" />
                                          <data android:scheme="http" />
                                          <data android:scheme="https" />
                                          </intent-filter>
                                          <intent-filter>
                                          <action android:name="android.intent.action.MEDIA_SEARCH" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          </intent-filter>
                                          <intent-filter>
                                          <action android:name="android.intent.action.SEARCH" />
                                          <category android:name="android.intent.category.DEFAULT" />
                                          </intent-filter>
                                          <meta-data android:name="android.app.searchable"
                                          android:resource="@xml/searchable" />
                                          </activity>






                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Dec 2 '18 at 10:27









                                          m__m__

                                          1




                                          1























                                              0














                                              Consider using CATEGORY_APP_BROWSER with your main filter:




                                              Used with ACTION_MAIN to launch the browser application. The activity should be able to browse the Internet.




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





                                              share|improve this answer




























                                                0














                                                Consider using CATEGORY_APP_BROWSER with your main filter:




                                                Used with ACTION_MAIN to launch the browser application. The activity should be able to browse the Internet.




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





                                                share|improve this answer


























                                                  0












                                                  0








                                                  0







                                                  Consider using CATEGORY_APP_BROWSER with your main filter:




                                                  Used with ACTION_MAIN to launch the browser application. The activity should be able to browse the Internet.




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





                                                  share|improve this answer













                                                  Consider using CATEGORY_APP_BROWSER with your main filter:




                                                  Used with ACTION_MAIN to launch the browser application. The activity should be able to browse the Internet.




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






                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Dec 5 '18 at 16:12









                                                  tynntynn

                                                  19.5k54375




                                                  19.5k54375























                                                      0














                                                      You can achieve this programatically, like this:



                                                      Intent share = new Intent(android.content.Intent.ACTION_SEND);
                                                      share.setType("text/plain");
                                                      share.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
                                                      share.setPackage("your.app.package.name");
                                                      startActivity(share);


                                                      and also it will be good, if you put a check for the app existence on phone.



                                                      Happy Coding :)






                                                      share|improve this answer




























                                                        0














                                                        You can achieve this programatically, like this:



                                                        Intent share = new Intent(android.content.Intent.ACTION_SEND);
                                                        share.setType("text/plain");
                                                        share.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
                                                        share.setPackage("your.app.package.name");
                                                        startActivity(share);


                                                        and also it will be good, if you put a check for the app existence on phone.



                                                        Happy Coding :)






                                                        share|improve this answer


























                                                          0












                                                          0








                                                          0







                                                          You can achieve this programatically, like this:



                                                          Intent share = new Intent(android.content.Intent.ACTION_SEND);
                                                          share.setType("text/plain");
                                                          share.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
                                                          share.setPackage("your.app.package.name");
                                                          startActivity(share);


                                                          and also it will be good, if you put a check for the app existence on phone.



                                                          Happy Coding :)






                                                          share|improve this answer













                                                          You can achieve this programatically, like this:



                                                          Intent share = new Intent(android.content.Intent.ACTION_SEND);
                                                          share.setType("text/plain");
                                                          share.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
                                                          share.setPackage("your.app.package.name");
                                                          startActivity(share);


                                                          and also it will be good, if you put a check for the app existence on phone.



                                                          Happy Coding :)







                                                          share|improve this answer












                                                          share|improve this answer



                                                          share|improve this answer










                                                          answered Dec 7 '18 at 7:34









                                                          Abdul AzizAbdul Aziz

                                                          418510




                                                          418510






























                                                              draft saved

                                                              draft discarded




















































                                                              Thanks for contributing an answer to Stack Overflow!


                                                              • Please be sure to answer the question. Provide details and share your research!

                                                              But avoid



                                                              • Asking for help, clarification, or responding to other answers.

                                                              • Making statements based on opinion; back them up with references or personal experience.


                                                              To learn more, see our tips on writing great answers.




                                                              draft saved


                                                              draft discarded














                                                              StackExchange.ready(
                                                              function () {
                                                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53426557%2fadd-my-browser-in-the-default-browser-selection-list-in-android%23new-answer', 'question_page');
                                                              }
                                                              );

                                                              Post as a guest















                                                              Required, but never shown





















































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown

































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown







                                                              Popular posts from this blog

                                                              404 Error Contact Form 7 ajax form submitting

                                                              How to know if a Active Directory user can login interactively

                                                              TypeError: fit_transform() missing 1 required positional argument: 'X'