The-Three-Little-Pigs-Siri-Proxy icon indicating copy to clipboard operation
The-Three-Little-Pigs-Siri-Proxy copied to clipboard

Behavior of classes SiriAnswer and SiriAnswerLine on 3G or WIFI

Open Raggyx opened this issue 11 years ago • 3 comments

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!

Raggyx avatar Aug 23 '12 23:08 Raggyx

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?

Ponyboy47 avatar Sep 13 '12 21:09 Ponyboy47

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?

Ponyboy47 avatar Sep 14 '12 19:09 Ponyboy47

Hi you have very good ideas! that could work. Thank you! i'll try it soon

Raggyx avatar Sep 19 '12 10:09 Raggyx