actions-on-google / actions-on-google-java

Java/Kotlin library for Actions on Google
Apache License 2.0
286 stars 39 forks source link

listSelect Issue #25

Closed cbeaujoin closed 5 years ago

cbeaujoin commented 5 years ago

I have an issue with action_on_google (for java) and listSelect

Here it is the following response :

{
  "fulfillmentMessages": [
    {
      "text": {
        "text": [
          "Quel modèle souhaitez vous essayer ?"
        ]
      }
    },
    {
      "card": {
        "buttons": [
          {
            "postback": "3",
            "text": "A1"
          }
        ],
        "imageUri": "https://v5vr71p4qu4bsqoc.khrqkfqsdjw4wrbz.v1.p.beameio.net/bot/testdrive/1/3/photo",
        "subtitle": "Top niveau",
        "title": "Audi A1"
      }
    },
    {
      "card": {
        "buttons": [
          {
            "postback": "1",
            "text": "A7"
          }
        ],
        "imageUri": "https://v5vr71p4qu4bsqoc.khrqkfqsdjw4wrbz.v1.p.beameio.net/bot/testdrive/1/1/photo",
        "subtitle": "Mega niveau",
        "title": "Audi A7"
      }
    },
    {
      "card": {
        "buttons": [
          {
            "postback": "2",
            "text": "E-TRON"
          }
        ],
        "imageUri": "https://v5vr71p4qu4bsqoc.khrqkfqsdjw4wrbz.v1.p.beameio.net/bot/testdrive/1/2/photo",
        "subtitle": "Top Elec",
        "title": "Audi E-TRON"
      }
    }
  ],
  "fulfillmentText": "Quel modèle souhaitez vous essayer ?",
  "outputContexts": [
    {
      "lifespanCount": 99,
      "name": "projects/chainly-automotive-glytsi/agent/sessions/ABwppHHHCQcknDaavS19UW6wZaNy95LRPvSz_7actIdFNo6aE5CIx3fEKXW4KiB4MOaZSWutved52wWCt9SWkfFQZWK6nuOo6w/contexts/_actions_on_google",
      "parameters": {
        "data": "{}"
      }
    }
  ],
  "payload": {
    "google": {
      "expectUserResponse": true,
      "richResponse": {
        "items": [
          {
            "simpleResponse": {
              "textToSpeech": "Quel modèle souhaitez vous essayer ?"
            }
          }
        ]
      },
      "isSsml": false,
      "systemIntent": {
        "intent": "actions.intent.OPTION",
        "data": {
          "listSelect": {
            "items": [
              {
                "description": "Top niveau",
                "image": {
                  "accessibilityText": "A1",
                  "url": "https://v5vr71p4qu4bsqoc.khrqkfqsdjw4wrbz.v1.p.beameio.net/bot/testdrive/1/3/photo"
                },
                "optionInfo": {
                  "key": "3",
                  "synonyms": [
                    "A1",
                    "Audi A1"
                  ]
                },
                "title": "Audi A1"
              },
              {
                "description": "Mega niveau",
                "image": {
                  "accessibilityText": "A7",
                  "url": "https://v5vr71p4qu4bsqoc.khrqkfqsdjw4wrbz.v1.p.beameio.net/bot/testdrive/1/1/photo"
                },
                "optionInfo": {
                  "key": "1",
                  "synonyms": [
                    "A7",
                    "Audi A7"
                  ]
                },
                "title": "Audi A7"
              },
              {
                "description": "Top Elec",
                "image": {
                  "accessibilityText": "E-TRON",
                  "url": "https://v5vr71p4qu4bsqoc.khrqkfqsdjw4wrbz.v1.p.beameio.net/bot/testdrive/1/2/photo"
                },
                "optionInfo": {
                  "key": "2",
                  "synonyms": [
                    "E-TRON",
                    "Audi E-TRON"
                  ]
                },
                "title": "Audi E-TRON"
              }
            ],
            "title": "Title list"
          },
          "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec"
        }
      },
      "userStorage": "{\"data\":{}}"
    }
  }
}

The fullfilmentMessage works fine with FB and other text based messenger, but the counterpart with google assistant just display the SimpleResponse and does not display the listSelect. The log does not provides any error.