# Add to Home Screen - Hard Prompt

**URL:** <https://community.glideapps.com/t/add-to-home-screen-hard-prompt/60269>\
**Category:** Ask for Help\
**Created:** [April 7, 2023, 8:32pm UTC](https://community.glideapps.com/t/add-to-home-screen-hard-prompt/60269 "2023-04-07T20:32:51Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![john\_at\_openfire.ai](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_at_openfire.ai/32/57224_2.png) [@john\_at\_openfire.ai](https://community.glideapps.com/u/john_at_openfire.ai)\
**Post date:** [April 7, 2023, 8:32pm UTC](https://community.glideapps.com/t/add-to-home-screen-hard-prompt/60269/1 "2023-04-07T20:32:51Z")

</div>

Is there a way that when a user either adds a glide app to the home screen from Safari in Apple OS or on android, that a table could have a column that records that instance?

---

<div class="post-metadata">

**Author:** ![john\_at\_openfire.ai](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_at_openfire.ai/32/57224_2.png) [@john\_at\_openfire.ai](https://community.glideapps.com/u/john_at_openfire.ai)\
**Post date:** [April 7, 2023, 8:33pm UTC](https://community.glideapps.com/t/add-to-home-screen-hard-prompt/60269/2 "2023-04-07T20:33:45Z")

</div>

@david @Robert_Petitto

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [April 8, 2023, 12:29am UTC](https://community.glideapps.com/t/add-to-home-screen-hard-prompt/60269/3 "2023-04-08T00:29:55Z")

</div>

No, that’s not possible at the moment.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [April 8, 2023, 3:12am UTC](https://community.glideapps.com/t/add-to-home-screen-hard-prompt/60269/4 "2023-04-08T03:12:06Z")

</div>

The following in a JavaScript column works for me:

```auto
function getPWADisplayMode() {
  const isStandalone = window.matchMedia('(display-mode: standalone)').matches;
  if (document.referrer.startsWith('android-app://')) {
    return 'twa';
  } else if (navigator.standalone || isStandalone) {
    return 'standalone';
  }
  return 'browser';
}

return getPWADisplayMode();

```

---

<div class="post-metadata">

**Author:** ![john\_at\_openfire.ai](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_at_openfire.ai/32/57224_2.png) [@john\_at\_openfire.ai](https://community.glideapps.com/u/john_at_openfire.ai)\
**Post date:** [April 8, 2023, 12:58pm UTC](https://community.glideapps.com/t/add-to-home-screen-hard-prompt/60269/5 "2023-04-08T12:58:49Z")

</div>

@Darren_Murphy how is this implemented? And I thought Java script was totally impossible for glide?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [April 8, 2023, 2:35pm UTC](https://community.glideapps.com/t/add-to-home-screen-hard-prompt/60269/6 "2023-04-08T14:35:10Z")

</div>

As @Darren_Murphy mentioned, use a javascript column.

 ![Screenshot_20230408-093401](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/d/5de3c80da170876d4b486ce9b1b5c7ad8cbde559.png)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [April 9, 2023, 2:08am UTC](https://community.glideapps.com/t/add-to-home-screen-hard-prompt/60269/7 "2023-04-09T02:08:11Z")

</div>

Interesting, thanks for sharing!

I assume depends on the use case, say you want to count the number of people that have installed the app, you would have to add actions somewhere in the app to record this? Else it would be dynamic based on whether the user is accessing it from the browser or the installed version.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [April 9, 2023, 4:01am UTC](https://community.glideapps.com/t/add-to-home-screen-hard-prompt/60269/8 "2023-04-09T04:01:56Z")

</div>

Yes, that’s correct.  
In the App that I’ve used it in, I have a collection on the home screen that’s used for navigation. So I have a custom action on that collection that sets the value returned by the JavaScript into a non-computed column in the User Profile table.

---

<div class="post-metadata">

**Author:** ![saucy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/saucy/32/21556_2.png) [@saucy](https://community.glideapps.com/u/saucy)\
**Post date:** [April 9, 2023, 10:35am UTC](https://community.glideapps.com/t/add-to-home-screen-hard-prompt/60269/9 "2023-04-09T10:35:19Z")

</div>

Can you provide a video/more screenshots please?  
I tried this in the Javascript column but it didn’t work for me.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [April 9, 2023, 10:47am UTC](https://community.glideapps.com/t/add-to-home-screen-hard-prompt/60269/10 "2023-04-09T10:47:28Z")

</div>

JavaScript column looks like so:

 ![CleanShot 2023-04-09 at 18.44.51@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/0/20431c8c4f64a7685a8c4acba66cb8d71f223e09.jpeg)

Then as previously described, I have an action that writes the value into a non-computed column.  
Note that in the screen shot, it’s returning `browser` for every row. That’s because the screen shot is taken whilst viewing the App in the builder.

---

<div class="post-metadata">

**Author:** ![saucy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/saucy/32/21556_2.png) [@saucy](https://community.glideapps.com/u/saucy)\
**Post date:** [April 9, 2023, 4:38pm UTC](https://community.glideapps.com/t/add-to-home-screen-hard-prompt/60269/11 "2023-04-09T16:38:35Z")

</div>

Thank you!  
So I did this previously and got this result. Then I added a button (with the js as the data for it) but the button didn’t do anything. There was no prompt at all.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [April 9, 2023, 4:47pm UTC](https://community.glideapps.com/t/add-to-home-screen-hard-prompt/60269/12 "2023-04-09T16:47:22Z")

</div>

I don’t really understand what you were doing (or trying to do) with the button, can you explain more?  
What were you expecting the button to do?

---

<div class="post-metadata">

**Author:** ![saucy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/saucy/32/21556_2.png) [@saucy](https://community.glideapps.com/u/saucy)\
**Post date:** [April 9, 2023, 4:49pm UTC](https://community.glideapps.com/t/add-to-home-screen-hard-prompt/60269/13 "2023-04-09T16:49:04Z")

</div>

I wanted the button to add the app to a user’s home screen.  
It does not do that nor prompt them to do that

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [April 9, 2023, 4:53pm UTC](https://community.glideapps.com/t/add-to-home-screen-hard-prompt/60269/14 "2023-04-09T16:53:22Z")

</div>

oh, right. I don’t believe there is any way to do that with an action.
