![](/img/trans.png)
[英]Is it possible to make an in-app button that triggers the PWA “Add to Home Screen” install banner?
[英]Is it possible to delay the PWA banner “add to home screen” on android devices?
我的應用有一些介紹頁面,我希望用戶在android顯示橫幅“添加到主屏幕”之前看到它,這可能嗎? 或另一種解決方案可能將其隱藏一段時間...
非常感謝您,任何幫助非常感謝。
瀏覽器有一個名為navigator.userAgent的全局變量。 它包含一個字符串,您可以針對該字符串執行indexOf,以查看該應用程序是否在android上運行,如下所示:
//'True' if "Android" is in the user agent
if (navigator.userAgent.indexOf('Android') != -1)
console.log('running on android')
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.