对接腾讯tbs查阅文件打不开,x5内核也配置好了,问题在加载文件完成后文件打开失败。原因:
Bundle bundle = new Bundle();
bundle.putString("tempPath", tempPath);
bundle.putString("filePath", fileName);
boolean result = tbsReaderView.preOpen(FileUtils.getFileType(fileName), false);
Log.e("print", "查看文档---" + result);
if (result) {
tbsReaderView.openFile(bundle);
}
tempPath:传递路径不带文件名。例:C:\Users\administrator1/
filePath: 传递路径带文件名。例:C:\Users\administrator1/test.txt