如何以我的应用程序作为源创建 Spotify 深度链接

问题描述 投票:0回答:1

例如,

deepLink
等于
spotify:app:com.example.name:playlist:37i9dQZEVXbdGwWzuKJrad
,就像这里的旧示例一样。它只是打开 Spotify,没有目标播放列表。我们可以将源应用程序附加到
spotify:playlist:37i9dQZEVXbdGwWzuKJrad
吗?

如果出现

branchLink
浏览器打开。

val deepLink = "spotify:app:${context.packageName}:${entityType.argument}:${model.itemId}"
val spotifyContent = "https://open.spotify.com/playlist/${model.itemId}"
val branchLink = "https://spotify.link/content_linking?~campaign=${context.packageName}&\$deeplink_path=$spotifyContent&\$fallback_url=" + spotifyContent

val nativeIntent = Intent(Intent.ACTION_VIEW, Uri.parse(deepLink))
val webIntent = Intent(Intent.ACTION_VIEW, Uri.parse(branchLink))
android kotlin android-intent deep-linking
1个回答
0
投票

引用的答案很旧。也许10年前还可以,但是这种格式的URI

spotify:app:com.example.name:playlist:37i9dQZEVXbdGwWzuKJrad
现在肯定不行了。

© www.soinside.com 2019 - 2024. All rights reserved.