Install the SDK
To use this plugin, run this command:
Alternatively, add flight_recorder
as a dependency in your pubspec.yaml file.
Android Project Updates
Make the following updates to your android project:
Update MainActivity to extend FlutterFragmentActivity
In order for the screen recording to work, the MainActivity needs to extend FlutterFragmentActivity rather than FlutterActivity. Update the code as follows:
Open your Flutter app in your coding editor.
Open the file at
./android/app/src/main/kotlin/{your app path}/MainActivity.kt
.Replace the line
import io.flutter.embedding.android.FlutterActivity
withimport io.flutter.embedding.android.FlutterFragmentActivity
.MainActivity.ktReplace
class MainActivity: FlutterActivity() {
withclass MainActivity: FlutterFragmentActivity()
.MainActivity.kt
Update the minSdkVersion and compileSdkVersion
flight_recorder is compatible only from version 21 of Android SDK, the required compileSdkVersion is 34. Update these settings as follows:
Open the file at
./android/app/build.gradle
.Locate the
android
section, and inside there, thedefaultConfig
section.Replace the line
minSdkVersion flutter.minSdkVersion
withminSdkVersion 21
, as per the following code snippet:build.gradleInsert the line
compileSdkVersion 34
underneathminSdkVersion 21
as follows:build.gradle
iOS Project Updates
Open the Xcode workspace in your project by opening
ios/Runner.xcworkspace
.Select the project in the Project Navigator (A). Select your app's main target inside the TARGETS section (B), then click on the General tab (C) to open the general build settings for this target.
Verify that the version in Minimum Deployments is 15.0 or higher. If the version is lower than 15.0, update the minimum deployment to 15.0 or higher. If you wish to continue supporting users on devices running iOS lower than 15.0, contact us at flightrecorder@pulselabs.ai. NB: 14.x is now end of life, and users of these devices will no longer receive security updates from Apple.
Open
ios/Flutter/AppframeworkInfo.plist
and update theMinimumOSVersion
value to match the version you selected.
Last updated