다음을 통해 공유


AppNotificationBuilder.MuteAudio 메서드

정의

시스템에서 앱 알림과 연결된 오디오를 음소거할 것을 요청합니다.

public:
 virtual AppNotificationBuilder ^ MuteAudio() = MuteAudio;
AppNotificationBuilder MuteAudio();
public AppNotificationBuilder MuteAudio();
function muteAudio()
Public Function MuteAudio () As AppNotificationBuilder

반환

추가 메서드 호출을 연결할 수 있도록 AppNotificationBuilder instance 반환합니다.

예제

다음 예제에서는 앱 알림에 대한 XML 페이로드에서 오디오 음소거를 요청하는 방법을 보여 줍니다.

var notification = new AppNotificationBuilder()
    .AddText("Notification text.")
    .MuteAudio()
    .BuildNotification();

AppNotificationManager.Default.Show(notification);

결과 XML 페이로드:

<toast>
    <visual>
        <binding template='ToastGeneric'>
            <text>Notification text.</text>
        </binding>
    </visual>
    <audio silent='true'/>
</toast>

설명

앱 알림의 오디오를 지정하려면 또는 SetAudioUri(Uri, AppNotificationAudioLooping)을 사용합니다SetAudioEvent(AppNotificationSoundEvent, AppNotificationAudioLooping).

AppNotificationBuilder API를 사용하여 앱 알림에 대한 UI를 만드는 방법에 대한 지침은 앱 알림 콘텐츠를 참조하세요.

앱 알림에 대한 XML 스키마에 대한 참조 정보는 앱 알림 콘텐츠 스키마를 참조하세요.

적용 대상