0

In SiriKit there is INActivateCarSignalIntent which allows you to recognize when a user asks for an "audible" or "visual" signal.

For example if you say "Honk my car’s horn." INCarSignalOptions.audible will be passed to your handler. If you say "Flash my car's lights" INCarSignalOptions.visual will be passed to your handler.

However, the above documentation states:

Users can ask Siri to activate their car’s signals in a variety of ways. Table 2 provides a few sample phrases in different languages. You can use these phrases during testing to trigger your intents. This list isn’t exhaustive, and Siri may recognize many other phrases.

This is confusing because there are other phrases that can trigger audible or .visual intents. This makes it unreliable to know what the user is actually asking for. "visual" and "audible" are too generic and can apply to many things. For example "flash the car lights" and "turn on the car lights" both trigger INCarSignalOptions.visual.

It would make much more sense if when you asked to honk your car's horn, the intent passed you .honkHorn = true (all other SiriKit intents are that descriptive besides this one).

Is there something I am missing here? Is there a reliable way to know what the user asked for in regards to honking the horn, flashing the lights, turning the lights on, etc?

jaju
  • 1
  • 2
  • I don't quite understand your question - Do you mean that "Turn on the car lights" means that the lights should come on and remain on vs "Flash the car lights" which means a flash? If so, then I don't think that actually turning on the car lights is a supported intent - It is simply a synonym for flashing the lights or making an appropriate visual signal - despite the various trigger phrases there are only two possible signal actions - audible and visual and your app should respond based on the signal options – Paulw11 Dec 17 '19 at 23:43
  • @Paulw11 the main issue is that totally different phrases can trigger the same action (such as visual). e.g. flash lights, turn on lights - these are two very different things that cause the same intent and thus with code I cannot differentiate them. – jaju Dec 19 '19 at 00:07
  • There is no standard intent for "turning on" the lights (as in turning them on and leaving them on). The phrase "turn on the lights" is just a synonym for "flash the lights". All you need to do is look at the signal options and perform the requested operation (audible alert, visual alert or both). If you want an intent to turn on (and leave on) the headlights you would need to expose a custom shortcut and leave it up to iOS to disambiguate the phrase to invoke the correct intent; (i.e. if the user associates the phrase "turn on the lights") with your shortcut then that will take preference – Paulw11 Dec 19 '19 at 00:14

0 Answers0