Please login to access all of the features of the Community Site.

OpenExternalBrowser

M v1.0

Similar to the OpenBrowser command, this one opens a URL in a browser window. The difference between the two is that this command uses the devices native web browser and opens the URL in that application. This means your user leaves your mobile app and gets sent over to Safari or Chrome.

If you are opening a URL to your own Rock server and wish to ensure the user is logged in, you can pass an empty rckipid parameter and an impersonation token will be automatically generated.

Note that tokens generated with an empty parameter will use the settings defined in Rock's global attributes, which may be more open than your specific implementation needs. Consider your impersonation strategy and understand the risk that individuals can share their impersonated URL without realizing it. Alternatively, you can use the Lava filter PersonImpersonationToken.

Because this command uses the device's native browser, individuals who sign in and check "Stay signed in" will remain signed in. However, Rock will not create or accept a personal token for anyone whose Account Protection Profile is listed under "Disable Usage of Personal Tokens for the Following Protection Profiles" in Security Settings (by default, the Extreme profile). For those individuals, appending rckipid to the query string will override their existing browser sign-in, so they will not stay signed in. If this affects your staff or other high-protection individuals, consider leaving rckipid off of the URL.

The CommandParameter can either be a string, which contains the URL and query string parameters, or it can be a reference to an OpenExternalBrowserParameters object which contains the following properties.

Properties

PropertyTypeDescription
UrlstringThe URL to be opened. May contain query string parameters.
ParametersList<Parameter>  Any additional query string parameters to be included with the URL.
<Button Text="Open External"
    Command="{Binding OpenExternalBrowser}"
    CommandParameter="https://www.rockrms.com/" />
<Button Text="Open External"
    Command="{Binding OpenExternalBrowser}">
    <Button.CommandParameter>
        <Rock:OpenExternalBrowserParameters Url="https://www.rockrms.com/">
            <Rock:Parameter Name="q"
                Value="rockrms" />
        </Rock:OpenExternalBrowserParameters>
    </Button.CommandParameter>
</Button>