{"action":"published","release":{"url":"https://api.github.com/repos/api-ai/api-ai-android-sdk/releases/854595","assets_url":"https://api.github.com/repos/api-ai/api-ai-android-sdk/releases/854595/assets","upload_url":"https://uploads.github.com/repos/api-ai/api-ai-android-sdk/releases/854595/assets{?name}","html_url":"https://github.com/api-ai/api-ai-android-sdk/releases/tag/v1.2.0","id":854595,"tag_name":"v1.2.0","target_commitish":"master","name":"v1.2.0 API.AI Button control","draft":false,"author":{"login":"xVir","id":278221,"avatar_url":"https://avatars.githubusercontent.com/u/278221?v=3","gravatar_id":"","url":"https://api.github.com/users/xVir","html_url":"https://github.com/xVir","followers_url":"https://api.github.com/users/xVir/followers","following_url":"https://api.github.com/users/xVir/following{/other_user}","gists_url":"https://api.github.com/users/xVir/gists{/gist_id}","starred_url":"https://api.github.com/users/xVir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xVir/subscriptions","organizations_url":"https://api.github.com/users/xVir/orgs","repos_url":"https://api.github.com/users/xVir/repos","events_url":"https://api.github.com/users/xVir/events{/privacy}","received_events_url":"https://api.github.com/users/xVir/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2015-01-15T13:07:33Z","published_at":"2015-01-15T13:29:15Z","assets":[],"tarball_url":"https://api.github.com/repos/api-ai/api-ai-android-sdk/tarball/v1.2.0","zipball_url":"https://api.github.com/repos/api-ai/api-ai-android-sdk/zipball/v1.2.0","body":"This release add special button control for really easy service integration. Use this code snippet to add API.AI button to your Activity:\r\n\r\n```xml\r\n<ai.api.ui.AIButton\r\n    android:id=\"@+id/micButton\"\r\n    android:layout_height=\"152dp\"\r\n    android:layout_centerHorizontal=\"true\"\r\n    android:layout_centerVertical=\"true\"\r\n    style=\"@style/Microphone\"\r\n    />\r\n```\r\n\r\nAnd this code snippet to get button ready to action:\r\n\r\n```java\r\nfinal AIConfiguration config = new AIConfiguration(\"ACCESS_TOKEN\",\r\n    \"SUBSCRIPTION_KEY\", \r\n    AIConfiguration.SupportedLanguages.English,\r\n    AIConfiguration.RecognitionEngine.System);\r\n\r\naiButton = (AIButton) findViewById(R.id.micButton);\r\n\r\naiButton.initialize(config);\r\naiButton.setResultsListener(this);\r\n```\r\n\r\n(don't forget to implement ```AIButton.AIButtonListener``` of course ;)\r\n\r\nSee [sample app](https://github.com/api-ai/api-ai-android-sdk/tree/ad07cb4c4e617ff41dcf2e7a9fae1ef462dac259/apiAISampleApp) for more details.\r\n\r\n**Attention**:\r\n* Enumeration item *RecognitionEngine.Google* now deprecated. Use *RecognitionEngine.System* instead.\r\n* Library dependency now looks like:\r\n\r\n    ```\r\n    compile 'ai.api:sdk:1.2.0@aar'\r\n    ```\r\n\r\n    Also you need to add third party dependencies:\r\n\r\n    ```\r\n    compile 'com.android.support:appcompat-v7:21.0.3'\r\n    compile 'com.google.code.gson:gson:2.3'\r\n    compile 'commons-io:commons-io:2.4'\r\n    ```"}}