1. IOS – Monetize App ...
  2. User Manual
  3. Initialization Types
  4. WebView Initialization

WebView Initialization

How it works?

We configure your webview to create a channel between our web header script and the Native SDK, this enables better privacy compliance and targeting.

With this in place you can use loadUrlWithConsentDataOrWait to load the URL with consent data.

What is needed?

  1. Get started by creating an account with us. Contact us to initiate the process and provide all the necessary information listed below.
  2. Add the Initialization code.
  3. Follow This Guide
  4. Your web-app is now prepared for monetization with us.

Information we require about your app

Example in the Demo

You will use Android’s WebView View in your app, but instead of loading the url withWebView.loadUrl()you need to configure the webview with R89SDK.configureWebView() and then use R89SDK.loadUrlWithConsentDataOrWait().

Function R89SDK.configureWebView takes 3 parameters, which are:

  • webView – your webView
  • userAgent – userAgent string, which can be acquired with ->
    R89SDK.getUserAgent(webView = webview!!, siteName =”WebViewDemo”)
  • webViewClientR89WebViewClient object, child of WebViewClient, in which you can override callback functions like:
    • r89OnPageFinished – is called when page finished loading
    • r89OnPageStarted – is called when page started loading

Example:

R89SDK.configureWebView(webview!!, userAgent, object : R89WebViewClient()
{
// Here you can override WebViewClient methods in case you need them
})

If you want to add any Banner/Outstream or other formats outside of the WebView you can do so the same way it is done in Manual initialization.

if you wanted you could create your own custom JavaScriptInterface from the web part of the app to display the ads in the native part interacting and controlling them from the webpart.

 

Como podemos ajudar?