Syntax
Java
NewRelic.pauseReplay()Kotlin
NewRelic.pauseReplay()Requirements
Android agent v7.7.0 or higher.
Description
newrelic.pauseReplay()can be called to manually force a replay to pause recording.If a replay is not already in progress, this API method will have no effect.
If the mobile session is still valid, you can resume a paused replay by calling the
newrelic.recordReplay()API method.Use Cases
You want to manually trigger a replay to stop recording on certain site pages or under certain conditions, such as a healthcare page, credit card info page, etc.
Example
Here's an example of forcing a replay to pause recording.
Java
public class MainActivity extends Activity { ... @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.pause_replay: NewRelic.pauseReplay(); ... return true; default: return super.onOptionsItemSelected(item); } } ...}Kotlin
class MainActivity : AppCompatActivity() {
... var client: OkHttpClient = OkHttpClient();
binding.fab.setOnClickListener { view ->
NewRelic.pauseReplay() } } ...Syntax
Objective-c
Swift
Syntax
NewRelic.pauseReplay()Requirements
React native v1.7.0 or higher.
Description
newrelic.pauseReplay()can be called to manually force a replay to pause recording.If a replay is not already in progress, this API method will have no effect.
If the mobile session is still valid, you can resume a paused replay by calling the
newrelic.recordReplay()API method.Use Cases
You want to manually trigger a replay to stop recording on certain site pages or under certain conditions, such as a healthcare page, credit card info page, etc.
Example
Here's an example of forcing a replay to pause recording.
NewRelic.pauseReplay()