Search code examples
androidadbdeep-linkingandroid-deep-link

What is "Selection State"? Should it be Enabled?


As per the document, We can verify our deeplink intent using

adb shell pm get-app-links --user cur <package>

E.g.

adb shell pm get-app-links --user cur com.airbnb.android 

It will produce

  com.airbnb.android:
    ID: 2c62f23a-087a-4c4b-be25-bc02f719dafc
    Signatures: [43:7B:7C:9A:94:6C:3C:E9:F2:49:A4:30:86:14:F5:42:C1:4D:7C:7A:3B:C9:77:89:98:4E:02:47:CD:23:01:FB]
    Domain verification state:
      airbnb.cat: verified
      airbnb.com: verified
      *.airbnb.cat: verified
      ....  more ....
    User 0:
      Verification link handling allowed: true
      Selection state:
        Disabled:
          airbnb.cat
          airbnb.com
          *.airbnb.cat
          *.airbnb.com
          *.airbnb.co.cr
          ....  more ....

My question is,

  • What is Selection state?
  • Why is it mostly Disabled?
  • Should we make it Enabled?
  • How can we make it Enabled?

Solution

  • For those links that is already verified, we should keep the status as "Disabled", given the user doesn't need to manually "Enabled" them.

    But for some link that is not verified, in the case or AirBnB,

    Where they are error as below (note the 2 that are having verifications status as 1024)

      com.airbnb.android:
        ID: 2c62f23a-087a-4c4b-be25-bc02f719dafc
        Signatures: [43:7B:7C:9A:94:6C:3C:E9:F2:49:A4:30:86:14:F5:42:C1:4D:7C:7A:3B:C9:77:89:98:4E:02:47:CD:23:01:FB]
        Domain verification state:
          airbnb.cat: verified
          airbnb.com: verified
          *.airbnb.cat: verified
          ....  more ....
          airbnb.ru: 1024
          ....  more ....
          *.airbnb.pt: verified
          *.airbnb.ru: 1024
          *.airbnb.se: verified
    

    We can manually enabled them through the process below

    enter image description here

    After doing that, when we perform the below again

    adb shell pm get-app-links --user cur com.airbnb.android
    

    It will result as following. Noticed the 2 links are not Enabled.

      com.airbnb.android:
        ID: 2c62f23a-087a-4c4b-be25-bc02f719dafc
        Signatures: [43:7B:7C:9A:94:6C:3C:E9:F2:49:A4:30:86:14:F5:42:C1:4D:7C:7A:3B:C9:77:89:98:4E:02:47:CD:23:01:FB]
        Domain verification state:
          airbnb.cat: verified
          airbnb.com: verified
          *.airbnb.cat: verified
          ....  more ....
          airbnb.ru: 1024
          ....  more ....
          *.airbnb.pt: verified
          *.airbnb.ru: 1024
          *.airbnb.se: verified
        User 0:
          Verification link handling allowed: true
          Selection state:
            Enabled:
              airbnb.ru
              *.airbnb.ru
            Disabled:
              airbnb.cat
              airbnb.com
              *.airbnb.cat
              *.airbnb.com
              ....  more ....
    

    Therefore the answer to the 4 questions

    1. What is Selection state? It's the state if the user has manually Enabled the unverified Link
    2. Why is it mostly Disabled? Because most of the Verified link doesn't need to be Enabled, and by default all is Disabled anyway.
    3. Should we make it Enabled? Only if the user decided to Enable the unverified links
    4. How can we make it Enabled? As shown in the diagram above.