Class MPSessionReplayInstance
-
- All Implemented Interfaces:
-
com.mixpanel.android.sessionreplay.tracking.TouchEventListener
public final class MPSessionReplayInstance implements TouchEventListener
-
-
Field Summary
Fields Modifier and Type Field Description private Stringtokenprivate MPSessionReplayConfigconfigprivate final SessionReplaySendersessionReplaySenderprivate final FlushServiceflushServiceprivate final MPTracker.CompanionmpTracker
-
Constructor Summary
Constructors Constructor Description MPSessionReplayInstance(Context appContext, String token, String distinctId, MPSessionReplayConfig config, SessionReplaySender sessionReplaySender, CoroutineScope lifecycleScope, EventService eventService, FlushService flushService, MPTracker.Companion mpTracker)
-
Method Summary
Modifier and Type Method Description final StringgetToken()final UnitsetToken(String token)final MPSessionReplayConfiggetConfig()final UnitsetConfig(MPSessionReplayConfig config)final SessionReplaySendergetSessionReplaySender()final FlushServicegetFlushService()final MPTracker.CompaniongetMpTracker()final Unitdeinitialize()De-initializes the Session Replay instance. final Unitflush(Function0<Unit> onComplete)Uploads all locally stored events to Mixpanel. final StringgetReplayId()final StringgetDistinctId()final BooleanisRecording()final Unitidentify(String distinctId)final UnitaddSensitiveView(View view)final UnitremoveSensitiveView(View view)final UnitaddSafeView(View view)final UnitremoveSafeView(View view)final UnitaddSensitiveClass(Class<?> aClass)final UnitremoveSensitiveClass(Class<?> aClass)final UnitautoStartRecording()Automatically starts recording session replays based on the configured percentage. final UnitstartRecording(Double sessionsPercent)Starts recording session replays. final UnitstopRecording()UnitonTouchStart()UnitonTouchEnd()-
-
Constructor Detail
-
MPSessionReplayInstance
MPSessionReplayInstance(Context appContext, String token, String distinctId, MPSessionReplayConfig config, SessionReplaySender sessionReplaySender, CoroutineScope lifecycleScope, EventService eventService, FlushService flushService, MPTracker.Companion mpTracker)
-
-
Method Detail
-
getConfig
final MPSessionReplayConfig getConfig()
-
setConfig
final Unit setConfig(MPSessionReplayConfig config)
-
getSessionReplaySender
final SessionReplaySender getSessionReplaySender()
-
getFlushService
final FlushService getFlushService()
-
getMpTracker
final MPTracker.Companion getMpTracker()
-
deinitialize
final Unit deinitialize()
De-initializes the Session Replay instance.
-
flush
final Unit flush(Function0<Unit> onComplete)
Uploads all locally stored events to Mixpanel.
- Parameters:
onComplete- Optional callback that will be called when the flush operation is complete.
-
getReplayId
final String getReplayId()
-
getDistinctId
final String getDistinctId()
-
isRecording
final Boolean isRecording()
-
addSensitiveView
final Unit addSensitiveView(View view)
-
removeSensitiveView
final Unit removeSensitiveView(View view)
-
addSafeView
final Unit addSafeView(View view)
-
removeSafeView
final Unit removeSafeView(View view)
-
addSensitiveClass
final Unit addSensitiveClass(Class<?> aClass)
-
removeSensitiveClass
final Unit removeSensitiveClass(Class<?> aClass)
-
autoStartRecording
final Unit autoStartRecording()
Automatically starts recording session replays based on the configured percentage. If the percentage is 0, it will not start recording.
-
startRecording
final Unit startRecording(Double sessionsPercent)
Starts recording session replays.
- Parameters:
sessionsPercent- The percentage of sessions to record.
-
stopRecording
final Unit stopRecording()
-
onTouchStart
Unit onTouchStart()
-
onTouchEnd
Unit onTouchEnd()
-
-
-
-