What logic can be triggered
Finally, these parameters will only be
interpreted if the navigation mode is set to Stay or Internal. The following list of parameters can trigger specific business logic flows:
- renewSession [boolean]: Force to renew the session information, reloading any currently open windows with new credentials after the session is renegotiated.
- refreshOnClose [boolean]: Refreshes the previously loaded URL. If a user navigates from one URL to another URL and the navigation mode for the second URL is set to refreshOnClose, then when the user closes the webview with URL B, the webview with URL A will be reloaded.
- dismissOnBack [boolean]: Dismiss the webview when back button is pressed. This can be useful in web flows where it is desired to return to the starting point instead going back.
- cleanCookiesBeforeLoad [boolean]: All cookies will be cleaned before the URL is loaded.
This is an example of certain parameters. There are many more parameters that affect the specific logic of our project or that are related to Telefonica’s internal APIs or services. Detailing them individually would not be relevant or educational in this article.
In summary, our framework allows us to
intercept URLs before they are loaded in the webview,
enabling us to control how the URL interacts with the native app and
customize the behavior of their application. The framework can use
URL query parameters or a
configuration file to achieve this.
Also offers options for
deciding where the URL will be loaded, such as in the current webview or in a new webview. Additionally,
allows user experience modifications or triggering specific business logic flows.
That wraps it up. We hope you enjoyed this second piece. If you found this article helpful, please
give it a clap and share it with your friends!
This article is part of a series. If you haven’t read the first of them yet, it’s a
good starting point to understand a little more about our journey and motivations.
[Part 1 — Tips and best practices]
In the final post, we will cover how we easily debug our integrations.
[Part 3 — Debugging]