private void Show() { _canvas.enabled = true; _canvasGroup.alpha = 1; _canvasGroup.interactable = true; // We allow the user to enter Bose Connect if we don't know for certain the user is currently in a // VPA suspension. Since VPA suspensions resolve on their own and often in short order, it would be // a worse experience for a user to enter Bose Connect in an attempt to resolve that suspension. bool allowBoseConnect = _reason != SensorServiceSuspendedReason.VoiceAssistantInUse && PlatformTools.IsBoseConnectAvailable(); // If we know for certain that the user is in music sharing or multipoint, then we allow them // to continue without Bose AR, effectively killing their Bose AR connection. bool allowContinueWithout = (_reason == SensorServiceSuspendedReason.MusicSharingActive || _reason == SensorServiceSuspendedReason.MultipointConnectionActive); _launchExternalAppButton.gameObject.SetActive(allowBoseConnect); _continueWithoutBoseButton.gameObject.SetActive(allowContinueWithout); switch (_reason) { case SensorServiceSuspendedReason.MusicSharingActive: _warningText.text = MUSIC_SHARING_WARNING; break; case SensorServiceSuspendedReason.MultipointConnectionActive: _warningText.text = MULTI_POINT_WARNING; break; case SensorServiceSuspendedReason.VoiceAssistantInUse: _warningText.text = VOICE_ASSISTANT_WARNING; break; case SensorServiceSuspendedReason.UnknownReason: _warningText.text = UNKNOWN_REASON_WARNING; break; default: throw new ArgumentOutOfRangeException(); } }
private void LaunchExternalApp() { PlatformTools.LaunchBoseConnectApp(); }