GuidanceNavigator.AudioNotificationRequested 事件

定义

当音频通知适用于导航指南时发生,例如在即将轮次或退出之前。

注意

此 API 不适用于所有 Windows 应用。 除非开发人员帐户是由Microsoft专门预配的,否则对此 API 的调用将在运行时失败。 有关 Windows.Services.Maps.Guidance 命名空间的详细信息,请与你的Microsoft帐户团队代表协作。

// Register
event_token AudioNotificationRequested(TypedEventHandler<GuidanceNavigator, GuidanceAudioNotificationRequestedEventArgs const&> const& handler) const;

// Revoke with event_token
void AudioNotificationRequested(event_token const* cookie) const;

// Revoke with event_revoker
GuidanceNavigator::AudioNotificationRequested_revoker AudioNotificationRequested(auto_revoke_t, TypedEventHandler<GuidanceNavigator, GuidanceAudioNotificationRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<GuidanceNavigator,GuidanceAudioNotificationRequestedEventArgs> AudioNotificationRequested;
function onAudioNotificationRequested(eventArgs) { /* Your code */ }
guidanceNavigator.addEventListener("audionotificationrequested", onAudioNotificationRequested);
guidanceNavigator.removeEventListener("audionotificationrequested", onAudioNotificationRequested);
- or -
guidanceNavigator.onaudionotificationrequested = onAudioNotificationRequested;
Public Custom Event AudioNotificationRequested As TypedEventHandler(Of GuidanceNavigator, GuidanceAudioNotificationRequestedEventArgs) 

事件类型

Windows 要求

设备系列
Windows Desktop Extension SDK (在 10.0.10586.0 中引入)
Windows Mobile Extension SDK (在 10.0.10586.0 中引入)
Windows Team Extension SDK (在 10.0.14393.0 中引入)
API contract
Windows.Services.Maps.GuidanceContract (在 v2.0 中引入)

注解

注册以处理此事件会关闭自动音频通知。 使用 GuidanceAudioNotificationRequestedEventArgs 提供自己的音频通知。

适用于