Klarna Standalone WebView is a customized view you can add to your Android or iOS app to display Klarna-specific content. Behind the scenes it does quite a few things to make it easier to render and work with Klarna-related content.
The functionality of it is equivalent to Hybrid integration but it's a lot simpler integration and work just like the platforms WebView solutions with enhancements for Klarna products.
You can integrate the Klarna Standalone WebView by following these steps:
KlarnaStandaloneWebView
The KlarnaStandaloneWebView
is a part of the Klarna's Mobile SDK that means to use it you need to add the dependency to Klarna's Mobile SDK to your app. For Android apps please refer to Android - Get Started guide and for iOS apps please take a look at iOS - Get Started guide.
After adding the Klarna's Mobile SDK to your app as a dependency, the next step is to create an instance of KlarnaStandaloneWebView
. For Android apps you can do it in two ways:
KlarnaStandaloneWebView
to your XML layout fileKlarnaStandaloneWebView
programatically and adding it to the view hierarchy.For iOS apps you need create the KlarnaStandaloneWebView
programatically and add it to the view hierarchy.
To receive events from the KlarnaStandaloneWebView
you need to create a class that implements/conforms to KlarnaEventHandler
and register it with the KlarnaStandaloneWebView
. With this event handler in place you will get notified of all the possible events and errors and react to them accordingly.
For further technical details and a step-by-step guide on how to integrate the KlarnaStandaloneWebView
into your app please refer to our iOS and Android guides.