Skip to main content

Mobile integration — end to end

Use this guide to integrate any OpenCDP mobile SDK and verify push or in-app messaging on a real device. Every step uses placeholder credentials — replace them with your workspace values.

Prerequisites​

  • An OpenCDP workspace with a push channel configured (for push testing)
  • Your CDP API key from workspace Settings
  • Your workspace data-gateway URL (copy from Settings in the OpenCDP dashboard — do not use a shared example URL)
  • A physical device or emulator with push capability (FCM for Android, APNs for iOS)

Master checklist​

StepActionVerify
1Enable push in workspace SettingsPush channel shows connected
2Clone the SDK example app for your platformApp builds and launches
3Enter API key, gateway URL, and test person IDConfig screen accepts values
4Call initialize then identifyDebug log or status UI shows your person ID
5(Push) Register FCM/APNs token via registerDeviceTokenregisterDevice request succeeds (optional network trace)
6Send a test push from the console or server SDKNotification appears on device
7Tap the notificationDelivery/open metrics in SDK debug logs
Person ID for testing

The User ID in the console “Test push notification” dialog is the same value you passed to identify() — not the device ID or FCM token. See Identity and devices.


Choose your SDK​

Each platform has a dedicated quick-start and example-app guide:

SDKQuick startExample app
FlutterInitialize → identify → trackFlutter example app
AndroidInitialize → identify → trackAndroid example app
iOSInitialize → identify → trackiOS example app
React NativeInitialize → identify → trackReact Native example app

Path A — Push test (~15 minutes)​

  1. Complete steps 1–5 of the master checklist for your SDK.
  2. In the OpenCDP dashboard, open Test push notification.
  3. Select your platform (Android or iOS).
  4. Choose Test by User ID and enter the same person ID from step 4.
  5. Send the test. Confirm the notification arrives.
  6. Tap it and check SDK debug logs for open/delivery metrics.

See also: Push notifications (console) · Rich push images


Path B — In-app messaging test​

  1. Run any SDK example app with enableInAppMessages: true and identify a test user.
  2. Note the person ID shown in the example UI.
  3. In the dashboard, create or trigger an in-app campaign targeting that person or segment. Set the desired render type (modal, banner, inline, or inbox_card).
  4. Switch logical screens in the example (home, cart, profile, inbox) to match page rules.
  5. Tap Sync / Sync in-app (or wait for automatic delivery).
  6. Confirm the message renders with the correct UI pattern and impression/click/dismiss metrics fire.

See: In-app messaging (render types + per-SDK branching)


Path C — Server-initiated push​

  1. Identify a user on device (steps 1–4).
  2. Register the device token (step 5).
  3. From your backend, call sendPush with the same person ID:
await client.sendPush({
identifiers: { id: 'user_123' },
transactional_message_id: 'YOUR_TEMPLATE_ID',
title: 'Hello',
body: 'Test message',
});

See: Node.js sendPush · Python send_push


Path D — Rich push (image URL)​

  1. Send a push with an Image URL in the editor or image_url in the payload.
  2. On Android 12+: collapsed notification shows thumbnail on the right; expanded shows full image at bottom.
  3. On Android 7–11: collapsed preview appears on the left (OS limitation).
  4. On iOS: add a Notification Service Extension and set mutable-content: 1.

See: Rich push image behavior