简体   繁体   English

为非 en-us 语言环境创建消息语音操作

[英]Create Message voice action for non en-us locales

I would like to know which are my posibilities as a developer to implements a send message voice action, in a custom Telegram app, for spanish users.我想知道我作为开发人员在自定义 Telegram 应用程序中为西班牙用户实现发送消息语音操作的可能性。 I want to implement the send new message action, I does not interested in replying to received messages (this is already implemented).我想实现发送新消息动作,我对回复收到的消息不感兴趣(这已经实现)。 I already know that there are built-in intents but the CREATE_MESSAGE built-in intent is only available for en-us locale.我已经知道有内置意图,但 CREATE_MESSAGE 内置意图仅适用于 en-us 语言环境。 I also checked the custom intents but there are also only availables for en-us locale as I know.我还检查了自定义意图,但据我所知,也只有 en-us 语言环境可用。 Which more options do I have?我还有哪些选择?

PD: My final goal is to make the app compatible for Android Auto so I'm making it compatible with google assistant first. PD:我的最终目标是让应用程序与 Android Auto 兼容,所以我首先要让它与谷歌助手兼容。

Thanks in advance.提前致谢。

As you note, the actions.intent.CREATE_MESSAGE BII is only available in en-US right now.如您所见, actions.intent.CREATE_MESSAGE BII 目前仅在 en-US 中可用。 This is probably the best one, since it provides getting and sending a message without any additional work.这可能是最好的一个,因为它无需任何额外工作即可获取和发送消息。

You may want to see if actions.intent.OPEN_APP_FEATURE will work for your needs.您可能想查看actions.intent.OPEN_APP_FEATURE是否可以满足您的需求。 It has the downside that it does not have the fields available in CREATE_MESSAGE , but it might be a useful way to open the app.它的缺点是它在CREATE_MESSAGE中没有可用的字段,但它可能是打开应用程序的有用方法。

However...然而...

If you're planning on targeting Android Auto , that platform is even more restricted.如果您计划以 Android Auto为目标,则该平台会受到更多限制。 If you're building an Android Auto app, you are limited to use only the actions.intent.GET_PARKING_FACILITY or actions.intent.GET_CHARGING_STATIONS BIIs.如果您正在构建 Android Auto 应用,则只能使用actions.intent.GET_PARKING_FACILITYactions.intent.GET_CHARGING_STATIONS BII。 If you are willing to have it return a widget, you get a little more flexibility in what BIIs it accepts , but these don't let you send a message or open the app (even in en-US).如果您愿意让它返回一个小部件,您可以在它接受的 BII方面获得更多的灵活性,但是这些不允许您发送消息或打开应用程序(即使在 en-US 中)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM