public class ModuleSessions extends ModuleBase
| Constructor and Description |
|---|
ModuleSessions() |
| Modifier and Type | Method and Description |
|---|---|
void |
forgetSession() |
java.lang.Integer |
getFeature() |
SessionImpl |
getSession() |
void |
init(InternalConfig config)
All initialization must be done in this method, not constructor.
|
boolean |
isActive()
A method to be used by module itself to determine if it was initialized by
Module.init(InternalConfig)
and haven't been stopped yet by Module.stop(CtxCore, boolean). |
void |
onActivityStarted(CtxCore ctx)
Activity is being launched.
|
void |
onActivityStopped(CtxCore ctx)
Activity is being stopped.
|
void |
onContextAcquired(CtxCore ctx)
SDK got a first context.
|
void |
onDeviceId(CtxCore ctx,
ConfigCore.DID deviceId,
ConfigCore.DID oldDeviceId)
Handles one single case of device id change with auto sessions handling, see first
if here: |
SessionImpl |
session(CtxCore ctx,
java.lang.Long id) |
void |
stop(CtxCore ctx,
boolean clear)
App user decided to opt out from analytics or developer changed important preferences.
|
ly.count.sdk.java.internal.TimedEvents |
timedEvents() |
onActivityCreated, onActivityDestroyed, onActivityPaused, onActivityResumed, onActivitySaveInstanceState, onConfigurationChanged, onLimitedContextAcquired, onRequest, onRequestCompleted, onSessionBegan, onSessionEnded, onUserChangedpublic SessionImpl getSession()
public SessionImpl session(CtxCore ctx, java.lang.Long id)
public void forgetSession()
public java.lang.Integer getFeature()
public void init(InternalConfig config) throws java.lang.IllegalStateException
Moduleinit in interface Moduleinit in class ModuleBaseconfig - Countly configuration object: can be stored locally if needed.java.lang.IllegalStateException - if some required for this module platform feature is not available on this platform.public void onContextAcquired(CtxCore ctx)
ModuleApplication#onCreate())onContextAcquired in interface ModuleonContextAcquired in class ModuleBasectx - CtxCore with application instancepublic boolean isActive()
ModuleModule.init(InternalConfig)
and haven't been stopped yet by Module.stop(CtxCore, boolean).isActive in interface ModuleisActive in class ModuleBasetrue if module is allowed to continue to run, false otherwisepublic void stop(CtxCore ctx, boolean clear)
ModuleStorable files if clear is truestop in interface Modulestop in class ModuleBasectx - CtxCore to run inclear - true if module must clear it's data files, false otherwisepublic void onDeviceId(CtxCore ctx, ConfigCore.DID deviceId, ConfigCore.DID oldDeviceId)
if here:onDeviceId in interface ModuleonDeviceId in class ModuleBasectx - Ctx to run indeviceId - deviceId valid from now onoldDeviceId - deviceId valid previously if anyModuleDeviceIdCore.onDeviceId(CtxCore, ConfigCore.DID, ConfigCore.DID)public void onActivityStarted(CtxCore ctx)
ModuleonActivityStarted in interface ModuleonActivityStarted in class ModuleBasectx - CtxCore with activity setpublic void onActivityStopped(CtxCore ctx)
ModuleonActivityStopped in interface ModuleonActivityStopped in class ModuleBasectx - CtxCore with activity setpublic ly.count.sdk.java.internal.TimedEvents timedEvents()