com.amap.api.navi

## 接口 AMapNaviViewListener

-     public interface AMapNaviViewListener

  导航视图事件监听
  Navigation view event listener.

- - ### 方法概要

    所有方法 实例方法 抽象方法 已过时的方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `onAMapNaviViewExit()` AMapNaviView退出时触发，收到这个回调您可以确定是否进行AMapNaviView的destroy或者其他操作 "This callback is triggered when AMapNaviView is exited.
    `void` | `onBroadcastModeChanged(int mode)` 播报模式变化回调 Broadcast mode change callback
    `void` | `onControlMusicVolumeModeChanged(int controlMusicVolumeMode)` 通知音乐音量控制模式已发生改变。
    `void` | `onDayAndNightModeChanged(int mode)` 昼夜模式设置变化回调 Day-night mode setting change callback
    `void` | `onEagleChanged(boolean isEagle)` 通报“鹰眼模式”状态的变更。
    `void` | `onListenToVoiceDuringCallChanged(boolean isListenToVoiceDuringCall)` 当监听通话期间是否听取语音的状态发生改变时被调用。
    `void` | `onLockMap(boolean isLock)` 已过时。 请使用 `AMapNaviViewListener.onNaviViewShowMode(int)` Please use `AMapNaviViewListener.onNaviViewShowMode(int)`
    `void` | `onMapTypeChanged(int mapType)` AMapNaviView地图白天黑夜模式切换回调 Callback for AMapNaviView map day/night mode switching
    `boolean` | `onNaviBackClick()` 导航页面左下角"退出"按钮的点击回调 Callback for clicking the "Exit" button in the lower left corner of the navigation page
    `void` | `onNaviCancel()` 导航页面左下角返回按钮点击后弹出的『退出导航』对话框中选择『确定』后的回调接口 Callback interface after selecting "Confirm" in the "Exit Navigation" dialog that pops up after clicking the back button in the lower left corner of the navigation page.
    `void` | `onNaviMapMode(int naviMode)` 导航视角变化回调 Callback for navigation view change
    `void` | `onNaviRouteHighlightChange(long highLightPathId, int triggerType)` 导航高亮（主）路线更新 Navigation highlight (primary) route update
    `void` | `onNaviSetting()` 界面右下角设置按钮的点击回调 Callback for clicking the settings button in the lower right corner of the interface
    `void` | `onNaviTurnClick()` 已过时。
    `void` | `onNaviViewLoaded()` 导航view加载完成回调 Callback when navigation view loading is completed.
    `void` | `onNaviViewShowMode(int showMode)` 导航视图展示模式变化回调 Callback for navigation view display mode change
    `void` | `onNextRoadClick()` 已过时。
    `void` | `onScaleAutoChanged(boolean enable)` 比例尺智能缩放设置变化回调 Scale bar intelligent scaling setting change callback
    `void` | `onScanViewButtonClick()` 界面全览按钮的点击回调 Callback for clicking the overview button on the interface.
    `void` | `onStopSpeaking()` 停止播报回调 Stop playback callback 当退出导航页，或切换播报模式为静音的时候，会触发该回调。
    `void` | `onStrategyChanged(int strategy)` 算路策略改变 Routing strategy change
    `void` | `onViewTypeChanged(AmapPageType viewType)` 路线页、导航页切换 Route page, navigation page switch

- - ### 方法详细资料

    - #### onNaviSetting

          void onNaviSetting()

      界面右下角设置按钮的点击回调
      Callback for clicking the settings button in the lower right corner of the interface

    - #### onNaviCancel

          void onNaviCancel()

      导航页面左下角返回按钮点击后弹出的『退出导航』对话框中选择『确定』后的回调接口
      Callback interface after selecting "Confirm" in the "Exit Navigation" dialog that pops up after clicking the back button in the lower left corner of the navigation page. 如果使用了自定义View的行前页面，此方法无效

    - #### onNaviBackClick

          boolean onNaviBackClick()

      导航页面左下角"退出"按钮的点击回调
      Callback for clicking the "Exit" button in the lower left corner of the navigation page
      返回:
        返回值：false-由SDK主动弹出『退出导航』对话框，true-SDK不主动弹出『退出导航』对话框，由用户自定义
        Return value: false-SDK actively pops up the "Exit Navigation" dialog, true-SDK does not actively pop up the "Exit Navigation" dialog, customized by the user

    - #### onNaviMapMode

          void onNaviMapMode(int naviMode)

      导航视角变化回调
      Callback for navigation view change
      参数:
        `naviMode` - 导航视角，0:车头朝上状态；1:正北朝上模式。
        Navigation view, 0: vehicle heading up state; 1: north up mode.

    - #### onNaviTurnClick

          void onNaviTurnClick()

      已过时。
      界面左上角转向操作的点击回调
      Callback for clicking the turn operation in the upper left corner of the interface

    - #### onNextRoadClick

          void onNextRoadClick()

      已过时。
      界面下一道路名称的点击回调
      Callback for clicking the next road name on the interface

    - #### onScanViewButtonClick

          void onScanViewButtonClick()

      界面全览按钮的点击回调
      Callback for clicking the overview button on the interface.

    - #### onLockMap

          void onLockMap(boolean isLock)

      已过时。 请使用 `AMapNaviViewListener.onNaviViewShowMode(int)`
      Please use `AMapNaviViewListener.onNaviViewShowMode(int)`
      是否锁定地图的回调
      Callback for whether the map is locked.
      参数:
        `isLock` - true代表锁车状态，地图未锁定。false代表非锁车状态，地图锁定。
        true represents vehicle lock state, map is not locked. false represents non-vehicle lock state, map is locked.

    - #### onNaviViewLoaded

          void onNaviViewLoaded()

      导航view加载完成回调
      Callback when navigation view loading is completed.
      从以下版本开始:
        1.7.0

    - #### onMapTypeChanged

          void onMapTypeChanged(int mapType)

      AMapNaviView地图白天黑夜模式切换回调
      Callback for AMapNaviView map day/night mode switching
      参数:
        `mapType` - 枚举值参考AMap类 3-夜间模式 4-白天模式
        Enumeration values refer to AMap class 3-night mode 4-day mode
      从以下版本开始:
        6.2.0

    - #### onNaviViewShowMode

          void onNaviViewShowMode(int showMode)

      导航视图展示模式变化回调
      Callback for navigation view display mode change
      参数:
        `showMode` - 展示模式，具体类型可参考`AMapNaviViewShowMode`
        Display mode, specific types can refer to `AMapNaviViewShowMode`
      从以下版本开始:
        6.2.0

    - #### onStopSpeaking

          void onStopSpeaking()

      停止播报回调
      Stop playback callback 当退出导航页，或切换播报模式为静音的时候，会触发该回调。建议在收到该回调时，停止外部一切导航相关的播报。
      "This callback is triggered when exiting the navigation page or switching the announcement mode to mute. It is recommended to stop all external navigation-related audio playback upon receiving this callback."
      从以下版本开始:
        10.0.820

    - #### onViewTypeChanged

          void onViewTypeChanged(AmapPageType viewType)

      路线页、导航页切换
      Route page, navigation page switch
      参数:
        `viewType` - 0：切换路线页，1：切换导航页
        0:Switch Route Page。1:Switch navigation page
      从以下版本开始:
        10.0.820

    - #### onAMapNaviViewExit

          void onAMapNaviViewExit()

      AMapNaviView退出时触发，收到这个回调您可以确定是否进行AMapNaviView的destroy或者其他操作
      "This callback is triggered when AMapNaviView is exited. Upon receiving this callback, you can decide whether to destroy the AMapNaviView or perform other operations."
      从以下版本开始:
        10.0.820

    - #### onStrategyChanged

          void onStrategyChanged(int strategy)

      算路策略改变
      Routing strategy change
      参数:
        `strategy` -
      从以下版本开始:
        10.0.820

    - #### onBroadcastModeChanged

          void onBroadcastModeChanged(int mode)

      播报模式变化回调
      Broadcast mode change callback
      参数:
        `mode` - 播报模式。
    - `BroadcastMode.DETAIL` -- 新手模式(默认值）
    Beginner Mode (Default)
    - `BroadcastMode.CONCISE` -- 专家模式
    Expert Mode
    - `BroadcastMode.MUTE` -- 静音模式，仅对使用内置语音生效，不影响语音文字透出
    Mute mode only applies to built-in voice and does not affect voice-to-text display
    从以下版本开始:
      10.0.820

  - #### onDayAndNightModeChanged

        void onDayAndNightModeChanged(int mode)

    昼夜模式设置变化回调
    Day-night mode setting change callback
    参数:
      `mode` - 0-自动切换 1-白天 2-夜间
      0-Auto 1-Day 2-Night
    从以下版本开始:
      10.0.820

  - #### onScaleAutoChanged

        void onScaleAutoChanged(boolean enable)

    比例尺智能缩放设置变化回调
    Scale bar intelligent scaling setting change callback
    参数:
      `enable` - 是否开启
      Enable or not
    从以下版本开始:
      10.0.820

  - #### onListenToVoiceDuringCallChanged

        void onListenToVoiceDuringCallChanged(boolean isListenToVoiceDuringCall)

    当监听通话期间是否听取语音的状态发生改变时被调用。
    Called when the state of whether to listen to the voice during a call changes 开发者可以通过参数判断当前是否应该处理通话音频的输出方式，
    Developers can determine whether to process the output method of call audio through parameters 例如决定是否启用扬声器模式或调整音频路由。
    For example, deciding whether to enable speaker mode or adjust audio routing
    参数:
      `isListenToVoiceDuringCall` - 是否在通话期间监听语音。
      Whether to listen to voice during a call 如果为 true，则表示应监听语音（可能已开启免提）；
      "If it is true, it indicates that the system should listen to voice input (hands-free mode may be activated)." 如果为 false，则表示不应监听（可能使用听筒）。
      If it is false, it means that it should not be monitored (possibly using the earpiece).
    从以下版本开始:
      10.0.820

  - #### onControlMusicVolumeModeChanged

        void onControlMusicVolumeModeChanged(int controlMusicVolumeMode)

    通知音乐音量控制模式已发生改变。
    Notify that the music volume control mode has changed 此方法使得应用程序能够根据不同的音量控制模式（如媒体音量或通话音量）
    This method enables the application to adjust based on different volume control modes (such as media volume or call volume) 来调整音乐播放的音量策略。
    To adjust the volume strategy for music playback
    参数:
      `controlMusicVolumeMode` - 音乐音量控制的模式。具体的模式值及其意义需参考相关文档或实现逻辑。
      Music volume control mode. The specific mode values and their meanings need to refer to the relevant documentation or implementation logic.
    从以下版本开始:
      10.0.820

  - #### onEagleChanged

        void onEagleChanged(boolean isEagle)

    通报“鹰眼模式”状态的变更。
    Notify the change of 'Eagle Eye Mode' status. “鹰眼模式”可能代表一种特殊的显示效果、性能优化模式或其他自定义功能状态。
    "Hawk Eye Mode" may refer to a special display effect, performance optimization mode, or other custom functional state. 应用程序应根据此状态调整相应的功能或用户界面。
    The application should adjust the corresponding functions or user interface based on this status.
    参数:
      `isEagle` - 当前“鹰眼模式”的状态。如果为 true，表示已启用该模式；
      The current status of the ‘Eagle Eye Mode.’ If true, it indicates that the mode is enabled; 如果为 false，表示该模式当前未启用。
      If false, it means the mode is currently not enabled.
    从以下版本开始:
      10.0.820

  - #### onNaviRouteHighlightChange

        void onNaviRouteHighlightChange(long highLightPathId,
                                        int triggerType)

    导航高亮（主）路线更新
    Navigation highlight (primary) route update
    参数:
      `highLightPathId` - 高亮（主）路线ID
      Highlight (Primary) Route ID
      `triggerType` - 触发换路的类型 0:自动切换(自动走上备选路) 1:手动点击路线换路(手动点击路线换路/手动点击路线气泡换路)
      Types of route switching trigger 0:Auto-switch (automatically take alternative route) 1:Manual route switch (manual route switch\/manual route bubble switch)