Pulse FlightRecorder Docs
  • SDK Documentation
    • Pulse Labs FlightRecorder Documentation
      • iOS
        • Overview
        • Install the SDK
        • Get your API Key
        • SDK Configuration
          • Swift + SwiftUI
          • Swift + UIKit with Scenes
          • Swift + UIKit without Scenes
          • Objective-C with Scenes
          • Objective-C without Scenes
        • Create Custom Triggers
          • Capture Recording
          • Show the Introduction Screen
        • Update the SDK
        • Troubleshooting
      • Android
        • Overview
        • Install the SDK
        • Get your API Key
        • SDK Configuration
          • Kotlin
          • Java
        • Create Custom Triggers
          • Capture Recording
          • Show the Introduction Screen
        • Update the SDK
        • Troubleshooting
      • ReactNative
        • Install SDK for ReactNative iOS
        • Install SDK for ReactNative Android
        • Update the SDK
      • Flutter
        • Overview
        • Install the SDK
        • Get your API Key
        • SDK Configuration
        • Create Custom Triggers
          • Capture Recording
          • Show the Introduction Screen
      • In-app Surveys
        • Create Survey
        • Edit Survey
        • Launch Survey
        • Pause Survey
        • Survey Responses
        • Survey Styling
    • ⬅️FlightRecorder Home
Powered by GitBook
On this page
  1. SDK Documentation
  2. Pulse Labs FlightRecorder Documentation
  3. Android
  4. SDK Configuration

Java

If your application is written using Java, follow these steps to configure the SDK.

  1. Open the entry point activity file for your application. This may be called MainActivity.java if using a standard template.

  2. Add the import statement import ai.pulselabs.flightrecorder.FlightRecorderSdk at the top of the file: import ai.pulselabs.flightrecorder.FlightRecorderSdk;

  3. Locate the onCreate(Bundle savedInstanceState) method and place the new FlightRecorderSdk(this, getLifecycle(), this, "{YOUR_API_KEY}", true, "SURVEY_NAME", typography) line at the end of the function, replacing YOUR_API_KEY with your own API Key, and also a Typography object if you want so supply your own fonts:

    @Override
    protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.main_activity);
       ...
       var flightRecorder = new FlightRecorderSdk(
          this,
          getLifecycle(), 
          this, 
          "YOUR_API_KEY", 
          true, 
          false,
          typography
       );
    }
  4. If you have multiple activities in your application, repeat the above steps for each activity, importing the library and calling new FlightRecorderSdk(this, getLifecycle(), this, "YOUR_API_KEY", true, false, "SURVEY_NAME", typograhy); each time.

The SDK is now configured.

Last updated 2 months ago

The introduction screen will appear once when the app is first launched. Read the section 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 if you would like to add your own trigger such as an on screen button.

Create Custom Triggers: Show the Introduction Screen
Create Custom Triggers: Capture Video