cordova-plugin-siri-shortcuts icon indicating copy to clipboard operation
cordova-plugin-siri-shortcuts copied to clipboard

callback for the "Present" api should specify if the user added a shortcut or not what was the shortcut phrase

Open beaudry12087 opened this issue 6 years ago • 6 comments

This is more of a feature request more than a bug. The current function "present" which shows the iOS interface for the user to add a shortcut will call the "success" callback even if the user cancels the process of adding a shortcut to Siri. It will be nice if the success method was returning a flag to specify if the user created a shortcut or not. It will be nice as well if the success method was also providing the phrase which was used by the user to create the shortcut. That way, the Cordova app can be updated to reflect that the user has indeed created a shortcut and the user don't need to it again. Having the phrase that was used by the user will be nice to display in the Cordova app in order to remind the user what to say to Siri.

beaudry12087 avatar Nov 27 '18 03:11 beaudry12087

Hi, my fork modify present function. In my version if the shortcut exists, will popup a view controller asking the user to modify or delete it. Moreover the success callback returns a key-value object containing: code and message of operation (like created, modified, deleted, dismissed) and phrase that the user has pronounced. See my fork for detail.

levieu avatar Nov 28 '18 14:11 levieu

Hi, my fork modify present function. In my version if the shortcut exists, will popup a view controller asking the user to modify or delete it. Moreover the success callback returns a key-value object containing: code and message of operation (like created, modified, deleted, dismissed) and phrase that the user has pronounced. See my fork for detail.

Amazing! This is exactly what I was looking for this fork should me merge. I will use your fork in the meantime :) . By the way, I have also created another ticket about having an API to retrieve the list of shortcuts created by the user. Maybe you want to add that API to your fork as well ... :)

beaudry12087 avatar Dec 03 '18 16:12 beaudry12087

@levieu , I am trying to build a cordova audio app. It will be nice if the plugin allowed to present a INPlayMediaIntent and the intent handler could start the cordova app in the background. Any chance , you can add support for media intent to this plugin :)

beaudry12087 avatar Dec 14 '18 10:12 beaudry12087

Hi, my fork modify present function. In my version if the shortcut exists, will popup a view controller asking the user to modify or delete it. Moreover the success callback returns a key-value object containing: code and message of operation (like created, modified, deleted, dismissed) and phrase that the user has pronounced. See my fork for detail.

Amazing! This is exactly what I was looking for this fork should me merge. I will use your fork in the meantime :) . By the way, I have also created another ticket about having an API to retrieve the list of shortcuts created by the user. Maybe you want to add that API to your fork as well ... :)

see #10

levieu avatar Dec 14 '18 11:12 levieu

@levieu Any chance you will add support for INPlayMediaIntent in your fork ? :)

beaudry12087 avatar Dec 16 '18 19:12 beaudry12087

@levieu Any chance you will add support for INPlayMediaIntent in your fork ? :)

can i try

levieu avatar Dec 17 '18 10:12 levieu