跳到内容 跳到主导航 跳到页脚

调起OPK失败

当使用语音控制从当前opk跳转到其他opk时,机器人没有进行opk的切换,并且屏幕出现:“若需其它服务,请先说退出”的弹窗时,此时需要检查的步骤如下:

  • 取出跳转发生时间的日志,查看日志中两者opk的优先级,如果当前opk的优先级高于即将需要跳转opk的优先级是无法跳转的。

例如下面的日志中,通过key或者appId可以找到当前opk的关键信息,其中关键词是:SceneRegistry,关键值 priority:1

在日志中查看当前opk被注册的优先级 priority
09-02 19:01:30.540 23251 23317 I ReactNativeJS: 'SceneRegistry', 'Add scene : {"default":true,"key":"home","appId":"ed9f81b741652db83871c560a4a5f62c","portal":true,"priority":1}'
09-02 19:01:30.540 23251 23317 I ReactNativeJS: 'SceneRegistry', 'Add scene : {"key":"wakeUp","appId":"ed9f81b741652db83871c560a4a5f62c","portal":false,"priority":1}'
09-02 19:01:30.540 23251 23317 I ReactNativeJS: 'SceneRegistry', 'Add scene : {"key":"idle","appId":"ed9f81b741652db83871c560a4a5f62c","portal":false,"priority":1}'

例如下面的日志中,通过key或者appId可以找到需要跳转至的opk的关键信息,其中关键词是:ScenePolicy,关键值 priority:1

在日志中查看当前opk进行trigger跳转时,是从什么优先级的opk跳转到什么优先级的opk
09-02 19:01:37.955 23251 23317 I ReactNativeJS: ScenePolicy : community_service&community_service_homepage ,current: ed9f81b741652db83871c560a4a5f62c_home ,target: e353b6dad9d3b1a351f3e542aba7da72_community_service ,userText: 社区服务 09-02 19:01:37.955 23251 23317 I ReactNativeJS: ScenePolicy : 1 1 target: {"default":true,"intent":["community_service&community_service_homepage","restaurant_menu&get_menu","elderly_college&query_course","leave_registration&set_out_date","leave_registration&set_back_date","regular_bus&query_bus_schedule"],"key":"community_service","appId":"e353b6dad9d3b1a351f3e542aba7da72","portal":false,"priority":1} currentConfig: {"default":true,"key":"home","appId":"ed9f81b741652db83871c560a4a5f62c","portal":true,"priority":1} intent: community_service&community_service_homepage
  • 当当前opk的优先级高于即将需要跳转opk的优先级时,需要修改当前opk的优先级,使当前opk的优先级,低于即将需要跳转opk的优先级,修改的方法有如下两种:

        1. 项目的index.js文件中设置,具体代码如下:

AppRegistry.registerConfig([{
    appKey: 'demo_service',
    component: () => App,
    intent: [
        'weather&get_weather'
    ],
    appId: appid,
    priority: 3  //修改这里的优先级
}]);

        2. 应用后台发布时设置,可联系售前查看与修改

注:修改opk优先级请先使用第一种方式,若第一种无效再联系售前在后台进行设置