void Start()
 {
     // Check for an initialization error on start.
     QCAR.InitError errorCode = QCAR.CheckInitializationError();
     if (errorCode != QCAR.InitError.INIT_SUCCESS)
     {
         SetErrorCode(errorCode);
         SetErrorOccurred(true);
     }
 }
    // Implementation of the IQCARErrorHandler function which sets the
    // error message.
    public void SetErrorCode(QCAR.InitError errorCode)
    {
        switch (errorCode)
        {
        case QCAR.InitError.INIT_DEVICE_NOT_SUPPORTED:
            mErrorText =
                "Failed to initialize QCAR because this device is not " +
                "supported.";

            break;

        case QCAR.InitError.INIT_ERROR:
            mErrorText = "Failed to initialize QCAR.";
            break;
        }
    }