Kotlin
If your application is written using Kotlin, follow these steps to configure the SDK.
Open the entry point activity file for your application. This may be called
MainActivity.kt
if using a standard template.Add the import statement
import ai.pulselabs.flightrecorder.FlightRecorderSdk
at the top of the file:import ai.pulselabs.flightrecorder.FlightRecorderSdk
Locate the
override fun onCreate(savedInstanceState: Bundle?) {
method and place theFlightRecorderSdk(this, lifecycle, this, apiKey = "{YOUR_API_KEY}", surveyName = "{YOUR_SURVEY_NAME}, typography")
line at the end of the function, replacing YOUR_API_KEY with your own API Key, SURVEY_NAME with the unique survey name if you have designed your own form to show, and also a Typography object if you want so supply your own fonts:If you have multiple activities in your application, repeat the above steps for each activity, importing the library and calling
FlightRecorderSdk(this, lifecycle, this, apiKey = "API_KEY", surveyName = "SURVEY_NAME", typography)
each time.
The SDK is now configured.
The introduction screen will appear once when the app is first launched. Read the section Create Custom Triggers: Show the Introduction Screen if you would prefer to show the introduction screen at a different point, or allow your users to view the screen again.
The video is captured when the user shakes or takes a screenshot. Read the section Create Custom Triggers: Capture Video if you would like to add your own trigger such as an on screen button.
Last updated