Integrate Drimify using Webview
How to Integrate Drimify Experiences into Your Mobile App Using WebView
You can easily embed your Drimify experiences (such as games, quizzes, and interactive journeys) into your mobile app using a WebView. This allows users to access your branded, responsive experiences without leaving your app.
This guide covers:
Prerequisites
How to integrate WebViews on Android & iOS
Best practices
Optional advanced integrations
Support for deep links in CTAs
Prerequisites
Before embedding a Drimify experience, make sure you have:
A published Drimify experience link, e.g., https://apps.drimify.com/XBs15jKF/
A method for collecting or passing a user identifier (e.g., email, phone, or session ID)
A mobile app (iOS/Android) capable of rendering a WebView
Android Integration (WebView)
Here's how to load a Drimify experience in an Android WebView:
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.appcompat.app.AppCompatActivity;
public class DrimifyActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
WebView webView = new WebView(this);
setContentView(webView);
webView.setWebViewClient(new WebViewClient());
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setDomStorageEnabled(true);
// Load the experience URL (with optional session_id)
String sessionId = "user_abc_123"; // Replace with actual ID
String url = "https://apps.drimify.com/XBs15jKF/?session_id=" + sessionId;
webView.loadUrl(url);
}
}
iOS Integration (WKWebView)
To embed on iOS, use WKWebView with JavaScript enabled:
import UIKit
import WebKit
class DrimifyViewController: UIViewController {
var webView: WKWebView!
override func viewDidLoad() {
super.viewDidLoad()
let config = WKWebViewConfiguration()
config.preferences.javaScriptEnabled = true
webView = WKWebView(frame: self.view.bounds, configuration: config)
self.view.addSubview(webView)
let sessionId = "user_abc_123" // Replace with actual ID
let url = URL(string: "https://apps.drimify.com/XBs15jKF/?session_id=\(sessionId)")!
webView.load(URLRequest(url: url))
}
}
User Identification & Session Management
To track users and resume sessions, use:
Start screen data entry: Collect identifiers like email or phone.
Intermediate data collection forms: Enable richer forms before access.
session_uid parameter: Append to the URL (e.g., ?session_uid=abc123).
Full session management guide: Drimify Help: Session Unique ID
Support for Deep Links in CTAs
Drimify experiences can include deep links in CTAs (Call-to-Action buttons) within the game. This means that users can be directed to specific pages or actions within your mobile app after completing certain steps in the Drimify experience. For example, a "Finish" button within a game can be set up to link directly to a product page or a special offer within your app. The deep link supports seamless navigation between the Drimify experience and your app’s content. To implement this, ensure that your app has the relevant deep link handlers configured to respond to specific URLs or actions.
Best Practices
Ensure JavaScript is enabled in the WebView.
Enable DOM storage for a smoother experience.
Do not disable JavaScript, or block scripts like Angular: Some WebView settings may disable JavaScript or block essential libraries (like Angular), which can prevent the Drimify experience from working as expected.
Drimify experiences are fully mobile-first and responsive.
Advanced Event Integration (Optional)
If you need to:
Track experience completion
Retrieve scores
Customise behaviour
Use Drimify’s HTML integration API and listen for events via JavaScript inside the WebView.
Full guide: Drimify Advanced HTML API Integration
Note: This requires injecting JavaScript and handling messages between the WebView and the app.
Need Help?
If you have issues with session IDs, WebView rendering, deep linking, or other integration questions, please contact us.
Updated on: 10/06/2025
Thank you!