|
@@ -149,7 +149,7 @@ public class MainActivity extends BaseActivity {
|
|
|
private boolean cameraIsOpening = false;
|
|
|
private BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
|
|
|
private KProgressHUD progressHUD2;
|
|
|
- int netWorkType = SPUtils.getInt(Constants.NETWORK_TYPE);
|
|
|
+ int netWorkType = -1;
|
|
|
NetworkUtil networkUtil;
|
|
|
long lastConnectTime = 0;
|
|
|
String networkTestUrl = "https://clouddevice.qingyaokeji.com/api/androidVersion";
|
|
@@ -398,7 +398,7 @@ public class MainActivity extends BaseActivity {
|
|
|
Log.e("------->","-------->"+UserCache.getSerialName());
|
|
|
}
|
|
|
// -------------------------------------WebInterface相关方法开始----------------------------
|
|
|
- String mUrl = "https://dwytb.qingyaokeji.com/index.html#/";
|
|
|
+ String mUrl = "http://192.168.0.133:8082";
|
|
|
private void checkNet() {
|
|
|
if (!MyTools.isNetworkAvailable(getApplicationContext())) {
|
|
|
ll_nonet.setVisibility(View.VISIBLE);
|
|
@@ -426,6 +426,7 @@ public class MainActivity extends BaseActivity {
|
|
|
@JavascriptInterface
|
|
|
public void swiftNetwork() {
|
|
|
try {
|
|
|
+ Log.e(TAG, "swiftNetwork");
|
|
|
runOnUiThread(() -> {
|
|
|
toSwiftNetwork();
|
|
|
});
|
|
@@ -1979,6 +1980,7 @@ public class MainActivity extends BaseActivity {
|
|
|
}
|
|
|
|
|
|
private void initNetwork() {
|
|
|
+ netWorkType = SPUtils.getInt(Constants.NETWORK_TYPE);
|
|
|
// 查询上次连接成功的网络
|
|
|
if(netWorkType <= 0) {
|
|
|
// 之前没有连接成功过
|