Falco
(Falco)
2017 年 1 月 2 日午後 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:
master ← xfalcox:native-app-banner
merged 06:32PM - 03 Jan 17 UTC
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)
2017 年 1 月 7 日午前 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)
2017 年 11 月 18 日午後 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 games like Discourse Hub.
If you have a white-label Discourse app you will want to customize this lines:
Android:
<%- 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 %>
<% EmberCli.script_chunks["chunk.admin"]&.each do |script_name| %>
<link rel="preload" href="<%= script_asset_path(script_name) %>" as="script" nonce="<%= csp_nonce_placeholder %>" data-discourse-entrypoint="admin">
<% end %>
<%- end %>
<%- if admin? %>
<%= preload_script_url ExtraLocalesController.url("wizard"), type_module: true %>
<%- end %>
<%- unless customization_disabled? %>
<%= theme_translations_lookup %>
<%= theme_js_lookup %>
<%= theme_lookup("head_tag") %>
<%- end %>
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)
2023 年 1 月 23 日午前 7:30
6
非常に参考になりました。
ただ、Ubuntuサーバーのどこを編集すればよいのか、そのファイルが見当たりません。