Skip to content
AdJuice

Mobile Integration

Use a WebView to load the same one‑line SDK URL. Interstitial and rewarded placements are handled by the iframe.

React Native (react-native-webview)
import { WebView } from 'react-native-webview';

export default function AdJuiceSlot() {
  const appId = 'YOUR_APP_ID';
  const placement = 'banner'; // 'interstitial' | 'rewarded'
  const src = 'https://adjuice.app/api/sdk?app_id=' + appId + '&placement=' + placement;
  return (
    <WebView
      source={{ uri: src }}
      onMessage={(e) => {
        if (e.nativeEvent.data === 'adjuice-close') {
          // hide this WebView
        }
      }}
      originWhitelist={["*"]}
      style={{ height: placement === 'banner' ? 90 : 300 }}
    />
  );
}
Capacitor / Flutter / Others

Load the SDK URL in a WebView component and listen for postMessage messages with value adjuice-close to dismiss interstitials.