class ARCoreInstaller (Niantic.ARDK.AR.Configuration.ARCoreInstaller)

Overview

A tool that installs ARCore if it’s not already installed. More…

class ARCoreInstaller {
public:
    // enums

    enum InstallBehavior;
    enum InstallMessageType;
    enum InstallResult;

    // methods

    static InstallResult RequestInstallARCore(
        bool shouldPromptUserToUpdate,
        InstallBehavior installBehavior,
        InstallMessageType messageType
    );
};

Detailed Documentation

A tool that installs ARCore if it’s not already installed.

This class exposes the ArCoreApk_requestInstallCustom method from ARCore, documented here: https://developers.google.com/ar/reference/c/group/ar-core-apk#arcoreapk_requestinstallcustom

Methods

static InstallResult RequestInstallARCore(
    bool shouldPromptUserToUpdate,
    InstallBehavior installBehavior,
    InstallMessageType messageType
)

Calling this method with shouldPromptUserToUpdate will either return that ARCore is already installed, or send the user to the play store to install it. Calling it with shouldPromptUserToUpdate as false will either return that ARCore is successfully installed or will say that the user declined to install it. If the user is sent to the play store to install ARCore, this activity will pause. This will need to be called again after the activity has resumed to check the results.