admin管理员组文章数量:1230177
I'm currently trying to integrate deeplinks
as google assistant shortcuts
in my app.
So users add a phrase command, and these shortcuts are then indexed by Google Assistant, and assistant then lists the shortcuts. The only problem is, I can't see the shortcuts anywhere listed.
I tried dynamic shortcuts, using ShortcutInfoCompat, and AssistantShortcutSuggestionClient (Similar to Siri, where users add a phrase command and the shortcut is added to the device, then when user say the phrase it triggers the deeplink)
Below is an example of a dynamic shortcut
. When this is pushed, google assistant is supposed to automatically index it. I also have AppActions registered on Google Play console, and my app is on Google play. But nothing. It doesn't work.
val shortcut = ShortcutInfoCompat.Builder(context, "dashboard_shortcut")
.setShortLabel("Open Dashboard")
.setLongLabel("Open the dashboard in My App")
.setIcon(IconCompat.createWithResource(context, R.drawable.ic_dashboard))
.setIntent(
Intent(Intent.ACTION_VIEW).apply {
data = Uri.parse("myapp://dashboard")
}
)
.build()
ShortcutManagerCompat.pushDynamicShortcut(context, shortcut)
Has anyone had any luck with this? Google's documentation is basically non existent, and their plugin for shortcuts hasn't been maintained in years.
So is Google Assistant Shortcuts officially dead for Android? How does Whats app or facebook do this? They must have access to private apis or they registered their app with Google somehow.
I'd appreciate anybody's input here.
本文标签:
版权声明:本文标题:kotlin - Google Assistant Shortcuts Integration, is Google Assistant Dead for Android? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1739467309a2164447.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论