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

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

ResponseItems automated sorting after building a response #36

Open zonder129 opened 4 years ago

zonder129 commented 4 years ago

There is a requirement of Action on Google that richResponse must have SimpleResponse as first item of an Items array.

But in the app you can provide different way to implement this array and there is no way to sort it manually, because that property is internal:

internal var responseItems: MutableList<RichResponseItem> = ArrayList()

So you have to create your fulfillment logic in the certain way, which is not really great. It would be nice if after building response there was a sorting to set the SimpleResponse as a first response as it is in requirements.