我最近注意到谷歌的一个功能,如果你用谷歌搜索一个直播的体育游戏you're able to follow it。玩完游戏后,你会在主屏幕上添加一个小部件,你可以在那里看到结果。
我想知道: Android是否提供API来做类似的事情?我希望能够有一个网站,显示游戏的分数,并允许用户固定一个小工具到他们的主屏幕,这样他们就能够观看比赛现场。
这个是可能的吗?
发布于 2021-07-07 05:16:03
我不知道这个问题的答案,我想知道这个问题的答案。这就是我们所说的:
为了调查,我尝试了以下几种方法:
后面的HTML
<div jsname="s2gQvd" class="EDblX DAVP1" jsslot="">
<div class="imso-li-w">
<popout-match-bubble-button jsaction="trigger.sbTXNb">
<a href="https://search.app.goo.gl?link=https://play.google.com/store/apps/details?id%3Dcom.google.android.googlequicksearchbox%26utm_source%3Dbbl_aweb&al=googleapp://deeplink/?data%3DElYKBgjusbuPARIDCLwFGi0SKwgIEifqxZ2_BiGymLLQBhsIAhIRCg0vZy8xMWZxODk2c2cwEAIYvt4EIAEiGAoWaHR0cHM6Ly93d3cuZ29vZ2xlLmNvbQ&afl=https://play.google.com/store/apps/details?id%3Dcom.google.android.googlequicksearchbox%26utm_source%3Dbbl_aweb%26url%3Dgoogleapp://deeplink/?data%253DElYKBgjusbuPARIDCLwFGi0SKwgIEifqxZ2_BiGymLLQBhsIAhIRCg0vZy8xMWZxODk2c2cwEAIYvt4EIAEiGAoWaHR0cHM6Ly93d3cuZ29vZ2xlLmNvbQ&apn=com.google.android.googlequicksearchbox&amv=300865774&utm_source=bbl_aweb" class="rb3KboTS9ex__link">
<div class="rb3KboTS9ex__popout-container rb3KboTS9ex__click-target rb3KboTS9ex__popout-flat-border">
<span>
<svg class="rb3KboTS9ex__popout-icon" height="16px" viewBox="0 0 24 24" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="M19 7h-8v6h8V7zm2-4H3c-1.1 0-2 .9-2 2v14c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98V5c0-1.1-.9-2-2-2zm0 16.01H3V4.98h18v14.03z" fill="#1a73eb"></path>
<path d="M0 0h24v24H0z" fill="none"></path>
</svg>
</span>
<div class="rb3KboTS9ex__popout-text">Live score vastzetten</div>
</div>
</a>
</popout-match-bubble-button>
</div>
</div>
很可能是href做到了这一点,您需要一个原生的android应用程序(在本例中是com.google.android.googlequicksearchbox
)来处理由url触发的Intent
https://search.app.goo.gl/?link=https://play.google.com/store/apps/details?id%3Dcom.google.android.googlequicksearchbox%26utm_source%3Dbbl_aweb&al=googleapp://deeplink/?data%3DElYKBgjusbuPARIDCLwFGi0SKwgIEifqxZ2_BiGymLLQBhsIAhIRCg0vZy8xMWZxODk2c2cwEAIYvt4EIAEiGAoWaHR0cHM6Ly93d3cuZ29vZ2xlLmNvbQ&afl=https://play.google.com/store/apps/details?id%3Dcom.google.android.googlequicksearchbox%26utm_source%3Dbbl_aweb%26url%3Dgoogleapp://deeplink/?data%253DElYKBgjusbuPARIDCLwFGi0SKwgIEifqxZ2_BiGymLLQBhsIAhIRCg0vZy8xMWZxODk2c2cwEAIYvt4EIAEiGAoWaHR0cHM6Ly93d3cuZ29vZ2xlLmNvbQ&apn=com.google.android.googlequicksearchbox&amv=300865774&utm_source=bbl_aweb`
https://stackoverflow.com/questions/57755231
复制相似问题