|
@@ -371,8 +371,9 @@ public class MainActivity extends BaseActivity {
|
|
|
// 遍历串口
|
|
|
SerialPortFinder finder = new SerialPortFinder();
|
|
|
String[] allDevicesPath = finder.getAllDevicesPath();
|
|
|
+ String str = String.join(",", allDevicesPath);
|
|
|
// 将结果返回给web页面
|
|
|
- mWebView.loadUrl("javascript:getAllPort('" + Arrays.toString(allDevicesPath) + "')");
|
|
|
+ runOnUiThread(() -> mWebView.loadUrl("javascript:getAllPort('" + str + "')"));
|
|
|
}
|
|
|
|
|
|
@JavascriptInterface
|