1

On Gmail or Google Application when we select some text which contains an URL it shows corresponding app icon along with the copy-paste options.

Refer the image for same :

(Here pinterest app icon is shown as I select their URL)

enter image description here

Similarly I want my Application icon to appear if user selects any text or link which contains deeplink URL of my Android Application. In my case it shows option to open the URL with chrome instead of my installed Android App. I have searched a lot but didn't find anything relevant on this topic so ultimately thought to post it as question.

How can I achieve this? What changes do I need to do in code for this?

Thanks in advance..

Astha Garg
  • 1,022
  • 7
  • 21
  • You can check android app links for this https://developer.android.com/training/app-links/verify-site-associations – Anurag Chutani Nov 26 '20 at 13:25
  • @AnuragChutani : We do have Applinks/Deeplinks defined but I don't want to open my App on click, rather I want to show App icon along with copy/paste options on selecting any link/text related to my App. – Astha Garg Nov 26 '20 at 13:28
  • This is specific to your OS and manufacturer. Unable to see icon on oneplus device. Can you share device info used in this screenshot? – Anurag Chutani Nov 26 '20 at 13:38
  • same, oneplus 5. Do u have pinterest App installed on my device? or you tried for some other app? – Astha Garg Nov 26 '20 at 13:46
  • Just to confirm ................... android:autoVerify="true" and are added in your manifest? and Link verification is done? – Anurag Chutani Nov 26 '20 at 14:48
  • Yes we have proper implementation done for deeplink handing. I think this (icon with copy paste is different from Applink) – Astha Garg Nov 26 '20 at 15:00
  • I have decompiled Pinterest apk and only possible thing found in manifest related to www.pinterest.com and www.pin.it is app links only. If you are able to achieve it. Please post solution here, just curious for implementation. Thanks. – Anurag Chutani Nov 26 '20 at 15:10
  • 1
    Try [this](https://stackoverflow.com/a/74417217/15055605). – YaMiN Nov 12 '22 at 23:04

0 Answers0