Skip to content

Download a Program

ForstaMobileApp edited this page Sep 9, 2022 · 1 revision

For the SDK to run a program, the program must first be downloaded, including the enabled scenario scripts.

It is recommended to download the program when app goes to foreground. This will ensure that the SDK always has the latest program information and completion counters during active use.

Android

This operation requires network access.
Please enable android.permission.INTERNET on app's AndroidManifest.xml.

// - Your Forsta Plus server
val serverId = ConfirmitServer.UK.serverId

// - Your Digital Feedback program key
val programKey = "<Program Key>"

// - Proceed download - Kotlin Coroutine
// The SDK also provides synchronous call: TriggerSDK.download()
val result = TriggerSDK.downloadAsync(serverId, programKey).await()

if(result.result) {
    // Your Digital Feedback program is started!
} else {
    // Digital Feedback program download failed
    // Tip: a possible reason is that your program contains scripting errors
}

// NOTE: SDK also provides synchronous method
TriggerSDK.download(serverId, programKey)

iOS

// - Your Forsta Plus server
let serverId = ConfirmitServer.uk.serverId

// - Your Digital Feedback program key
let programKey = "<Program Key>"

// - Proceed download
TriggerSDK.download(serverId: serverId, programKey: programKey) { (result, error) in
    if result {
        // Your Digital Feedback program is started!
    } else {
        // Digital Feedback program download failed
        // Tip: a possible reason is that your program contains scripting errors
    }
}

Identifying your Forsta Plus Server

Forsta Plus has a number of servers, and it is important that you are accessing the correct site. To check which server you are using, login to Forsta Plus using a browser and check the URL that it is connecting to. E.g.

  • ...us.confirmit.com -> US
  • ...euro.confirmit.com -> Euro
  • ...confirmit.com.au -> Australia

Use the ConfirmitServer class to obtain the available Forsta Plus environments.

Note: At the present time, On-premise Forsta Plus installations are not supported.

Your Program Key

A Program Key is a String value that identifies your program in the Digital Feedback application. e.g. 3Xqe05

You should have been provided with a sample Digital Feedback program key to get started.

Clone this wiki locally