Configuration
Launching with options
iOS/iPadOS: Make sure you launch your app with Bugsee on a real device. Underlying Bugsee iOS SDK does not work in simulator as it heavily depends on the hardware.
Bugsee behavior is very customizable, if default configuration is not satisfying your needs you can launch the SDK with additional parameters. Use instance of IOSLaunchOptions
or AndroidLaunchOptions
for corresponding platform to change Bugsee behavior.
!iOS
import Bugsee from 'react-native-bugsee';
// ...
export default class App extends Component<{}> {
constructor(props) {
super(props);
const bugseeOptions = new Bugsee.IOSLaunchOptions();
bugseeOptions.shakeToReport = true;
bugseeOptions.reportPrioritySelector = true;
bugseeOptions.defaultBugPriority = Bugsee.BugseeSeverityLevel.Critical;
Bugsee.launch("<your token>", bugseeOptions);
}
}
!Android
import Bugsee from 'react-native-bugsee';
// ...
export default class App extends Component<{}> {
constructor(props) {
super(props);
const bugseeOptions = new Bugsee.AndroidLaunchOptions();
bugseeOptions.shakeToTrigger = true;
bugseeOptions.notificationBarTrigger = false;
Bugsee.launch("<your token>", bugseeOptions);
}
}
Note that when you launch Bugsee, it starts working in background with the specified launch options. Later, if you change launch options and reload JS layer, they will be ignored as Bugsee is already running. So, to workaround this, you should either relaunch the whole app or call Bugsee.relaunch() with the new launch options.
Available Options
For iOS
Key | Default | Notes |
---|---|---|
captureDeviceAndNetworkNames | false | Capture device name, wifi SSID and mobile carrier name. |
captureLogs | true | Automatically capture all console logs |
crashReport | true | Catch and report application crashes (*) |
defaultBugPriority | VeryLow | Default priority for bugs |
defaultCrashPriority | Blocker | Default priority for crashes |
killDetection | false | Detect abnormal termination (experimental, read more) |
maxRecordingTime | 60 | Maximum recording duration |
monitorNetwork | true | Capture network traffic |
reportPrioritySelector | false | Allow user to modify priority when reporting manual |
screenshotToReport | true | Screenshot key to trigger report |
shakeToReport | false | Shake gesture to trigger report |
style | Default | Enumeration of Default, Dark and BasedOnStatusBar |
videoEnabled | true | Enable video recording |
frameRate | High | Specifies how often frames are captured |
screenshotEnabled | true | Attach screenshot to a report |
wifiOnlyUpload | false | Upload reports only when a device is connected to a WiFi network |
maxDataSize | 50 | Bugsee will avoid using more disk space than specified (in MB). If total Bugsee data size exceeds specified value, oldest recordings (even not sent) will be removed. Value should not be smaller than 10 |
* iOS allows only one crash detector to be active at a time, if you insist on using an alternative solution for handling crashes, you might want to use this option and disable Bugsee from taking over.
For Android
Key | Default | Notes |
---|---|---|
captureDeviceAndNetworkNames | false | Capture device name, wifi SSID and mobile carrier name. |
captureLogs | true | Automatically capture all console logs |
crashReport | true | Catch and report application crashes |
defaultBugPriority | VeryLow | Default priority for bugs |
defaultCrashPriority | Blocker | Default priority for crashes |
frameRate | High | Specifies how often frames are captured |
handleAnr | false | Detect ANR (Application Not Responding) and transform it to a meaningful exception |
logLevel | Verbose | Minimal log level of Logcat messages, which will be attached to report |
maxDataSize | 50 | Maximum disk space consumed by Bugsee |
maxRecordingTime | 60 | Maximum recording duration |
monitorNetwork | true | Capture network traffic |
notificationBarTrigger | true | Trigger report from notification bar |
reportPrioritySelector | false | Allow user to modify priority when reporting manual |
screenshotEnabled | true | Attach screenshot to a report |
serviceMode | false | Used, when Bugsee is launched from service. No video and no visual controls available. Recording continues even in background. |
shakeToTrigger | false | Shake gesture to trigger report |
videoEnabled | true | Enable video recording |
videoMode | VideoMode.V3 | Specifies video recording mode. Available options are: VideoMode.V1, VideoMode.V2, VideoMode.V3 |
wifiOnlyUpload | false | Upload reports only when a device is connected to a WiFi network |
** If extendedVideoMode is set to true, MediaProjection API is used, while recording video. In this case all types of views are recorded, but user is asked to allow video recording. If false (experimental), view drawing cache is used to capture the screen. In this case user is not asked to allow video recording, but frame rate is lower and some special views like status bar, soft keyboard and views, which contain Surface (MapView, VideoView, GlSurfaceView, etc.) are not recorded. Option has no effect, if VideoEnabled option is set to false.
Stop, Relaunch
It is also possible to relaunch Bugsee with other options later
!iOS
// Relaunch with other options.
const options = new Bugsee.IOSLaunchOptions();
// Set other launch options
//...
Bugsee.relaunch(options);
!Android
// Relaunch with other options.
const options = new Bugsee.AndroidLaunchOptions();
// Set other launch options
//...
Bugsee.relaunch(options);
or stop the events and video recording.
// Stop recording completely
Bugsee.stop()