-
Notifications
You must be signed in to change notification settings - Fork 0
SdkDialog
Hudson_BuildService edited this page Jan 9, 2026
·
1 revision
SdkDialog is the layout component in the SDK's UI library. It automatically handles:
- Survey lifecycle management
- Page navigation (forward/backward)
- Question rendering
- Error states
- Completion states
- Keyboard management
- Dialog presentation and dismissal
This is the recommended component for most use cases as it requires minimal setup and handles all survey interactions out of the box.
import com.confirmit.mobilesdk.components.dialogs.SdkDialog
import com.confirmit.mobilesdk.components.dialogs.SdkDialogOption
import com.confirmit.mobilesdk.ui.SurveyFrameConfig
import androidx.fragment.app.Fragment
import android.graphics.Color
class MySurveyFragment : Fragment(), ProgramCallback {
override fun onSurveyStart(config: SurveyFrameConfig) {
// Basic usage with default color
val options = SdkDialogOption()
SdkDialog(config, options).openDialog(parentFragment)
// With custom theme color
val customOptions = SdkDialogOption(themeColor = Color.RED)
SdkDialog(config, customOptions).openDialog(parentFragment)
}
}import ConfirmitMobileSDK
import UIKit
class ViewController: UIViewController, ProgramCallback {
func onSurveyStart(config: SurveyFrameConfig) {
if let controller = getTriggerController() {
// Basic usage with default color
let options = SdkDialogOption()
_ = SdkDialog(config: config, options: options).openDialog(controller: controller)
// With custom theme color
let customOptions = SdkDialogOption(themeColor: .systemRed)
_ = SdkDialog(config: config, options: customOptions).openDialog(controller: controller)
}
}
}| Property | Type (Android / iOS) | Description |
|---|---|---|
config |
SurveyFrameConfig |
Survey configuration containing program key, survey ID, and scenario |
options |
SdkDialogOption |
Dialog options including theme color configuration |
| Property | Type (Android / iOS) | Description |
|---|---|---|
themeColor |
@ColorInt Int / UIColor
|
Theme color for interactive elements |
Opens the dialog and presents the survey.
fun openDialog(parentFragment: Fragment): SdkDialogParameters:
-
parentFragment: The parent fragment that will host the dialog
Returns: The SdkDialog instance
func openDialog(controller: UIViewController) -> SdkDialogParameters:
-
controller: The parent view controller that will present the dialog
Returns: The SdkDialog instance
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