Share a webpage link in mobile app?

AI-generated summary

The discussion revolves around the inability to share external webpage links directly within the Discourse mobile app on Android. Ivan_Rapekas explains that while the app has a share button for Discourse posts, it lacks a share option when viewing external links, requiring users to open the page in a browser first. Falco clarifies that the native share button works for Discourse content but not for external pages, and suggests a code fix by adding builder.addDefaultShareMenuItem(); in the app’s Android code. The conversation seeks input from a developer, j.jaffeux, on implementing this feature.

Before announcing mobile application for our customers I’ve performed some tests. I found that sharing a webpage URL :mega: using app is a tricky action. Native browser has a share button, the application does not. Every time first I have to open the page in browser then share.

This button is must have option: sharethis-logo_318-50326-32

Is this on Android or iOS?

The share button (just right of the like) uses the native share on Android:

1 Mi Piace

This is on Android. I still cannot see share button… Only ‘Open in browser’ option there. Sorry for Russian screenshot.

Sorry, I was not clear. I understand the purpose of the button near like. I have a slightly another case:

  1. Open this link. The post has an external link. Users wait for this link, it redirects to documentation source.
  2. I follow the link in the post, and it is opened in the same mobile application. Then I cannot share the current page URL.
    That’s my case.
2 Mi Piace

So your use case is for non-discourse webpages, that doesn’t have a share UI.

Should be enough to add:

builder.addDefaultShareMenuItem();

between line 72 and 73 here: DiscourseMobile/android/app/src/main/java/com/discourse/ChromeCustomTabModule.java at 24e4eda3e94f257eea803a9c5df1ba939596eba5 · discourse/DiscourseMobile · GitHub

What do you think @j.jaffeux ?