Skip to content

Commit e195a0f

Browse files
authored
Update Readme.md
1 parent a2d898e commit e195a0f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Readme.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22
## 如何使用?
33
参考: [示例](app)
44

5+
TBS初始化(在Application中):
6+
```java
7+
QbSdk.initX5Environment(getApplicationContext(), new QbSdk.PreInitCallback() {
8+
@Override
9+
public void onCoreInitFinished() {
10+
Log.d(TAG, "onCoreInitFinished");
11+
}
12+
13+
@Override
14+
public void onViewInitFinished(boolean initResult) {
15+
Log.e(TAG, "onViewInitFinished" + initResult);
16+
}
17+
});
18+
```
19+
20+
查看文件:
21+
```
22+
Uri uri = Uri.fromFile(new File(filePath));
23+
FileViewer.viewFile(context,uri)
24+
```
525

626
## 注意事项
727
1. office文件无法查看(TBS初始化失败),可以查看这个文档:[]()

0 commit comments

Comments
 (0)