Show the Introduction Screen
The SDK displays the introduction screen during the very first app launch, considering this the trigger. This feature enables you to add extra triggers and also allows you to disable the default app launch trigger.
For instance, you may choose to present the introduction screen at the end of your onboarding screens or provide an option to show it again from a help menu.
Select a Trigger and Show the Introduction Screen
Decide from where you want to show the introduction screen. For example, at the end of your onboarding screens or when a button in a menu is pressed. We will call this the trigger. This very simple example shows a possible trigger - when
onButtonClick
is called inside a Jetpack Compose app.KotlinMake sure you are capturing a reference to the output of
FlightRecorderSdk
when you initialize the SDK:KotlinJavaChoose an approach to access the
flightRecorder
variable from the trigger in your code. You could choose create a class to holdflightRecorder
and access it statically.Call
showIntroductionScreen
at the moment you want to show the introduction screen inside the trigger.KotlinJavaIn our Kotlin Jetpack Compose example, we call the method from the onButtonClick function:
Kotlin
Prevent the Introduction Screen from Showing on First Launch
If you do not wish to show the introduction screen when you first launch the app, follow the instructions below for your apps language.
Kotlin
Set automaticallyShowIntroduction = false
when creating the FlightRecorderSdk
object.
Java
Update the FlightRecorderSdk
object declaration to the below, setting the fifth parameter to false
:
Last updated