Nir
Nir

Reputation: 1678

Add an icon to App Script deployed as web app ("Add to home screen")

My app script is deployed as a web app, I used android chrome to "Add to home screen" and now I wish to change the default icon (blue G) with my icon

I found in the chrome developer guide that icons are added using the manifest field "icons". but it looks like it is not supported as I get the following if I try to add this field

Invalid manifest: unknown fields: [icons]

Is there a way to add an icon to a deployed web app? To use an image from my sheet? a file from google drive? and use it in the manifest?

Upvotes: 3

Views: 2481

Answers (1)

Passer-By
Passer-By

Reputation: 497

For android, I find that .setFaviconUrl()

HtmlService.createTemplateFromFile('htmlfile').evaluate().setFaviconUrl('exampleLink.com')

placed in the doGet() function works for setting the icon for adding to the home screen on Android. From my experience the file doesn't have to be .ico, I used a .png in my project.

Upvotes: 1

Related Questions