0

I am working on an application where i have to create a link of my application and copy that link to text buffer and paste that link in my device in any text editor. Now when i tap on that link my application should open and show appropriate data. I don't know how to implement this i searched on internet I did not find any solution which can explain this feature implementation. give me the best way to implement this.

I have tried this but can not understand

Launch your application when a link taped

Community
  • 1
  • 1
farrukh
  • 617
  • 4
  • 15

1 Answers1

0

You have to use other app to start it. You should register intent-filter with other action and category in your app. The most common action should be ACTION_VIEW combine with category BROWSABLE, then you can use a url in brower or sms to open you app. The intent-filter should be like:

<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:host="openmyapp"
            android:scheme="http" />
    </intent-filter>
Ketan Ahir
  • 6,458
  • 1
  • 20
  • 43