Sunday, May 1, 2016

VoiceKit for Android update - version 2.1.424

We've just released a new version of VoiceKit for Android - 2.1.424.

  1. Return EvaResult from the applicative callbacks -
    This version allows returning a custom reply from the applicative callbacks, thus allowing the application to modify the text spoken or displayed by Eva.
    This allows for new types of integrations, for example - allowing the application to answer questions asked by the user.
  2. Example App -
    the SDK is now bundled with a simple example app, featuring the different applicative interfaces and different return values.

We've also started using the artifact repository.  This allows the developers to setup a specific version in the build.gradle file or use the latest version - and Gradle will handle fetching the needed dependencies.

To use it follow these two steps:

  1. Add repository:
    In your root build.gradle at the end of the allprojects repositories:
    maven { url "" }
  2. To  your app build.gradle dependencies add one of the following:
    compile 'com.github.evature:android:2.1.424'

    // or for the latest backwards compatible version:
    compile 'com.github.evature:android:2.0.+'  

    // or for the latest and greatest version:
    compile 'com.github.evature:android:master-SNAPSHOT'   

Note this version (2.1.+)  is NOT backwards compatible. 
However, it should be a very small effort to update the code to compile with the new version.

The non compatible changes include:
  1. App interfaces are are now prefixed with "Eva" (eg. EvaHotelSearch instead of HotelSearch).
    Since Java does not allow import aliasing, this will eliminate the problem of having similar named classes in the app.
  2. The different fields in the Eva classes are now consistently camel case (as per Java coding standards).
  3. App search interface function parameters are slightly different - instead of passing many parameters to the search function, an "attributes" object is passed which contains different attributes.
    eg.  instead of using the "minStars" parameter use "attributes.minStars".
  4. The app interface functions now return an EvaResult class and are not void functions. Simply return null for the default behaviour.

For any questions or requests, please don't hesitate to ask.

No comments:

Post a Comment