-
Notifications
You must be signed in to change notification settings - Fork 343
Launch IOS Application after handling request #557
Comments
Someone was successfully able to do just that using URL methods. https://github.com/aecom/siriproxy-url |
Wow, thank you for your extremely quick response ... I'm currently coding my siriproxy and will incorporate your great advice!! |
I haven't been able to find the Tivo app URL scheme, but I would think it exists. |
looks like the TiVo app URL scheme is simply |
Actually tried tivo:// and it fails ... some googling uncovered I'm currently writing a generic App launcher (mainly to learn more Ruby) On Sun, Aug 11, 2013 at 2:24 AM, Elvis notifications@github.com wrote:
|
Just learning Ruby/SiriProxy this weekend. I wanted to say "Listen to Pandora in Bedroom" then have Siri control my Whole house Audio, configuring Input (Pandora) to Outputs (Bedroom) then launch a control app for the input (Pandora) if applicable ... After much reading, decided to post this out in case it is useful for anyone else ... Following code will launch an arbitrary Application ... Parameters are passed in at run time, so you can define your Apps to launch in a Hash in config.yml and pass it into your plugin. It requires forcing Siri to browse a page (that I dynamically create) so you'll need to install Apache and have it writable by siriproxy user. Thanks to: Hope this helps someone! class OpenLink < SiriObject
def initialize(ref="")
super("OpenLink", "com.apple.ace.assistant")
self.ref = ref
end
end
def launch(appName, baseUrl, appUrl)
# Create a URL redirect file to launch App in current host's Apache dir (must be writable by siriproxy user!)
File.open("/var/www/" + appName + ".html", "w") do |file|
file.puts "<html><head><title>IU Webmaster redirect</title> <META http-equiv='refresh' content='0;URL=#{appUrl}'> </head> </html>"
end
fullUrl = baseUrl + appName + '.html'
add_property_to_class(OpenLink, :ref)
sleep (4)
view = OpenLink.new(fullUrl.gsub("//",""))
send_object view
end
# Now to call our function
appName = 'remote' # Anything you want to name it
baseUrl= 'http://192.168.0.55/' # Of your siriproxy server running Apache (siriproxy must be able to write to /var/www)
appUrl = 'remote://' # Lookup appUrl here: http://applookup.com # fixed broken link
# This will launch your App
launch(appName, baseUrl, appUrl) |
Nice work. I suggest you publish your plugin on GitHub https://github.com/plamoni/SiriProxy/wiki/Plugin-Developer-Guide#publishing-your-plugin-for-others-to-install Or post your method with the other developer. https://github.com/aecom/siriproxy-url This will make it easier for others to adopt. |
I've just got SiriProxy up/working and love it, I'm new to ruby but wrote an application to control my HDMI Matrix switch with a command like:
Watch "TiVo" in "Bedroom"
I would like to automatically launch the TiVo Application (or other ones dependent on what device user wants to watch)
I know Siri can Launch ... Is this possible for SiriProxy to do the same? If so can you provide example Ruby code? Thanks!
The text was updated successfully, but these errors were encountered: