Skip to content

Commit 86e768a

Browse files
author
spoeck
committed
fix: return same response as on ios
1 parent 0cb4134 commit 86e768a

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

android/src/main/java/de/innfactory/apiai/RNApiAiModule.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,10 @@ public void run() {
161161
@Override
162162
public void onResult(AIResponse response) {
163163

164-
final Result result = response.getResult();
165-
166164
if (onResultCallback != null) {
167165
Gson gson = new Gson();
168166
try {
169-
onResultCallback.invoke(gson.toJson(result));
167+
onResultCallback.invoke(gson.toJson(response));
170168
} catch (Exception e) {
171169
Log.e(TAG, e.getMessage(), e);
172170
}

example/index.android.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default class App extends Component {
2323
console.log(ApiAi);
2424

2525
ApiAi.setConfiguration(
26-
"INSERT_YOUR_CLIENT_ACCESS_TOKEN_HERE", ApiAi.LANG_GERMAN
26+
"57b6ce865e6e4b138a74a88cfd8bc526", ApiAi.LANG_GERMAN
2727
);
2828

2929

@@ -87,6 +87,7 @@ export default class App extends Component {
8787
});
8888

8989
ApiAi.startListening(result => {
90+
console.log(result);
9091
this.setState({result: result});
9192
}, error => {
9293
this.setState({result: error});

0 commit comments

Comments
 (0)