Falco
(Falco)
1월 2, 2017, 2:46오후
1
Continuing the discussion from Add to homescreen banner on Android :
Just created a PR to promote the native app with push notification for your recurring visitors:
https://github.com/discourse/discourse/pull/4632
If it gets merged, you can enable the site setting native_app_install_banner to get it working for your site. Remember that you must have the requirements from the Web App banner, like running with HTTPS.
Workflow for Android (Mobile | Tablet)
iOS
15개의 좋아요
Falco
(Falco)
1월 7, 2017, 1:03오전
2
This has been merged and it’s alive in Discourse 1.7. Remember it’s off by default, so you need to opt-in to show the banner into settings.
Let me know if it’s working fine in your communities.
4개의 좋아요
Does this appear with the Discourse logo only in the banner or can it be customised to use our own logos?
Falco
(Falco)
11월 18, 2017, 2:15오후
4
On the native banner, it will show the native app logo, which is the Discourse one, because it’s pointing to this apps:
Download Discourse Hub by Discourse on the App Store. See screenshots, ratings and reviews, user tips, and more apps like Discourse Hub.
If you have a white-label Discourse app you will want to customize this lines:
Android:
<%= preload_script_url ExtraLocalesController.url("mf"), type_module: true %>
<%- if ExtraLocalesController.client_overrides_exist? %>
<%= preload_script_url ExtraLocalesController.url("overrides"), type_module: true %>
<%- end %>
<%- if staff? %>
<%= preload_script_url ExtraLocalesController.url("admin"), type_module: true %>
<%- end %>
<%- if admin? %>
<%= preload_script_url ExtraLocalesController.url("wizard"), type_module: true %>
<%- end %>
<%- unless customization_disabled? %>
<%= theme_translations_lookup %>
<%- end %>
<link rel="preload" href="<%= script_asset_path "js/browser-update" %>" as="script" nonce="<%= csp_nonce_placeholder %>">
<%= preload_script 'js/browser-detect' %>
<%= preload_script "vendor", type_module: true %>
<%= module_preloads_for "discourse", (staff? ? "admin/compat-modules" : nil) %>
iOS:
}
]
}
if SiteSetting.native_app_install_banner
manifest = manifest.merge({
prefer_related_applications: true,
related_applications: [
{
platform: "play",
id: "com.discourse"
}
]
})
end
manifest
end
end
That said, using the standard Add to HomeScreen on Android will use your custom logo everywhere, just set a good one at the Site Setting large_icon_url with 512x512 pixels.
6개의 좋아요
Thanks! That’s very helpful
1개의 좋아요
Bathinda
(Bathinda Helper)
1월 23, 2023, 7:30오전
6
very helpful.
Though I don’t see where is the file in my Ubuntu server, in which I’ve to edit this line.