簡體   English   中英

使用Intent和Scheme啟動Android應用

[英]Using Intent with scheme to launch app android

我正在嘗試獲取一個Web URL以打開/啟動我的應用程序的活動,但是它不起作用。 該URL與以下內容類似:

https://zzz.yyy.com/activate?user= “ 123123123”&token =“ absdi24”

我只需要在“激活”之前識別該鏈接。 我的意圖如下:

<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="https" android:host="zzz.yyy.com"
            android:path="/activate*"/>
        </intent-filter>

我已經在“路徑”的末尾使用或不使用通配符(*)來嘗試使用此代碼,到目前為止沒有任何效果。 什么東西少了?

android:path是字面上的完整路徑。 試試android:pathPrefixandroid:pathPattern在這種情況下, pathPrefix似乎足夠了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM