interface IScanStore (Niantic.ARDK.AR.Scanning.IScanStore)

Overview

Manages the persistence of scans created by IScanner. An instance can be obtained by calling IScanner.GetScanStore. More...

interface IScanStore {
    // classes

    class UploadUserInfo;

    // methods

    void DeleteSavedScan(string scanId);
    SavedScan GetSavedScan(string scanId);
    List<string> GetScanArchivePaths(string scanId, UploadUserInfo uploadUserInfo);
    List<string> GetScanIDs();
    List<LocationData> GetScanLocationData(string scanId);
    void SaveCurrentScan(string scanId);

    void UploadScan(
        string scanId,
        UploadUserInfo uploadUserInfo,
        Action<float> onProgress,
        Action<bool, string> onResult
    );
};

// direct descendants

class ScanStore;

Detailed Documentation

Manages the persistence of scans created by IScanner. An instance can be obtained by calling IScanner.GetScanStore.

Methods

void DeleteSavedScan(string scanId)

Deletes the saved scan with the given scan ID.

Parameters:

scanId

the ID of the scan to delete

SavedScan GetSavedScan(string scanId)

Returns the SavedScan for a given scan ID.

Parameters:

scanId

The ID of the scan to return

Returns:

the SavedScan or null if it does not exist

List<string> GetScanIDs()

Returns a list of IDs for all scans that are saved on this device.

void SaveCurrentScan(string scanId)

Saves the current scan into persistent storage on device. The Scanner must be in the Done state. The current scan ID can be obtained by calling IScanner.GetScanId.

Parameters:

scanId

The current scanID, obtained by calling GetScanId

InvalidOperationException

If there is no scan corresponding to the scanId.

void UploadScan(
    string scanId,
    UploadUserInfo uploadUserInfo,
    Action<float> onProgress,
    Action<bool, string> onResult
)

Uploads the saved scan to Niantic for VPS activation.

Parameters:

scanId

The ID of the scan to upload

uploadUserInfo

Additional metadata to upload along with the scan

onProgress

Callback invoked periodically while the scan uploads with a float between 0 and 1 to indicate the upload progress.

onResult

Called when upload completes, with a boolean indicating whether the upload succeeded and a string describing the failure (if any).