The-Three-Little-Pigs-Siri-Proxy
The-Three-Little-Pigs-Siri-Proxy copied to clipboard
Behavior of classes SiriAnswer and SiriAnswerLine on 3G or WIFI
Hi
I just discovered a strange behavior of the classes SiriAnswer and SiriAnswerLine. There are differences in Siri requests via 3G or Wifi.
Normally the code looks like
answer = SiriAnswer.new("Headline", [
SiriAnswerLine.new("Text"),
SiriAnswerLine.new("Another text")
])
But i'd be more flexible if i could write
answer = SiriAnswer.new("Headline", lines=[])
answer.lines << SiriAnswerLine.new("Text")
answer.lines << SiriAnswerLine.new("Another text")
That works fine, but only when im on wifi Without wifi, in the UMTS network Siri shows the headline only without the lines...
i'm wondering why ?! that makes no sense to me :D Has anyone any idea why the flexible way doesn't work on 3G?
Thanks in advance!
What I usually do is this
lines = []
lines << SiriAnswerLine.new("Text")
lines << SiriAnswerLine.new("Another text")
answer = SiriAnswer.new("Title", lines)
It works on both 3G and wifi fine
I'm not sure why yours works different on 3G vs Wifi..maybe Siri handles things differently on wifi bc it can afford to use more data?
What if you tried
answer = SiriAnswer.new
answer.title = "Title"
answer.lines << SiriAnswerLine.new("Text")
answer.lines << SiriAnswerLine.new("Another text")
could assigning the answer.lines array as lines be causing the issue?
Hi you have very good ideas! that could work. Thank you! i'll try it soon