簡體   English   中英

是否可以在Android設備上延遲PWA標語“添加到主屏幕”?

[英]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')

檢測iOS / Android操作系統

暫無
暫無

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

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