Installation

Cordova plugin is currently supported for iOS and Android platforms. If you use cordova to compile your app for both platforms, you should create separate applications within Bugsee system and obtain separate tokens for your iOS and Android apps. Using cordova-plugin-device you will be able to understand which platform you are running on and use the right token.

Plugin Installation

In the root of your Cordova project run the following command:

cordova plugin add com.bugsee.cordova-plugin --save

# Optional: Install cordova-plugin device if you use both iOS and Android platform
cordova plugin add cordova-plugin-device --save

Initialization

Initialize the Bugsee plugin when your application starts, preferably when the deviceready event fires, e.x:

onDeviceReady: function() {
  app.receivedEvent('deviceready');

  var appToken = (device.platform == "Android")?"<ANDROID_APP_TOKEN>":"<IOS_APP_TOKEN>";
  Bugsee.launch(appToken);
},

Configuration

Bugsee behavior is very customizable, if default configuration is not satisfying your needs you can launch the SDK with additional parameters passed as a dictionary.

  ... other initialization code
  var appToken = (device.platform == "Android")?"<ANDROID_APP_TOKEN>":"<IOS_APP_TOKEN>";
  var options = {};

  if (device.platform == "Android") {
    options[Bugsee.AndroidOptions.ShakeToReport] = true;
  } else {
    options[Bugsee.IOSOptions.ShakeToReport] = true;
    options[Bugsee.IOSOptions.ScreenshotToReport] = true;
  }
  Bugsee.launch(appToken, options);

Available iOS Options

Key Default value Notes
Bugsee.IOSOptions.ShakeToReport false Shake gesture to trigger report
Bugsee.IOSOptions.ScreenshotToReport true Screenshot key to trigger report
Bugsee.IOSOptions.CrashReport true Catch and report application crashes (*)
Bugsee.IOSOptions.MaxRecordingTime 60 Maximum recording duration
Bugsee.IOSOptions.KillDetection false Detect abnormal termination (experimental, read more)
Bugsee.IOSOptions.VideoEnabled true Enable video recording
Bugsee.IOSOptions.ScreenshotEnabled true Attach screenshot to a report. Note, that if VideoEnabled option is false, default value of this option is false too.
Bugsee.IOSOptions.CaptureLogs true Automatically capture all console logs
Bugsee.IOSOptions.MonitorNetwork true Capture network traffic
Bugsee.IOSOptions.ReportPrioritySelector false Allow user to modify priority when reporting manual
Bugsee.IOSOptions.DefaultCrashPriority Bugsee.Severity.Blocker Default priority for crashes
Bugsee.IOSOptions.DefaultBugPriority Bugsee.Severity.Low Default priority for bugs
Bugsee.IOSOptions.WifiOnlyUpload false pload reports only when a device is connected to a wifi network.
Bugsee.IOSOptions.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.
Bugsee.IOSOptions.VideoScale 1 Additional down scaling applied to recorded video, (e.x 0.5 would reduce both width and height by half)
Bugsee.IOSOptions.FrameRate Bugsee.FrameRate.High Specifies how often frames are attempted to be captured
Bugsee.IOSOptions.CaptureDeviceAndNetworkNames true Capture device name, wifi SSID and mobile carrier name.

* IOS platform 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.

Available Android Options

Key Default value Notes
Bugsee.AndroidOptions.MaxRecordingTime 60 Maximum recording duration (in seconds)
Bugsee.AndroidOptions.ShakeToTrigger true Shake gesture to trigger report
Bugsee.AndroidOptions.NotificationBarTrigger true Trigger report from notification bar
Bugsee.AndroidOptions.CrashReport true Catch and report application crashes
Bugsee.AndroidOptions.UseSdCard true By default Bugsee saves its data to SD card (if ServiceMode option is not enabled). When set to false, internal app storage will be used. If your app does not require external storage, you might want to disable it in production builds. (*)
Bugsee.AndroidOptions.VideoEnabled true Record video. If false, created issues will contain console logs, events and traces, but will not contain video.
Bugsee.AndroidOptions.ScreenshotEnabled true Attach screenshot to a report. Note, that if VideoEnabled option is false, default value of this option is false too.
Bugsee.AndroidOptions.ExtendedVideoMode false If 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, 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.
Bugsee.AndroidOptions.MonitorNetwork true Monitor network events
Bugsee.AndroidOptions.ServiceMode false Should be used, when Bugsee is launched from service. If true, video is not recorded and recording is not stopped, when app goes to background; ShakeToTrigger and NotificationBarTrigger options are set to false automatically.
Bugsee.AndroidOptions.CaptureLogs true Automatically capture Logcat logs.
Bugsee.AndroidOptions.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.
Bugsee.AndroidOptions.FrameRate FrameRate.High Specifies how often frames are captured. Option has value of com.bugsee.library.data.FrameRate type.
Bugsee.AndroidOptions.WifiOnlyUpload false Upload reports only when a device is connected to a wifi network.
Bugsee.AndroidOptions.ReportPrioritySelector false Allow user to modify priority manually when reporting - true to allow, false to disallow.
Bugsee.AndroidOptions.DefaultCrashPriority IssueSeverity.Blocker Default priority for crashes. Option has value of com.bugsee.library.data.IssueSeverity type.
Bugsee.AndroidOptions.DefaultBugPriority IssueSeverity.High Default priority for bugs. Option has value of com.bugsee.library.data.IssueSeverity type.
Bugsee.AndroidOptions.VideoScale 1 Additional down scaling applied to recorded video, (e.x 0.5 would reduce both width and height by half)
Bugsee.AndroidOptions.CaptureDeviceAndNetworkNames true Capture device name, wifi SSID and mobile carrier name.