Native app install banner for Android and iOS

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 Likes

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 Likes

Does this appear with the Discourse logo only in the banner or can it be customised to use our own logos?

On the native banner, it will show the native app logo, which is the Discourse one, because it’s pointing to this apps:

If you have a white-label Discourse app you will want to customize this lines:

Android:

https://github.com/discourse/discourse/blob/master/app/views/layouts/application.html.erb#L51

iOS:

https://github.com/discourse/discourse/blob/d7c8c2d5e395ea3b76fc591e7ab0d09800c23b33/app/controllers/metadata_controller.rb#L39

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 Likes

Thanks! That’s very helpful

1 Like

very helpful.

Though I don’t see where is the file in my Ubuntu server, in which I’ve to edit this line.