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, 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:

    @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,
          "SURVEY_NAME",
          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.

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