-
Notifications
You must be signed in to change notification settings - Fork 0
Home
The following documentation is provided to assist with implementing the Mobile SDK within your app. It is intended for a mobile app developer audience.
- 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 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
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
- e.g.
- 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.
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.
The SDK must first be initialized, see Initializing the SDK
For React Native implementation, please check Run React Native App
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 purposesDownload 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
}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 purposesDownload 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
}Extended samples showing all available events.
Want to show in-app native rendered surveys?
See Native UI Survey Integration
Copyright © 2026 Forsta. All rights reserved.
- Initializing the SDK
- Download a Program
- Sending App Events
- Sending Journey Log
- Survey Triggering
- Displaying a Survey
- Forsta Plus Server
- Program Lifecycle Monitoring
- Starting and Updating a Program
- Advanced Trigger Control