Is there any idea for getting the status Siri enable/disable with swift or ObjC?
I have a feature which is detect Siri is launched. I found a workaround solution from https://stackoverflow.com/a/54822234/4562870. But it has a bug the hasSiri() is always on if Siri in the Settings is disable. So I want to know the Siri is enable or not.
I've searched a lot how to get the value of Listen for "Hey Siri" and Press Side button for Siri in Settings Siri & Search, but no one is about it. Could some one help this? Please help or try to give some ideas how to achieve this. Thanks!
Update:
I got a way listen UIApplicationWillResignActiveNotification. But it isn't good for me. Cause my project is about the map tool so that it's possible running in the background. The method will be no used.
Related
I would like to be able to tell Siri "Hey Siri, play [app name]" for my radio app, and have it play a default station. What are the basic steps to achieve this? I'm not really looking for a Siri Shortcut per se, but built in "play" functionality. Is this possible?
You can achieve the following with Swift.
However, without any coding, Hey Siri, open [App Name] is possible automatically.
To add custom functionalities such as play a default station, please refer to this link
I want to control my BLE Device with the help of Siri. Like "Fan On" or "Fan Off". So, Is that possible with the help of Siri Shortcuts?
Or is there any alternative way to Contorl BLE Device Fan with Siri.
I think if I am able to change a value of variable through Siri Shortcut then I can do this.
I am now able to switch to On or Off my BLE Device Fan with the help of Siri Shortcuts. I just needed to to do one thing that I missed before: to pass the complete class to Siri Shortcuts Intent.
When I invoked Siri and said my own phrase, then Siri will execute the complete class code and off my device fan.
The main thing that I missed is Pass the complete class to Siri Intent rather than passing only specific section of code or function.
I'm trying to create an INIntent to be set up with the new iOS Shortcuts app in iOS 12. I have read the documentation and watched the apple video about it.
I have managed to set everything up and the shortcuts work well, however I can’t seem to figure out how to make customizable options that the user can edit when setting up the shortcut. An example of this would be how the Calendar app’s shortcuts are set up:
Notice the options for Get, Add Filter, Sort by, etc..
I know I can add parameters to the intents in the Intents.intentdefeniton file, but those parameters needs to be set from the app itself before the interaction is donated to the iOS system via SiriKit.
Regardless of what I do the Intent just shows up empty without options.
Any help is appreciated!
I am sorry to bring you bad news, but there is no way to do that. The apps that appear there (like Trello, Overcast, Pocket, etc...) were already supported by Workflow.app before Shortcuts.app was released.
You can try to work around it by calling URL Schemes directly but it might not be the solution you are after.
I think you need to create an Intents UI Extension for this.
https://developer.apple.com/documentation/sirikit/creating_an_intents_ui_extension
Could somebody tell me, how can I find out programatically the state of settings, for example if "Send as SMS" is enabled in Messages application? I know how to programatically open this part of settings but I just want actual value.(I want to find out, if user can send sms or just iMessage to iPhone users)
Thanks a lot!
I want to trigger iPhone's home button long press event to open Siri from my application. How it is possible? Is there any way to do so using programming or Bluetooth HID protocol?
Accessing Siri from your code is not possible if you want to submit your app to the AppStore, but if you're not looking to do that, have a look at this:
StackOverflow
About the HID protocol:
I don't think so, but I would not rely on this information.
From the App Store guidelines (slightly abbreviated):
Apps that alter the behavior of switches on the device will be
rejected
check here for more.
Its not possible. Apple haven't provided access to those API.
Hope we will have it after WWDC 2015 :)