为什么 DeepLink 助手无法启动我的安卓应用程序?



我的应用程序基于谷歌的以下代码示例:https://actions-on-google.github.io/actions-on-google-nodejs/classes/conversation_question.deeplink.html

这是一个直接来自我的代码片段:

app.intent('Default Welcome Intent', conv => {
conv.ask('Great! Looks like we can do that in the app.')
conv.ask(new DeepLink({
destination: 'MyBookApp',
url: 'https://www.mybooksite.com/read/123456789',
package: 'com.mybook.app.reader',
reason: 'handle this for you',
}))
})
// Create a Dialogflow intent with the `actions_intent_LINK` event
app.intent('Get Link Status', (conv, input, arg, status) => {
// possibly do something with status
conv.close('Okay maybe we can take care of that another time.')
})

当我运行这个应用程序时,我会看到">好吧,也许我们可以改天处理。",而不是启动我的应用程序。

">获取链接状态"意图的处理程序中是否缺少代码?(我根据上面的评论创建了意图(。

我是否向DeepLink对象传递了错误的参数?我在任何地方都找不到他们的文档。

注意:我的应用程序肯定是为处理http深度链接而编码的,包括使用谷歌数字资产链接进行验证,我正在测试的深度链接URL与其他应用程序完全兼容。

非常感谢您的任何建议或帮助!

提前感谢。。。

您的欢迎意向处理程序在深度链接调用之前缺少对conv.ask的额外调用:

conv.ask('Great! Looks like we can do that in the app.')

所有回复都应该至少有一个简单的回复。

最新更新