Skip to content

Commit d3033ed

Browse files
committed
switch to react-native-voice on android
1 parent 9ed071f commit d3033ed

10 files changed

Lines changed: 382 additions & 80 deletions

File tree

example/android/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ android {
137137
}
138138

139139
dependencies {
140+
compile project(':react-native-voice')
140141
compile project(':react-native-dialogflow')
141142
compile fileTree(dir: "libs", include: ["*.jar"])
142143
compile "com.android.support:appcompat-v7:23.0.1"

example/android/app/src/main/java/com/dialogflowexample/MainApplication.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import com.facebook.react.ReactApplication;
66
import de.innfactory.apiai.RNApiAiPackage;
7+
import com.wenkesj.voice.VoicePackage;
78
import com.facebook.react.ReactNativeHost;
89
import com.facebook.react.ReactPackage;
910
import com.facebook.react.shell.MainReactPackage;
@@ -24,6 +25,7 @@ public boolean getUseDeveloperSupport() {
2425
protected List<ReactPackage> getPackages() {
2526
return Arrays.<ReactPackage>asList(
2627
new MainReactPackage(),
28+
new VoicePackage(),
2729
new RNApiAiPackage()
2830
);
2931
}

example/android/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
rootProject.name = 'DialogflowExample'
2+
include ':react-native-voice'
3+
project(':react-native-voice').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-voice/android')
24
include ':react-native-dialogflow'
35
project(':react-native-dialogflow').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-dialogflow/android')
46

example/ios/DialogflowExample.xcodeproj/project.pbxproj

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
284F0A8F4AAD4A32A9774DE6 /* libApiAi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 753BB3796769437AAE1A5F9F /* libApiAi.a */; };
4040
1DFE8FAE0FDE4622BC912003 /* ApiAiTests.xctest in Resources */ = {isa = PBXBuildFile; fileRef = 220A0D9D6AA44F3E84A8D5BE /* ApiAiTests.xctest */; };
4141
2F983728248F48EAAF42E623 /* libRNSpeechToTextIos.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE6CFB7DE7BC4F4FAF8C1F13 /* libRNSpeechToTextIos.a */; };
42+
FAF1B87F2F9B4949BC2919B0 /* libVoice.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D48EF5898874065A9E69D0C /* libVoice.a */; };
4243
/* End PBXBuildFile section */
4344

4445
/* Begin PBXContainerItemProxy section */
@@ -293,6 +294,9 @@
293294
220A0D9D6AA44F3E84A8D5BE /* ApiAiTests.xctest */ = {isa = PBXFileReference; name = "ApiAiTests.xctest"; path = "ApiAiTests.xctest"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.cfbundle; explicitFileType = undefined; includeInIndex = 0; };
294295
D12E6E2F53EC49A38DAAC2D0 /* RNSpeechToTextIos.xcodeproj */ = {isa = PBXFileReference; name = "RNSpeechToTextIos.xcodeproj"; path = "../node_modules/react-native-speech-to-text-ios/ios/RNSpeechToTextIos.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
295296
BE6CFB7DE7BC4F4FAF8C1F13 /* libRNSpeechToTextIos.a */ = {isa = PBXFileReference; name = "libRNSpeechToTextIos.a"; path = "libRNSpeechToTextIos.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
297+
D14F153D1B024D8BB7163933 /* Voice.xcodeproj */ = {isa = PBXFileReference; name = "Voice.xcodeproj"; path = "../node_modules/react-native-voice/ios/Voice.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
298+
3D48EF5898874065A9E69D0C /* libVoice.a */ = {isa = PBXFileReference; name = "libVoice.a"; path = "libVoice.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
299+
0DC002F0317E4C4C8316C10E /* Voice.xcodeproj */ = {isa = PBXFileReference; name = "Voice.xcodeproj"; path = "../node_modules/react-native-voice/ios/Voice.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
296300
/* End PBXFileReference section */
297301

298302
/* Begin PBXFrameworksBuildPhase section */
@@ -324,6 +328,7 @@
324328
284F0A8F4AAD4A32A9774DE6 /* libApiAi.a in Frameworks */,
325329
1DFE8FAE0FDE4622BC912003 /* ApiAiTests.xctest in Resources */,
326330
2F983728248F48EAAF42E623 /* libRNSpeechToTextIos.a in Frameworks */,
331+
FAF1B87F2F9B4949BC2919B0 /* libVoice.a in Frameworks */,
327332
);
328333
runOnlyForDeploymentPostprocessing = 0;
329334
};
@@ -503,6 +508,8 @@
503508
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
504509
F1822D62BEFA418D8F798C8D /* ApiAi.xcodeproj */,
505510
D12E6E2F53EC49A38DAAC2D0 /* RNSpeechToTextIos.xcodeproj */,
511+
D14F153D1B024D8BB7163933 /* Voice.xcodeproj */,
512+
0DC002F0317E4C4C8316C10E /* Voice.xcodeproj */,
506513
);
507514
name = Libraries;
508515
sourceTree = "<group>";
@@ -1076,11 +1083,14 @@
10761083
"\"$(SRCROOT)/$(TARGET_NAME)\"",
10771084
"\"$(SRCROOT)/$(TARGET_NAME)\"",
10781085
"\"$(SRCROOT)/$(TARGET_NAME)\"",
1086+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
10791087
);
10801088
HEADER_SEARCH_PATHS = (
10811089
"$(inherited)",
10821090
"$(SRCROOT)\..\node_modules\react-native-dialogflow\ios\ApiAi/**",
10831091
"$(SRCROOT)\..\node_modules\react-native-speech-to-text-ios\ios",
1092+
"$(SRCROOT)\..\node_modules\react-native-voice\ios\Voice",
1093+
"$(SRCROOT)\..\node_modules\react-native-voice\ios\Voice",
10841094
);
10851095
};
10861096
name = Debug;
@@ -1104,11 +1114,14 @@
11041114
"\"$(SRCROOT)/$(TARGET_NAME)\"",
11051115
"\"$(SRCROOT)/$(TARGET_NAME)\"",
11061116
"\"$(SRCROOT)/$(TARGET_NAME)\"",
1117+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
11071118
);
11081119
HEADER_SEARCH_PATHS = (
11091120
"$(inherited)",
11101121
"$(SRCROOT)\..\node_modules\react-native-dialogflow\ios\ApiAi/**",
11111122
"$(SRCROOT)\..\node_modules\react-native-speech-to-text-ios\ios",
1123+
"$(SRCROOT)\..\node_modules\react-native-voice\ios\Voice",
1124+
"$(SRCROOT)\..\node_modules\react-native-voice\ios\Voice",
11121125
);
11131126
};
11141127
name = Release;
@@ -1132,6 +1145,8 @@
11321145
"$(inherited)",
11331146
"$(SRCROOT)\..\node_modules\react-native-dialogflow\ios\ApiAi/**",
11341147
"$(SRCROOT)\..\node_modules\react-native-speech-to-text-ios\ios",
1148+
"$(SRCROOT)\..\node_modules\react-native-voice\ios\Voice",
1149+
"$(SRCROOT)\..\node_modules\react-native-voice\ios\Voice",
11351150
);
11361151
};
11371152
name = Debug;
@@ -1154,6 +1169,8 @@
11541169
"$(inherited)",
11551170
"$(SRCROOT)\..\node_modules\react-native-dialogflow\ios\ApiAi/**",
11561171
"$(SRCROOT)\..\node_modules\react-native-speech-to-text-ios\ios",
1172+
"$(SRCROOT)\..\node_modules\react-native-voice\ios\Voice",
1173+
"$(SRCROOT)\..\node_modules\react-native-voice\ios\Voice",
11571174
);
11581175
};
11591176
name = Release;
@@ -1186,11 +1203,14 @@
11861203
"\"$(SRCROOT)/$(TARGET_NAME)\"",
11871204
"\"$(SRCROOT)/$(TARGET_NAME)\"",
11881205
"\"$(SRCROOT)/$(TARGET_NAME)\"",
1206+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
11891207
);
11901208
HEADER_SEARCH_PATHS = (
11911209
"$(inherited)",
11921210
"$(SRCROOT)\..\node_modules\react-native-dialogflow\ios\ApiAi/**",
11931211
"$(SRCROOT)\..\node_modules\react-native-speech-to-text-ios\ios",
1212+
"$(SRCROOT)\..\node_modules\react-native-voice\ios\Voice",
1213+
"$(SRCROOT)\..\node_modules\react-native-voice\ios\Voice",
11941214
);
11951215
};
11961216
name = Debug;
@@ -1223,11 +1243,14 @@
12231243
"\"$(SRCROOT)/$(TARGET_NAME)\"",
12241244
"\"$(SRCROOT)/$(TARGET_NAME)\"",
12251245
"\"$(SRCROOT)/$(TARGET_NAME)\"",
1246+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
12261247
);
12271248
HEADER_SEARCH_PATHS = (
12281249
"$(inherited)",
12291250
"$(SRCROOT)\..\node_modules\react-native-dialogflow\ios\ApiAi/**",
12301251
"$(SRCROOT)\..\node_modules\react-native-speech-to-text-ios\ios",
1252+
"$(SRCROOT)\..\node_modules\react-native-voice\ios\Voice",
1253+
"$(SRCROOT)\..\node_modules\react-native-voice\ios\Voice",
12311254
);
12321255
};
12331256
name = Release;
@@ -1255,6 +1278,7 @@
12551278
"\"$(SRCROOT)/$(TARGET_NAME)\"",
12561279
"\"$(SRCROOT)/$(TARGET_NAME)\"",
12571280
"\"$(SRCROOT)/$(TARGET_NAME)\"",
1281+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
12581282
);
12591283
};
12601284
name = Debug;
@@ -1282,6 +1306,7 @@
12821306
"\"$(SRCROOT)/$(TARGET_NAME)\"",
12831307
"\"$(SRCROOT)/$(TARGET_NAME)\"",
12841308
"\"$(SRCROOT)/$(TARGET_NAME)\"",
1309+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
12851310
);
12861311
};
12871312
name = Release;

example/package-lock.json

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)