offline()
Note
This method can only be used in Local Device Assessment
.
Returns an object, containing two methods: getSession
and push
.
Examples
const offlineMethods = LearnosityApp.offline();
Arguments
None.
Return value
Value object
Properties
-
push function
Note This method can only be used in
Local Device Assessment
.Synchronize the unsynchronized local device assessment responses stored inside the current device's
indexedDB
based on the providedsessionId
argument.Returns: PromiseLearnosityApp.offline().push(securityObject, '73b93d80-481d-4c50-b2ed-6596c49e037a') .then(() => console.log('Synchronization completed'));
-
sessionId string
The session ID we want to synchronize.
-
getSession function
Note This method can only be used in
Local Device Assessment
.Return responses stored inside the current device's
indexedDB
based on the providedsessionId
argument.Returns: PromiseLearnosityApp.offline().getSession(securityObject, '73b93d80-481d-4c50-b2ed-6596c49e037a') .then((data) => console.log('session responses data', data));
-
sessionId string
The session ID we want to retrieve the stored responses from.