Replay - Custom Image Capture

Avoiding jerky or unresponsive behaviour

There are three ways to work around performance issues when Replay is enabled:

1. Lower the capture rate for a particular activity.

During touches, screen captures are disabled, but it is possible to set the out-of-touch capture rate of an activity by implementing the ‘CaptureRateOverride’ interface and returning a value for getCaptureRate(). This is particularly useful if the client is using complex animations which appear jerky.

The value returned should specify the time in milliseconds between each capture (The default is 250ms):

public class MyActivity extends Activity implements CaptureRateOverride {  
    @Override
    public int getCaptureRate() {
        //set the capture rate to 1 second
        return 1000;
    }
}

2. Set the capture rate dynamically.

The capture rate may be modified programmatically via the API as follows:

//set the capture rate to 5000ms
ForeSee.setCaptureRate(5000);

The capture rate is reset to the default value (250ms) like this:

ForeSee.resetCaptureRate();

3. Disable capture for a particular activity.

The client may also want to disable recording entirely for a particular activity. This can be done by adding the ‘@RecordDisabled’ annotation just before the Activity’s class definition:

@RecordDisabled
public class YourActivity {
		// Your class definition
}

Other articles in this section:

  1. Replay Overview
  2. Sessions
  3. Paging
  4. Masking
  5. Performance
  6. Limitations
  7. Custom Touch Capture
  8. Custom Image Capture (current article)
  9. Performance Techniques
  10. Remote Disable