A Flutter plugin that enables instant bug reports sharing with screenshots, screen recordings, attributes, and logs.
Designed for developers and QA engineers to enhance debugging and testing processes.
- 📸 Screenshots capturing
- 🎥 Screen recording
- 📱 Device & System information collection
- 📝 Custom attributes support
- 📊 Event logging
- 📁 Share all data as an archive or individual files
Snaply.Demo.Video.mp4
- Add to your
pubspec.yaml
:
dependencies:
snaply: ^0.0.1-alpha.6
- Wrap your App with SnaplyApp:
void main() {
const myApp = MyApp();
// Enable Snaply based on your build configuration
const isSnaplyEnabled = true;
if (isSnaplyEnabled) {
runApp(
const SnaplyApp(
isVisible: true,
child: exampleApp,
),
);
} else {
runApp(myApp);
}
}
To show or hide report button in runtime, use:
SnaplyReporter.instance.setVisibility(isVisible: false);
While Snaply automatically collects device & system attributes, you can add custom attributes:
SnaplyReporter.instance.setAttributes(
attrKey: 'app_info',
attrMap: {
'version': '0.0.1',
},
);
Snaply includes basic internal logs by default. To capture additional logs, add this to your app's logger:
SnaplyReporter.instance.log(message: 'Onboarding finished');
You can register onReportReview callback to execute custom logic right before review report. E.G. you can set most up to date attributes or custom files:
SnaplyReporter.instance.registerCallbacks(
onReportReview: () async {
SnaplyReporter.instance.setAttributes(
attrKey: 'app_info',
attrMap: {
'version': '0.0.1',
},
);
},
);
Frame Sequence Mode (Default):
This mode creates an MP4 video from captured frames. No additional permissions are required, but there are some limitations:
- Only captures Flutter App UI (system UI elements & native views are not included)
- May show minor UI glitches
- Provides acceptable but not optimal quality
Media Projection Mode:
Enable this mode by setting:
--dart-define=SNAPLY_CONFIG=useAndroidMediaProjection
This mode uses Android MediaProjection API. Snaply will add required permissions to AndroidManifest.xml
automatically. With this mode you'll have:
- Complete screen capture including system UI and native views
- Higher video quality
Permissions to be added by Snaply if you set useAndroidMediaProjection
flag:
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
Best Practice: Use media projection mode only for development/testing builds, not for Google Play releases, unless these permissions are already part of your app.
useAndroidMediaProjection
flag to GooglePlay - it might not pass App review and Google will ask to explain why you need screen recording permissions.
Uses ReplayKit to capture the Flutter App UI only. Like Android, system UI & native views are not included.
Note: The useAndroidMediaProjection
flag has no effect on iOS
Currently limited to Flutter App UI capture only (system UI elements & native views are not included)
Uses UIKit for screenshots, capturing only Flutter App UI (system UI elements & native views are not included)
- Flutter: >=3.0.0
- iOS: 11.0 or newer
- Android: API Level 23 or newer
Apache License 2.0 - see LICENSE for details