I have a few of instances of Discourse running for different projects. They are pretty much identical, other than a couple of minor CSS differences, but are behaving differently when I try to use the “Add to homescreen” option on chrome for android. The majority work without a hitch (imitating a native app; splash screen, no URL bar, etc), however two instances seem to simply put a shortcut on the homescreen and open up in a new tab in chrome.
Are there any specific criteria that I might have neglected to set up in the two misbehaving that might be causing this? (I’ve tested it across a couple of devices, so I’m confident I’m not the only one experiencing it).
Falco
(Falco)
September 13, 2016, 10:03pm
2
As said here you need https. Can you share the links?
1 Like
Both are using https I believe:
https://forum.ether.camp/
1 Like
Falco
(Falco)
September 13, 2016, 10:07pm
4
Both manifest.json is somehow broken. How they did it is beyond me.
Maybe they forgot to set a required field…
What are the required fields? And how would I go about fixing this?
Falco
(Falco)
September 13, 2016, 10:10pm
6
My best guess is they didn’t set the apple_touch_icon_url
SiteSetting. Try sending a PM to an admin and asking then.
1 Like
I’m the admin for both.
apple_touch_icon_url
for https://forum.gnosis.pm is:
mobile_logo_url
for https://forum.gnosis.pm is:
1 Like
Falco
(Falco)
September 13, 2016, 10:27pm
8
auryn_macmillan:
I’m the admin for both.
Hahaha, you should’ve mentioned it earlier .
The only SiteSettings that we use are title
and apple_touch_icon_url
.
def manifest
render json: default_manifest.to_json
end
def opensearch
render file: "#{Rails.root}/app/views/metadata/opensearch.xml"
end
private
def default_manifest
{
name: SiteSetting.title,
short_name: SiteSetting.title,
display: 'standalone',
orientation: 'portrait',
start_url: "#{Discourse.base_uri}/",
background_color: "##{ColorScheme.hex_for_name('secondary')}",
theme_color: "##{ColorScheme.hex_for_name('header_background')}",
icons: [
{
Do you use any plugins? The push notifications one mess with this controller I think.
Yeah I have the push notifications plugin installed on both, I’ll try rebuilding one without and see if that fixes it.
1 Like
Falco
(Falco)
September 13, 2016, 10:30pm
10
Hoho, found it!
I think that just configuring the plugin may work. You either install and fill all the fields or uninstall.
1 Like
Falco
(Falco)
September 13, 2016, 10:36pm
12
There is a field called gcm_sender_id
somewhere.
However, this should not happen anyway. This may fix it (still need some testing):
https://github.com/discourse/discourse-push-notifications/pull/7
1 Like
disabling the plugin fixed it for https://forum.ether.camp .
I’ll just disable it on both for now, and re-enable it once it’s been fixed.
Thanks heaps for the help.
2 Likes
This topic was automatically closed after 2824 days. New replies are no longer allowed.