JavaScript snippet add webpage bookmark to home screen

2413
3
07-26-2016 06:56 AM
SPNIOrganization
Occasional Contributor

Hi all,

I made a nice web app with WAB and I want to add a popup window that will tell people how to save the webpage to their smartphone home-screen.

I found this javascript snippet on github:

GitHub - cubiq/add-to-homescreen: Add to home screen call-out for mobile devices

This script is for mobile devices, it automatically shows an overlaying message encouraging to add the web app to the home-screen.

I followed the instructions but it is not working. Don't understand why.

Would love to know if someone has experience with this snippet or maybe another idea?

Thanks,

Dikla.

Tags (2)
0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Dikla,

  How and where did you try and add this in the code? Did you look at the WAB docs about adding other libraries?

Use other libraries—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers

0 Kudos
SPNIOrganization
Occasional Contributor

Hi Robert,

I didn't use the developer edition this time.

I made the app in arcgis online , downloaded the final code and deployed it on my server.

I guess that now because of that i'm limited in adding scripts and customization.. is that right?

and also - I'm not a developer so the instructions in the link you provided are not so clear to me (where is the dependency array and how do I know if it is an AMD module)

maybe it will be best for me to find a developer ;)

Dikla.

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Dikla,

  Yes you would be limited to customizing the WAB code because it came from AGOL WAB and the code is minified. I was able to get it added to a WAB Dev edition site of mine but it did not seem to work on my iPhone 6.

0 Kudos