This is a lower-level API. Lower-level APIs are not recommended for most projects, and may not be available on all plans. See our page on recommended deployment patterns for more information.
Public Method Questions API

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 provided sessionId argument.

Returns: Promise
LearnosityApp.offline().push(securityObject, '73b93d80-481d-4c50-b2ed-6596c49e037a')
    .then(() => console.log('Synchronization completed'));
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 provided sessionId argument.

Returns: Promise
LearnosityApp.offline().getSession(securityObject, '73b93d80-481d-4c50-b2ed-6596c49e037a')
    .then((data) => console.log('session responses data', data));
Was this article helpful?