Skip to content
Hudson_BuildService edited this page Jan 9, 2026 · 6 revisions

Digital Feedback and Mobile SDK

The following documentation is provided to assist with implementing the Mobile SDK within your app. It is intended for a mobile app developer audience.

Digital Feedback

  • Web console to define when surveys should be triggered
  • Setup as a "Program" containing one or more "scenarios"
  • A scenario contains triggering logic

Learn more about Digital Feedback

Mobile SDK

  • Mobile app library (iOS and Android)
  • Can display web/online surveys or native in-app surveys
  • Relies on programs created in Digital Feedback

Learn more about the Mobile SDK

How the Mobile SDK works...

Once the SDK is implemented in the mobile app:

  • When the app is opened, the SDK downloads all Digital Feedback scenarios enabled for the program
  • All code not within an event will execute immediately
    • e.g. sdk().downloadSurvey() will download the survey metadata
  • The SDK begins listening for app events

The SDK automatically downloads the latest published Digital Feedback program so no app code changes are required to change triggering rules or target survey.

Quick Example: Show a survey when user taps the Feedback button in your app

In your mobile app code, send an event to the SDK

fun onButtonClick() {
    TriggerSDK.notifyEvent(serverId, programKey, "onFeedbackButton")
}

The Mobile SDK has downloaded the Digital Feedback program that contains an event configured to listen for this event name

var ctx = sdk();
ctx.events.on("onFeedbackButton", function(data) {
    ctx.startWebSurvey("p123456789", {});
});

In this simple example, the SDK scenario triggers to startWebSurvey() which will trigger the callback defined in your application

class MyMainFragment : Fragment(), ProgramCallback {
    override fun onWebSurveyStart(fragment: SurveyWebViewFragment) {
        val activity = this.requireActivity()
        fragment.show(activity.supportFragmentManager, "SurveyWebViewFragment")
    }
    // + other required callback events
}

This displays the survey using a webview.

App Implementation

The SDK must first be initialized, see Initializing the SDK

React-Native

For React Native implementation, please check Run React Native App

Android

Define which server you are using and Digital Feedback program to use:

val serverId = ConfirmitServer.UK.serverId
val programKey = "g7dB6P"
// your program key will be different from above, only shown for demo purposes

Download the program:

val result = TriggerSDK.downloadAsync(serverId, programKey).await()

Using a feedback button within your app, send the app event to the SDK:

fun onButtonClick() {
    TriggerSDK.notifyEvent(serverId, programKey, "onFeedbackButton")
}

Implement the callback to display a survey using an embedded webview

class MyMainFragment : Fragment(), ProgramCallback {

    override fun onWebSurveyStart(fragment: SurveyWebViewFragment) {
        val activity = this.requireActivity()
        fragment.show(activity.supportFragmentManager, "SurveyWebViewFragment")
    }

    // + other required callback events
}

iOS

Define which server you are using and Digital Feedback program to use:

let serverId = ConfirmitServer.uk.serverId
let programKey = "g7dB6P"
// your program key will be different from above, only shown for demo purposes

Download the program:

TriggerSDK.download(serverId: serverId, programKey: programKey)  { _, _ in }

Using a feedback button within your app, send the app event to the SDK:

@IBAction func onButtonClicked(_ sender: Any) {
  TriggerSDK.notifyEvent(serverId: serverId, programKey: programKey, event: "onFeedbackButton", data: [:])
}

Implement the callback to display a survey using an embedded webview

class MyMainController: UIViewController, ProgramCallback {
  func onWebSurveyStart(surveyWebView: SurveyWebViewController) {
    surveyWebView.delegate = self
    present(surveyWebView, animated: true)
  }

    // + other required callback events
}

Additional Implementation Information

Extended samples showing all available events.

Want to show in-app native rendered surveys?
See Native UI Survey Integration

Clone this wiki locally