|
@@ -4,6 +4,7 @@ import android.content.Intent;
|
|
import android.net.Uri;
|
|
import android.net.Uri;
|
|
import android.os.Handler;
|
|
import android.os.Handler;
|
|
import android.text.TextUtils;
|
|
import android.text.TextUtils;
|
|
|
|
+import android.util.Log;
|
|
import android.view.LayoutInflater;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.View;
|
|
import android.view.WindowManager;
|
|
import android.view.WindowManager;
|
|
@@ -13,6 +14,7 @@ import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import androidx.annotation.Nullable;
|
|
|
|
|
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
|
|
|
+import com.cooleshow.base.common.WebConstants;
|
|
import com.cooleshow.base.constanst.Constants;
|
|
import com.cooleshow.base.constanst.Constants;
|
|
import com.cooleshow.base.router.RouterPath;
|
|
import com.cooleshow.base.router.RouterPath;
|
|
import com.cooleshow.base.rx.BaseObserver;
|
|
import com.cooleshow.base.rx.BaseObserver;
|
|
@@ -78,10 +80,15 @@ public class AccompanyActivity extends BaseMVPActivity<ActivityAccompanyBinding,
|
|
|
|
|
|
@Override
|
|
@Override
|
|
protected void initView() {
|
|
protected void initView() {
|
|
- camera=viewBinding.camera;
|
|
|
|
- fl_webview=viewBinding.flWebview;
|
|
|
|
|
|
+ camera = viewBinding.camera;
|
|
|
|
+ fl_webview = viewBinding.flWebview;
|
|
Intent intent = getIntent();
|
|
Intent intent = getIntent();
|
|
- String url = intent.getStringExtra("url");
|
|
|
|
|
|
+ String url = intent.getStringExtra(WebConstants.WEB_URL);
|
|
|
|
+ if (TextUtils.isEmpty(url)) {
|
|
|
|
+ finish();
|
|
|
|
+ Log.i("AccompanyActivity", "url can not null");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
|
|
int orientation = intent.getIntExtra("orientation", -1);
|
|
int orientation = intent.getIntExtra("orientation", -1);
|
|
boolean isOpenLight = intent.getBooleanExtra("isOpenLight", false);
|
|
boolean isOpenLight = intent.getBooleanExtra("isOpenLight", false);
|
|
@@ -200,7 +207,7 @@ public class AccompanyActivity extends BaseMVPActivity<ActivityAccompanyBinding,
|
|
FileUtils.deleteFile(recordVideFilePath);
|
|
FileUtils.deleteFile(recordVideFilePath);
|
|
}
|
|
}
|
|
String bucket = WebParamsHelper.getParams(jsonObject, "bucket");
|
|
String bucket = WebParamsHelper.getParams(jsonObject, "bucket");
|
|
- UploadHelper uploadHelper = new UploadHelper(AccompanyActivity.this,bucket);
|
|
|
|
|
|
+ UploadHelper uploadHelper = new UploadHelper(AccompanyActivity.this, bucket);
|
|
uploadHelper.uploadFile(file);
|
|
uploadHelper.uploadFile(file);
|
|
uploadHelper.setUpLoadCallBack(new UploadHelper.UpLoadCallBack() {
|
|
uploadHelper.setUpLoadCallBack(new UploadHelper.UpLoadCallBack() {
|
|
@Override
|
|
@Override
|
|
@@ -293,7 +300,6 @@ public class AccompanyActivity extends BaseMVPActivity<ActivityAccompanyBinding,
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
protected void onResume() {
|
|
protected void onResume() {
|
|
super.onResume();
|
|
super.onResume();
|
|
@@ -331,8 +337,8 @@ public class AccompanyActivity extends BaseMVPActivity<ActivityAccompanyBinding,
|
|
} catch (JSONException e) {
|
|
} catch (JSONException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
- }else if (requestCode == 1000) {
|
|
|
|
- if (data != null) {
|
|
|
|
|
|
+ } else if (requestCode == 1000) {
|
|
|
|
+ if (data != null) {
|
|
try {
|
|
try {
|
|
String filePath = data.getStringExtra("filePath");
|
|
String filePath = data.getStringExtra("filePath");
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
@@ -352,7 +358,7 @@ public class AccompanyActivity extends BaseMVPActivity<ActivityAccompanyBinding,
|
|
}
|
|
}
|
|
} else if (requestCode == 1011) {
|
|
} else if (requestCode == 1011) {
|
|
String selectAddress = data.getStringExtra("selectAddress");
|
|
String selectAddress = data.getStringExtra("selectAddress");
|
|
- if (null!=accompanyFragment){
|
|
|
|
|
|
+ if (null != accompanyFragment) {
|
|
accompanyFragment.selectAddress(selectAddress);
|
|
accompanyFragment.selectAddress(selectAddress);
|
|
}
|
|
}
|
|
}
|
|
}
|