File tree Expand file tree Collapse file tree 2 files changed +18
-21
lines changed Expand file tree Collapse file tree 2 files changed +18
-21
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ react-native link
17
17
2 . 替换 SDK 文件:
18
18
1 . 使用下载 Android SDK 的 ` Android_voice_xxxx_xxxxxxxx/libs ` 文件夹替换 ` Example/node_modules/react-native-speech-iflytek/android/libs ` 文件夹;
19
19
2 . 使用下载 iOS SDK 的 ` iOS_voice_xxxx_xxxxxxxx/libs ` 文件夹替换 ` Example/node_modules/react-native-speech-iflytek/ios/libs ` 文件夹。
20
+
20
21
3 . iOS 平台还需手动添加部分依赖库:
21
22
1 . 在 XCode 中打开 ` Example/ios/YourProject.xcodeproj ` ;
22
23
2 . 将讯飞框架文件 ` Example/node_modules/react-native-speech-iflytek/ios/libs/iflyMSC.framework ` 拖入 Project navigator 的 ` Frameworks ` 下,注意选择 ` Copy items if needed ` ;
@@ -32,7 +33,23 @@ react-native link
32
33
- UIKit.framework
33
34
- Foundation.framework
34
35
- CoreGraphics.framework
35
-
36
+
37
+ 4.android平台权限
38
+ ```
39
+ <uses-permission android:name="android.permission.INTERNET" />
40
+ <uses-permission android:name="android.permission.RECORD_AUDIO" />
41
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
42
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
43
+ <!--读取网络信息状态 -->
44
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
45
+ <!--获取当前wifi状态 -->
46
+ <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
47
+ <!--允许程序改变网络连接状态 -->
48
+ <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
49
+ <!--读取手机信息权限 -->
50
+ <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
51
+ <uses-permission android:name="android.permission.WRITE_SETTINGS" />
52
+ ```
36
53
## Usage
37
54
(详见 Example)引入包:
38
55
```
Original file line number Diff line number Diff line change 1
1
<manifest xmlns : android =" http://schemas.android.com/apk/res/android"
2
2
3
3
package =" com.zphhhhh.speech" >
4
-
5
- <uses-permission android : name =" android.permission.INTERNET" />
6
- <uses-permission android : name =" android.permission.RECORD_AUDIO" />
7
- <uses-permission android : name =" android.permission.WRITE_EXTERNAL_STORAGE" />
8
- <uses-permission android : name =" android.permission.READ_EXTERNAL_STORAGE" />
9
- <!-- 读取网络信息状态 -->
10
- <uses-permission android : name =" android.permission.ACCESS_NETWORK_STATE" />
11
- <!-- 获取当前wifi状态 -->
12
- <uses-permission android : name =" android.permission.ACCESS_WIFI_STATE" />
13
- <!-- 允许程序改变网络连接状态 -->
14
- <uses-permission android : name =" android.permission.CHANGE_NETWORK_STATE" />
15
- <!-- 读取手机信息权限 -->
16
- <uses-permission android : name =" android.permission.READ_PHONE_STATE" />
17
- <uses-permission android : name =" android.permission.WRITE_SETTINGS" />
18
-
19
- <application android : allowBackup =" true" android : label =" @string/app_name"
20
- android : supportsRtl =" true" >
21
-
22
- </application >
23
-
24
4
</manifest >
You can’t perform that action at this time.
0 commit comments