Hyperlinks with non HTTP schema in GMAIL

前端 未结 2 1891
萌比男神i
萌比男神i 2021-02-05 15:02

So I\'m making mobile apps and want to do links to activate things in both iOS and Android using the same URL. I know how to do this already. my intent on android is something l

相关标签:
2条回答
  • 2021-02-05 15:47

    You can create intent filters for HTTP and HTTPS URLs as well as URLs with custom schemes.

    For example, you might set up an intent filter like so:

    <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:scheme="http"
            android:host="example.com"
            android:path="/my-path" />
    
    </intent-filter>
    
    0 讨论(0)
  • 2021-02-05 15:56

    Custom schemes are not supported by gmail and chrome apps. Don't do this. Follow android guidelines for opening app from browser / link. See the following post Make a link in the Android browser start up my app?

    0 讨论(0)
提交回复
热议问题