0

Hey I have made a browser app for android, but now I need to give the user a change to set my browser as default.

EDIT: I have tried to use this code in my manifest but with nu luck

<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
</intent-filter>

But with no luck

Thor1401
  • 140
  • 1
  • 12
  • 1
    register your app as a listener to url sharing events like explained here: http://stackoverflow.com/questions/8624315/make-android-app-listen-to-shared-links – Rotem May 20 '13 at 13:07

1 Answers1

1

Try to add following XML to your main activity to make your app a candidate for intent sent by other apps that look for loading a page into the browser with startActivity(new Intent("android.intent.action.VIEW", Uri.parse("http://....")));

<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
</intent-filter>
bachr
  • 5,780
  • 12
  • 57
  • 92