How to implement my very own URI scheme on Android

后端 未结 5 708
借酒劲吻你
借酒劲吻你 2020-11-22 06:12

Say I want to define that an URI such as:

myapp://path/to/what/i/want?d=This%20is%20a%20test

must be handled by my own application, or serv

5条回答
  •  终归单人心
    2020-11-22 06:52

    As the question is asked years ago, and Android is evolved a lot on this URI scheme.
    From original URI scheme, to deep link, and now Android App Links.

    Android now recommends to use HTTP URLs, not define your own URI scheme. Because Android App Links use HTTP URLs that link to a website domain you own, so no other app can use your links. You can check the comparison of deep link and Android App links from here

    Now you can easily add a URI scheme by using Android Studio option: Tools > App Links Assistant. Please refer the detail to Android document: https://developer.android.com/studio/write/app-link-indexing.html

提交回复
热议问题