コード例 #1
0
        public static SessionInstallationStatus AsSessionInstallationStatus(this Api.ArPrestoApkInstallStatus arCoreStatus)
        {
            switch (arCoreStatus)
            {
            case Api.ArPrestoApkInstallStatus.ARPRESTO_APK_INSTALL_ERROR_DEVICE_NOT_COMPATIBLE:
                return(SessionInstallationStatus.ErrorDeviceNotCompatible);

            case Api.ArPrestoApkInstallStatus.ARPRESTO_APK_INSTALL_ERROR_USER_DECLINED:
                return(SessionInstallationStatus.ErrorUserDeclined);

            case Api.ArPrestoApkInstallStatus.ARPRESTO_APK_INSTALL_REQUESTED:
                // This shouldn't happen
                return(SessionInstallationStatus.Error);

            case Api.ArPrestoApkInstallStatus.ARPRESTO_APK_INSTALL_SUCCESS:
                return(SessionInstallationStatus.Success);

            case Api.ArPrestoApkInstallStatus.ARPRESTO_APK_INSTALL_ERROR:
            default:
                return(SessionInstallationStatus.Error);
            }
        }
コード例 #2
0
 static void OnApkInstallation(Api.ArPrestoApkInstallStatus status, IntPtr context)
 {
     ResolvePromise(context, status.AsSessionInstallationStatus());
 }