Skip to content

Commit d8ed00a

Browse files
authored
Merge pull request #22 from barbaragomes/master
Dependency List for Android 8 and set Context
2 parents 10ca313 + 39814cb commit d8ed00a

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

android/build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ android {
5656

5757
dependencies {
5858
compile "com.facebook.react:react-native:+"
59+
compile fileTree(dir: 'libs', include: ['*.jar'])
60+
compile 'com.android.support:appcompat-v7:23.2.1'
5961
compile 'ai.api:sdk:2.0.7@aar'
60-
compile 'ai.api:libai:1.4.8'
6162
compile 'com.google.code.gson:gson:2.3'
62-
}
63+
compile 'commons-io:commons-io:2.4'
64+
compile('ai.api:libai:1.4.8') {
65+
exclude module: 'log4j-core'
66+
}
67+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ public void getLanguage(Promise promise) {
101101
@ReactMethod
102102
public void setContextsAsJson(String contextsAsJson) {
103103
Gson gson = new Gson();
104-
contexts = gson.fromJson(contextsAsJson, new TypeToken<List<Entity>>() {
104+
contexts = gson.fromJson(contextsAsJson, new TypeToken<List<AIContext>>() {
105105
}.getType());
106106
}
107107

108108
@ReactMethod
109109
public void setPermanentContextsAsJson(String contextsAsJson) {
110110
Gson gson = new Gson();
111-
permantentContexts = gson.fromJson(contextsAsJson, new TypeToken<List<Entity>>() {
111+
permantentContexts = gson.fromJson(contextsAsJson, new TypeToken<List<AIContext>>() {
112112
}.getType());
113113
}
114114

0 commit comments

Comments
 (0)