Skip to content

Commit

Permalink
Respond to comments
Browse files Browse the repository at this point in the history
  • Loading branch information
markafoltz committed Oct 16, 2024
1 parent 8ef1ca5 commit 00f1e27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
15 changes: 4 additions & 11 deletions app-install-banner/deferred-banner/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,16 @@ <h1>Web App Install Banner: Defer prompt of banner sample</h1>
</p>

<ul>
<li>The app uses a <a href="https://developers.google.com/web/fundamentals/getting-started/primers/service-workers">service worker</a></li>
<li>The site is using HTTPS</li>
<li>The app has a manifest declared</li>
<li>The manifest has a <code>short_name</code>, 144 pixel icon and a type of 'image/png'</li>
</ul>

<p>Frequently developers want be able to control when the Add to homescreen prompt is shown to users.
This API and example shows you how you can defer the prompt until a later time, in this case when the
user clicks the button below. If the button below is disabled, Chrome has chosen now is not a good time to
show the prompt.</p>
<p>Frequently developers want be able to control when the install flow is shown to users.
This API and example shows you how you can defer the flow until a later time, in this
case when the user clicks the button below.</p>

<p>If the button is disabled, come back in a few minutes and the button will be enabled.</p>

<p>For testing, we encourage you to force the button to be enabled by setting the
chrome://flags/#bypass-app-banner-engagement-checks flag.</p>

<button id="btnSave" disabled>Click this to show the prompt</button>
<button id="btnSave" disabled>Click this to install the app</button>

<p>Below you will see the output of the example.</p>

Expand Down
10 changes: 4 additions & 6 deletions app-install-banner/deferred-banner/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ Deferred App Install Banner Sample

See https://googlechrome.github.io/samples/app-install-banner/deferred-banner/index.html for a live demo.

#### Directions

#### Directions:
* Install Chrome, or another browser that supports manifest.
* Visit the demo page.

* Install Chrome, or another browser that supports Service Workers and manifest.
* Wait a few minutes.
* Or, enable chrome://flags/#bypass-app-banner-engagement-checks to enable the button right away.

Once the button is enabled, Chrome will display the Add to Home Screen prompt when you click it.
The browser will trigger the install flow when you click the button.

0 comments on commit 00f1e27

Please sign in to comment.