修改2.17号的bug
This commit is contained in:
parent
be694155e1
commit
4c84731bee
@ -9,8 +9,8 @@ android {
|
|||||||
applicationId "com.navinfo.outdoor"
|
applicationId "com.navinfo.outdoor"
|
||||||
minSdkVersion 22
|
minSdkVersion 22
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 2
|
versionCode 3
|
||||||
versionName "2.0"
|
versionName "3.0"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
lintOptions {
|
lintOptions {
|
||||||
|
@ -114,8 +114,6 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
if (pass_word!=null&&!pass_word.equals("")){
|
if (pass_word!=null&&!pass_word.equals("")){
|
||||||
etLoginPaw.setText(pass_word);
|
etLoginPaw.setText(pass_word);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -315,6 +315,5 @@ public class MainActivity extends BaseActivity {
|
|||||||
Constant.ACCESS_TOKEN= navInfo.getString("access_token", null);;
|
Constant.ACCESS_TOKEN= navInfo.getString("access_token", null);;
|
||||||
HttpInterface.initAppPath(user_id);
|
HttpInterface.initAppPath(user_id);
|
||||||
initPermission();
|
initPermission();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -79,12 +79,13 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
|||||||
private static final CameraLogger LOG = CameraLogger.create("Picture");
|
private static final CameraLogger LOG = CameraLogger.create("Picture");
|
||||||
private CameraView cameraView;
|
private CameraView cameraView;
|
||||||
private String photo_path;
|
private String photo_path;
|
||||||
|
private int oration;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v.getId() == R.id.capture_picture) {
|
if (v.getId() == R.id.capture_picture) {
|
||||||
SystemTTS.getInstance(PhotographActivity.this).playText("11aa");
|
|
||||||
|
|
||||||
cameraView.takePicture();
|
cameraView.takePicture();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -107,6 +108,7 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
|||||||
super.initView();
|
super.initView();
|
||||||
if (getIntent()!=null){
|
if (getIntent()!=null){
|
||||||
photo_path = getIntent().getStringExtra(Constant.INTENT_PHOTO_PATH);
|
photo_path = getIntent().getStringExtra(Constant.INTENT_PHOTO_PATH);
|
||||||
|
oration = getIntent().getIntExtra(Constant.INTENT_VIDEO_OBLATION,-1);
|
||||||
}
|
}
|
||||||
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||||
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
|
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
|
||||||
@ -118,9 +120,11 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
|||||||
@Override
|
@Override
|
||||||
public void onPictureTaken(@NonNull PictureResult result) {
|
public void onPictureTaken(@NonNull PictureResult result) {
|
||||||
super.onPictureTaken(result);
|
super.onPictureTaken(result);
|
||||||
if (Objects.requireNonNull(cameraView.getPictureSize()).getWidth() < cameraView.getPictureSize().getHeight()) {
|
if (oration!=1){
|
||||||
Toast.makeText(PhotographActivity.this, "不允许竖向拍摄...", Toast.LENGTH_SHORT).show();
|
if (Objects.requireNonNull(cameraView.getPictureSize()).getWidth() < cameraView.getPictureSize().getHeight()) {
|
||||||
return;
|
Toast.makeText(PhotographActivity.this, "不允许竖向拍摄...", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
File file = new File(photo_path);
|
File file = new File(photo_path);
|
||||||
result.toFile(file, new FileCallback() {
|
result.toFile(file, new FileCallback() {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
package com.navinfo.outdoor.activity;
|
package com.navinfo.outdoor.activity;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.ActivityInfo;
|
import android.content.pm.ActivityInfo;
|
||||||
@ -13,9 +10,7 @@ import android.graphics.Matrix;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.os.PersistableBundle;
|
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
@ -23,8 +18,12 @@ import android.widget.CheckBox;
|
|||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.github.lazylibrary.util.FileUtils;
|
import com.github.lazylibrary.util.FileUtils;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
@ -35,13 +34,11 @@ import com.navinfo.outdoor.util.Geohash;
|
|||||||
import com.navinfo.outdoor.util.GeometryTools;
|
import com.navinfo.outdoor.util.GeometryTools;
|
||||||
import com.navinfo.outdoor.util.MyTecentLocationSource;
|
import com.navinfo.outdoor.util.MyTecentLocationSource;
|
||||||
import com.navinfo.outdoor.util.SystemTTS;
|
import com.navinfo.outdoor.util.SystemTTS;
|
||||||
import com.otaliastudios.cameraview.CameraException;
|
|
||||||
import com.otaliastudios.cameraview.CameraListener;
|
import com.otaliastudios.cameraview.CameraListener;
|
||||||
import com.otaliastudios.cameraview.CameraLogger;
|
import com.otaliastudios.cameraview.CameraLogger;
|
||||||
import com.otaliastudios.cameraview.CameraView;
|
import com.otaliastudios.cameraview.CameraView;
|
||||||
import com.otaliastudios.cameraview.FileCallback;
|
import com.otaliastudios.cameraview.FileCallback;
|
||||||
import com.otaliastudios.cameraview.PictureResult;
|
import com.otaliastudios.cameraview.PictureResult;
|
||||||
import com.otaliastudios.cameraview.VideoResult;
|
|
||||||
import com.otaliastudios.cameraview.controls.Mode;
|
import com.otaliastudios.cameraview.controls.Mode;
|
||||||
import com.tencent.map.geolocation.TencentLocation;
|
import com.tencent.map.geolocation.TencentLocation;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.CameraUpdate;
|
import com.tencent.tencentmap.mapsdk.maps.CameraUpdate;
|
||||||
@ -64,7 +61,6 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@ -89,12 +85,13 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
private Polyline polyline;
|
private Polyline polyline;
|
||||||
private String finalVideoPath; // 摄像后最终保存的文件名
|
private String finalVideoPath; // 摄像后最终保存的文件名
|
||||||
private ViewGroup layerChange; // 切换地图和相机的父控件
|
private ViewGroup layerChange; // 切换地图和相机的父控件
|
||||||
private CheckBox capturePicture, cbMapType;//拍照
|
private CheckBox capturePicture,cbMapType;//拍照
|
||||||
private boolean isMapSlide = false;
|
private boolean isMapSlide = false;
|
||||||
private SimpleDateFormat formatter;
|
private SimpleDateFormat formatter;
|
||||||
private File paperFile;
|
private File paperFile;
|
||||||
private int poi_video_type;
|
private int poi_video_type;
|
||||||
private ImageView ivZoomAdd, ivZoomDel, ivLocation;
|
private ImageView ivZoomAdd, ivZoomDel, ivLocation;
|
||||||
|
private TencentLocation oldCurrentLocation = null;
|
||||||
private Handler handler = new Handler(new Handler.Callback() {
|
private Handler handler = new Handler(new Handler.Callback() {
|
||||||
@Override
|
@Override
|
||||||
public boolean handleMessage(@NonNull Message msg) {
|
public boolean handleMessage(@NonNull Message msg) {
|
||||||
@ -117,9 +114,9 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
private Timer timer;
|
private Timer timer;
|
||||||
private TimerTask timerTask;
|
private TimerTask timerTask;
|
||||||
private int videoIndex = -1;
|
private int videoIndex = -1;
|
||||||
private int oration;
|
private int oration;
|
||||||
private ImageView ivPicImage;
|
private ImageView ivPicImage;
|
||||||
private SystemTTS instance;
|
private SystemTTS systemTTS;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
@ -135,7 +132,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
layerChange = findViewById(R.id.layer_change);
|
layerChange = findViewById(R.id.layer_change);
|
||||||
if (getIntent() != null) {
|
if (getIntent() != null) {
|
||||||
poiEntity = (PoiEntity) getIntent().getSerializableExtra("poiEntity");
|
poiEntity = (PoiEntity) getIntent().getSerializableExtra("poiEntity");
|
||||||
poi_video_type = getIntent().getIntExtra(Constant.INTENT_POI_VIDEO_TYPE,-1);
|
poi_video_type = getIntent().getIntExtra(Constant.INTENT_POI_VIDEO_TYPE, -1);
|
||||||
oration = getIntent().getIntExtra(Constant.INTENT_VIDEO_OBLATION, -1);
|
oration = getIntent().getIntExtra(Constant.INTENT_VIDEO_OBLATION, -1);
|
||||||
finalVideoPath = getIntent().getStringExtra(Constant.INTENT_JPG_PATH);
|
finalVideoPath = getIntent().getStringExtra(Constant.INTENT_JPG_PATH);
|
||||||
assert finalVideoPath != null;
|
assert finalVideoPath != null;
|
||||||
@ -144,17 +141,17 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
formatter = new SimpleDateFormat("yyyyMMdd HHmmss");
|
formatter = new SimpleDateFormat("yyyyMMdd HHmmss");
|
||||||
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||||
|
systemTTS = SystemTTS.getInstance(PicturesActivity.this);
|
||||||
ivMap = findViewById(R.id.iv_map);
|
ivMap = findViewById(R.id.iv_map);
|
||||||
ivMap.setOnClickListener(this);
|
ivMap.setOnClickListener(this);
|
||||||
ivPicImage = findViewById(R.id.iv_pic);
|
ivPicImage = findViewById(R.id.iv_pic);
|
||||||
if (poi_video_type==1||poi_video_type==2){
|
if (poi_video_type == 1 || poi_video_type == 2) {
|
||||||
ivPicImage.setImageResource(R.mipmap.take_poi_video_arrow);
|
ivPicImage.setImageResource(R.mipmap.take_poi_video_arrow);
|
||||||
}else if (poi_video_type==3){
|
} else if (poi_video_type == 3) {
|
||||||
ivPicImage.setImageResource(R.mipmap.take_pic_arrow);
|
ivPicImage.setImageResource(R.mipmap.take_pic_arrow);
|
||||||
}
|
}
|
||||||
btnSwitch = findViewById(R.id.btn_switch);
|
btnSwitch = findViewById(R.id.btn_switch);
|
||||||
btnSwitch.setOnClickListener(this);
|
btnSwitch.setOnClickListener(this);
|
||||||
|
|
||||||
//相机记录器
|
//相机记录器
|
||||||
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
|
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
|
||||||
ivZoomAdd = findViewById(R.id.iv_zoom_add);
|
ivZoomAdd = findViewById(R.id.iv_zoom_add);
|
||||||
@ -246,7 +243,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".jpg";
|
finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".jpg";
|
||||||
Toast.makeText(PicturesActivity.this, "保存成功:" + (videoIndex + 1), Toast.LENGTH_SHORT).show();
|
Toast.makeText(PicturesActivity.this, "保存成功:" + (videoIndex + 1), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
if (poi_video_type==2){
|
if (poi_video_type == 2) {
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x103;
|
message.what = 0x103;
|
||||||
handler.sendMessage(message);
|
handler.sendMessage(message);
|
||||||
@ -336,10 +333,10 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
case R.id.iv_location://定位:
|
case R.id.iv_location://定位:
|
||||||
if (Constant.currentLocation != null) {
|
if (Constant.currentLocation != null) {
|
||||||
CameraUpdate cameraSigma = CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
CameraUpdate cameraSigma = CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
||||||
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
||||||
tencentMap.getCameraPosition().zoom, //目标缩放级别
|
tencentMap.getCameraPosition().zoom, //目标缩放级别
|
||||||
0, //目标倾斜角[0.0 ~ 45.0] (垂直地图时为0)
|
0, //目标倾斜角[0.0 ~ 45.0] (垂直地图时为0)
|
||||||
0)); //目标旋转角 0~360° (正北方为0)
|
0)); //目标旋转角 0~360° (正北方为0)
|
||||||
tencentMap.animateCamera(cameraSigma);
|
tencentMap.animateCamera(cameraSigma);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -468,6 +465,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
camera.destroy();
|
camera.destroy();
|
||||||
|
systemTTS.stopSpeak();
|
||||||
stopTimer();
|
stopTimer();
|
||||||
if (polyline != null) {
|
if (polyline != null) {
|
||||||
polyline.remove();
|
polyline.remove();
|
||||||
@ -482,7 +480,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onEventMessageMainThread(Message msg) {
|
public void onEventMessageMainThread(Message msg) {
|
||||||
if (msg.what == Constant.EVENT_WHAT_LOCATION_CHANGE) { // 用户位置更新
|
if (msg.what == Constant.EVENT_WHAT_LOCATION_CHANGE) { // 用户位置更新
|
||||||
@ -493,13 +490,12 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
tencentMap.getCameraPosition().zoom, //目标缩放级别
|
tencentMap.getCameraPosition().zoom, //目标缩放级别
|
||||||
0, //目标倾斜角
|
0, //目标倾斜角
|
||||||
tencentLocation.getBearing())); //目标旋转角 0~360° (正北方为0)
|
tencentLocation.getBearing())); //目标旋转角 0~360° (正北方为0)
|
||||||
float speed = tencentLocation.getSpeed();
|
|
||||||
Log.d("TAG", "onEventMessageMainThread: "+speed);
|
|
||||||
tencentMap.animateCamera(cameraSigma);
|
tencentMap.animateCamera(cameraSigma);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
public void initMarkerPaper() {
|
public void initMarkerPaper() {
|
||||||
// 记录当前时间、视频时间、以及当前经纬度信息
|
// 记录当前时间、视频时间、以及当前经纬度信息
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
@ -518,6 +514,37 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
sb.append("\r\n");
|
sb.append("\r\n");
|
||||||
FileUtils.writeFile(paperFile.getAbsolutePath(), sb.toString(), true);
|
FileUtils.writeFile(paperFile.getAbsolutePath(), sb.toString(), true);
|
||||||
|
float speed = Constant.currentLocation.getSpeed();//米/秒
|
||||||
|
if (speed != 0) {
|
||||||
|
float a = (speed * 3600 / 1000);//km/h
|
||||||
|
if (poi_video_type == 1) {
|
||||||
|
if (a > 25) {//25千米/h
|
||||||
|
systemTTS.playText("您已超速");
|
||||||
|
}
|
||||||
|
} else if (poi_video_type == 3) {
|
||||||
|
if (a > 70) {//70千米/h
|
||||||
|
systemTTS.playText("您已超速");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (oldCurrentLocation != null) {
|
||||||
|
LatLng startLatLng = new LatLng(oldCurrentLocation.getLatitude(), oldCurrentLocation.getLongitude()); //旧的坐标,
|
||||||
|
LatLng endLatLng = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude());//新的坐标
|
||||||
|
double geometry = GeometryTools.distanceToDouble(startLatLng, endLatLng);//米
|
||||||
|
if (poi_video_type == 1) {
|
||||||
|
double speeds = ((geometry / 2) * 3600 / 1000);
|
||||||
|
if (speeds > 25) {//25千米/h
|
||||||
|
systemTTS.playText("您已超速");
|
||||||
|
}
|
||||||
|
} else if (poi_video_type == 3) {
|
||||||
|
double speeds = ((geometry / 1.5) * 3600 / 1000);
|
||||||
|
if (speeds > 70) {//70千米/h
|
||||||
|
systemTTS.playText("您已超速");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
oldCurrentLocation = Constant.currentLocation;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initMarker() {
|
public void initMarker() {
|
||||||
@ -546,13 +573,13 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (poi_video_type==2){
|
if (poi_video_type == 2) {
|
||||||
timer.schedule(timerTask, 0);
|
timer.schedule(timerTask, 0);
|
||||||
}else if (poi_video_type==1){
|
} else if (poi_video_type == 1) {
|
||||||
timer.schedule(timerTask, 0, 2000);
|
timer.schedule(timerTask, 0, 2000);
|
||||||
}else if (poi_video_type==3){
|
} else if (poi_video_type == 3) {
|
||||||
timer.schedule(timerTask, 0, 1500);
|
timer.schedule(timerTask, 0, 1500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopTimer() {
|
private void stopTimer() {
|
||||||
|
@ -77,6 +77,9 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
btnAttestation.setOnClickListener(this);
|
btnAttestation.setOnClickListener(this);
|
||||||
Button btnGathering = findViewById(R.id.btn_gathering);
|
Button btnGathering = findViewById(R.id.btn_gathering);
|
||||||
btnGathering.setOnClickListener(this);
|
btnGathering.setOnClickListener(this);
|
||||||
|
if (Constant.ID_NUMBER!=null){
|
||||||
|
btnGathering.setText("已绑定");
|
||||||
|
}
|
||||||
region = findViewById(R.id.region);
|
region = findViewById(R.id.region);
|
||||||
region.setOnClickListener(this);
|
region.setOnClickListener(this);
|
||||||
LinearLayout llRegion = findViewById(R.id.ll_region);
|
LinearLayout llRegion = findViewById(R.id.ll_region);
|
||||||
@ -121,7 +124,6 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
if (Constant.AUDIOTAPES ==-1){
|
if (Constant.AUDIOTAPES ==-1){
|
||||||
Toast.makeText(this, "请先实名认证", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "请先实名认证", Toast.LENGTH_SHORT).show();
|
||||||
}else if (Constant.AUDIOTAPES ==1){//认证通过
|
}else if (Constant.AUDIOTAPES ==1){//认证通过
|
||||||
|
|
||||||
Intent gatheringIntent = new Intent(this, FragmentManagement.class);
|
Intent gatheringIntent = new Intent(this, FragmentManagement.class);
|
||||||
gatheringIntent.putExtra("tag", 24);
|
gatheringIntent.putExtra("tag", 24);
|
||||||
startActivity(gatheringIntent);
|
startActivity(gatheringIntent);
|
||||||
@ -200,8 +202,10 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
Toast.makeText(this, "此功能未开通", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "此功能未开通", Toast.LENGTH_SHORT).show();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void netWork(HttpParams httpParams) {
|
private void netWork(HttpParams httpParams) {
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
|
@ -182,14 +182,11 @@ public class Constant {
|
|||||||
public static final String INTENT_PHOTO_PATH = "INTENT_PHOTO_PATH"; // 拍照界面指定的图片保存位置
|
public static final String INTENT_PHOTO_PATH = "INTENT_PHOTO_PATH"; // 拍照界面指定的图片保存位置
|
||||||
public static final String INTENT_PICTURES_PATH = "INTENT_VIDEO_PATH"; // 拍照界面指定的视频文件保存位置
|
public static final String INTENT_PICTURES_PATH = "INTENT_VIDEO_PATH"; // 拍照界面指定的视频文件保存位置
|
||||||
public static final String INTENT_VIDEO_OBLATION = "INTENT_VIDEO_OBLATION"; // 视频拍摄时屏幕方向 0-强制横屏 其他-任意
|
public static final String INTENT_VIDEO_OBLATION = "INTENT_VIDEO_OBLATION"; // 视频拍摄时屏幕方向 0-强制横屏 其他-任意
|
||||||
|
|
||||||
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
|
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
|
||||||
|
|
||||||
public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重
|
public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重
|
||||||
|
|
||||||
public static TencentMap.OnMarkerClickListener markerClickListener=null;
|
public static TencentMap.OnMarkerClickListener markerClickListener=null;
|
||||||
|
|
||||||
public static final String NAVIN_FO="9.15";//版本
|
public static final String NAVIN_FO="9.17";//版本
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 联系我们的QQ群名称和QQ群号
|
* 联系我们的QQ群名称和QQ群号
|
||||||
|
@ -50,6 +50,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
private ArrayList<ExamBean> examBeans;
|
private ArrayList<ExamBean> examBeans;
|
||||||
private String examId;
|
private String examId;
|
||||||
private Gson gson;
|
private Gson gson;
|
||||||
|
private Button btn;
|
||||||
|
|
||||||
public static CapacityMeasurementFragment newInstance(Bundle bundle) {
|
public static CapacityMeasurementFragment newInstance(Bundle bundle) {
|
||||||
CapacityMeasurementFragment fragment = new CapacityMeasurementFragment();
|
CapacityMeasurementFragment fragment = new CapacityMeasurementFragment();
|
||||||
@ -71,7 +72,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
capacityMeasurementRel.setLayoutManager(new LinearLayoutManager(getActivity()));
|
capacityMeasurementRel.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
capacityMeasureAdapter = new CapacityMeasureAdapter(getActivity());
|
capacityMeasureAdapter = new CapacityMeasureAdapter(getActivity());
|
||||||
capacityMeasurementRel.setAdapter(capacityMeasureAdapter);
|
capacityMeasurementRel.setAdapter(capacityMeasureAdapter);
|
||||||
Button btn = findViewById(R.id.btn);
|
btn = findViewById(R.id.btn);
|
||||||
btn.setOnClickListener(this);
|
btn.setOnClickListener(this);
|
||||||
gson = new Gson();
|
gson = new Gson();
|
||||||
}
|
}
|
||||||
@ -118,7 +119,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
if (baleen != null) {
|
if (baleen != null) {
|
||||||
capacityMeasureAdapter.setMeasureList(baleen);
|
capacityMeasureAdapter.setMeasureList(baleen);
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onSuccess: " + response.toString() );
|
Log.d("TAG", "onSuccess: " + response.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -162,6 +163,8 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
examBeans.add(examBean);
|
examBeans.add(examBean);
|
||||||
}
|
}
|
||||||
initExamSubmit();
|
initExamSubmit();
|
||||||
|
} else {
|
||||||
|
Toast.makeText(getActivity(), "无数据", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -171,25 +174,28 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initExamSubmit() throws JSONException {
|
private void initExamSubmit() throws JSONException {
|
||||||
showLoadingDialog();
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("examId",examId);
|
map.put("examId", examId);
|
||||||
map.put("answerList",examBeans);
|
map.put("answerList", examBeans);
|
||||||
|
|
||||||
String json = gson.toJson(map);
|
String json = gson.toJson(map);
|
||||||
examBeans.clear();
|
examBeans.clear();
|
||||||
OkGo
|
showLoadingDialog();
|
||||||
// 请求方式和请求url
|
OkGoBuilder.getInstance()
|
||||||
.<ExamSubmitBean>post(HttpInterface.EXAM_SUBMIT)
|
.Builder(getActivity())
|
||||||
.upString(json, MediaType.parse("application/json"))
|
.url(HttpInterface.EXAM_SUBMIT)
|
||||||
// 请求的 tag, 主要用于取消对应的请求
|
.cls(ExamSubmitBean.class)
|
||||||
.tag(this)
|
.token(Constant.ACCESS_TOKEN)
|
||||||
.execute(new DialogCallback<ExamSubmitBean>(ExamSubmitBean.class) {
|
.json(json)
|
||||||
|
.postCapacity(new Callback<ExamSubmitBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Response<ExamSubmitBean> response) {
|
public void onSuccess(ExamSubmitBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.code()==200){
|
if (response.getCode() == 200) {
|
||||||
if (response.body().equals("0")) {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (response.getCode().equals("0")) {
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "不通过", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "不通过", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@ -201,23 +207,27 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "通过", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "通过", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}else {
|
|
||||||
Toast.makeText(getActivity(), response.message(), Toast.LENGTH_SHORT).show();
|
} else {
|
||||||
|
Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onSuccess: " + response.toString());
|
Log.d("TAG", "onSuccess: " + response.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Response<ExamSubmitBean> response) {
|
public void onError(Throwable e, int id) {
|
||||||
super.onError(response);
|
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getActivity(), response.message(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + response.message());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -95,16 +95,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
TextView tvName = (TextView) findViewById(R.id.tv_name);
|
TextView tvName = (TextView) findViewById(R.id.tv_name);
|
||||||
etBankNum = (EditText) findViewById(R.id.et_bank_num);
|
etBankNum = (EditText) findViewById(R.id.et_bank_num);
|
||||||
gatheringCamera = (ImageView) findViewById(R.id.gathering_camera);
|
gatheringCamera = (ImageView) findViewById(R.id.gathering_camera);
|
||||||
gatheringCamera.setOnClickListener(this);/*
|
gatheringCamera.setOnClickListener(this);
|
||||||
String bankAccount = navInfo.getString("bankAccount", null);
|
|
||||||
String bank = navInfo.getString("bankName", null);
|
|
||||||
String idNumber = navInfo.getString("idNumber", null);
|
|
||||||
if (bankAccount!=null&&!bankAccount.equals("")&&bank!=null&&!bank.equals("")&&idNumber!=null&&!idNumber.equals("")){
|
|
||||||
etBankNum.setText(idNumber);
|
|
||||||
tvBank.setText(bank);
|
|
||||||
value=bankAccount;
|
|
||||||
btnBank.setText("重新绑定");
|
|
||||||
}*/
|
|
||||||
if (Constant.NAME!=null){
|
if (Constant.NAME!=null){
|
||||||
tvName.setText(Constant.NAME);
|
tvName.setText(Constant.NAME);
|
||||||
}
|
}
|
||||||
@ -173,6 +164,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Intent gatheringNumberIntent = new Intent(getActivity(), PhotographActivity.class);
|
Intent gatheringNumberIntent = new Intent(getActivity(), PhotographActivity.class);
|
||||||
File file = PhotoUtils.showPhotoFile("a", null);
|
File file = PhotoUtils.showPhotoFile("a", null);
|
||||||
gatheringNumberIntent.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath());
|
gatheringNumberIntent.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath());
|
||||||
|
gatheringNumberIntent.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
|
||||||
startActivityForResult(gatheringNumberIntent, 131);
|
startActivityForResult(gatheringNumberIntent, 131);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -225,10 +217,6 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Constant.BACKGROUND =value;
|
Constant.BACKGROUND =value;
|
||||||
Constant.BACKGROUND_NAME=bank;
|
Constant.BACKGROUND_NAME=bank;
|
||||||
Constant.ID_NUMBER = etBankAccount;
|
Constant.ID_NUMBER = etBankAccount;
|
||||||
/*navInfoEditor.putString("bankAccount", value);
|
|
||||||
navInfoEditor.putString("idNumber", etBankAccount);
|
|
||||||
navInfoEditor.putString("bankName",bank);
|
|
||||||
navInfoEditor.commit();*/
|
|
||||||
getActivity().finish();
|
getActivity().finish();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -8,25 +8,20 @@ public class HttpInterface {
|
|||||||
public static final String IP_TEXt = "http://dtxbmaps.navinfo.com/dtxb_test/m4";//测试接口
|
public static final String IP_TEXt = "http://dtxbmaps.navinfo.com/dtxb_test/m4";//测试接口
|
||||||
public static final String TEST_GUIDANCE_IP = "http://172.21.98.90:9999/m4";//引导页完成接口
|
public static final String TEST_GUIDANCE_IP = "http://172.21.98.90:9999/m4";//引导页完成接口
|
||||||
public static final String APKIP = "http://172.23.139.4:8001/";
|
public static final String APKIP = "http://172.23.139.4:8001/";
|
||||||
|
|
||||||
public static final String USER_PATH = "/user/";//我的
|
public static final String USER_PATH = "/user/";//我的
|
||||||
public static final String MSG_LIST_PATH = "/msgList/";//发现
|
public static final String MSG_LIST_PATH = "/msgList/";//发现
|
||||||
public static final String USER_LOGIN_PATH = "/userlogin/";//登录
|
public static final String USER_LOGIN_PATH = "/userlogin/";//登录
|
||||||
public static final String PRICE_PATH = "/price/";//提现
|
public static final String PRICE_PATH = "/price/";//提现
|
||||||
public static final String TASK_PATH = "/task/";//任务
|
public static final String TASK_PATH = "/task/";//任务
|
||||||
/**
|
/* 用户版本升级
|
||||||
* 用户版本升级
|
|
||||||
*/
|
*/
|
||||||
//dtxbmaps.navinfo.com/dtxb/m4/user/appVersion/checkVersion?version=155&operationType=android
|
// dtxbmaps.navinfo.com/dtxb/m4/user/appVersion/checkVersion?version=155&operationType=android
|
||||||
//172.23.139.4:8001/appVersion/checkVersion?version=155&operationType=android version是版本 operationType固定值 安卓 get
|
// 172.23.139.4:8001/appVersion/checkVersion?version=155&operationType=android version是版本 operationType固定值 安卓 get
|
||||||
public static String APP_CHECK_VERSION; //版本升级
|
public static String APP_CHECK_VERSION; //版本升级
|
||||||
|
|
||||||
public static void initAppPath(String userId) {
|
public static void initAppPath(String userId) {
|
||||||
APP_CHECK_VERSION = IP + USER_PATH + "appVersion/" + userId + "/checkVersion"; //版本升级
|
APP_CHECK_VERSION = IP + USER_PATH + "appVersion/" + userId + "/checkVersion"; //版本升级
|
||||||
}
|
}
|
||||||
|
/* 我的
|
||||||
/**
|
|
||||||
* 我的
|
|
||||||
* Path=/m4/user/*
|
* Path=/m4/user/*
|
||||||
*/
|
*/
|
||||||
//172.23.139.4:8001/m4/user/update
|
//172.23.139.4:8001/m4/user/update
|
||||||
@ -41,8 +36,7 @@ public class HttpInterface {
|
|||||||
public static String USER_DETAIL_BY_USER_ID; //获取用户信息
|
public static String USER_DETAIL_BY_USER_ID; //获取用户信息
|
||||||
//http://172.21.98.90:9999/m4/user/userGuide/1/insertUserGuide
|
//http://172.21.98.90:9999/m4/user/userGuide/1/insertUserGuide
|
||||||
public static String INSERT_USER_GUIDE;//引导页完成接口
|
public static String INSERT_USER_GUIDE;//引导页完成接口
|
||||||
/**
|
/*发现
|
||||||
* 发现
|
|
||||||
* Path=/m4/msgList/**
|
* Path=/m4/msgList/**
|
||||||
*/
|
*/
|
||||||
// public static String IP1 = "http://dtxbmaps.navinfo.com/dtxb/msg/";
|
// public static String IP1 = "http://dtxbmaps.navinfo.com/dtxb/msg/";
|
||||||
@ -56,8 +50,7 @@ public class HttpInterface {
|
|||||||
public static String EXAM_CONTENT;//发现 -能力测评获取试题接口
|
public static String EXAM_CONTENT;//发现 -能力测评获取试题接口
|
||||||
//http://172.23.139.4:8002/findAndMessage/1/submitExam
|
//http://172.23.139.4:8002/findAndMessage/1/submitExam
|
||||||
public static String EXAM_SUBMIT;//发现 -能力测评提交试卷 post
|
public static String EXAM_SUBMIT;//发现 -能力测评提交试卷 post
|
||||||
/**
|
/*登录
|
||||||
* 登录
|
|
||||||
* Path=/m4/userlogin/**
|
* Path=/m4/userlogin/**
|
||||||
*/
|
*/
|
||||||
//http://172.23.139.4:9999/m4/userlogin/oauth/token
|
//http://172.23.139.4:9999/m4/userlogin/oauth/token
|
||||||
@ -68,11 +61,9 @@ public class HttpInterface {
|
|||||||
public static String USER_MESSAGE = IP + USER_PATH + "phone/message";//获取验证码 type 1:注册获取 2:更新
|
public static String USER_MESSAGE = IP + USER_PATH + "phone/message";//获取验证码 type 1:注册获取 2:更新
|
||||||
///m4/user/user/forgetPassword
|
///m4/user/user/forgetPassword
|
||||||
public static String USER_FORGET_PASSWORD = IP + USER_PATH + "user/forgetPassword";//忘记密码
|
public static String USER_FORGET_PASSWORD = IP + USER_PATH + "user/forgetPassword";//忘记密码
|
||||||
|
|
||||||
//Flat
|
//Flat
|
||||||
//dtxbmaps.navinfo.com/dtxb/m4/user/phone/message?mobile=18811794839&type=2
|
//dtxbmaps.navinfo.com/dtxb/m4/user/phone/message?mobile=18811794839&type=2
|
||||||
/**
|
/*提现 金额
|
||||||
* 提现 金额
|
|
||||||
* Path=/m4/price/**
|
* Path=/m4/price/**
|
||||||
*/
|
*/
|
||||||
//http://172.23.139.4:8004/userPrice/1/getPrice
|
//http://172.23.139.4:8004/userPrice/1/getPrice
|
||||||
@ -81,8 +72,7 @@ public class HttpInterface {
|
|||||||
public static String USER_PRICE_EXCHANGE;//我的-财务信息-提现
|
public static String USER_PRICE_EXCHANGE;//我的-财务信息-提现
|
||||||
//dtxbmaps.navinfo.com/dtxb/m4/price/priceExchange/1/getList?datetime=1628647356815
|
//dtxbmaps.navinfo.com/dtxb/m4/price/priceExchange/1/getList?datetime=1628647356815
|
||||||
public static String PRICE_EXCHANGE;//提现记录
|
public static String PRICE_EXCHANGE;//提现记录
|
||||||
/**
|
/*任务
|
||||||
* 任务
|
|
||||||
* Path=/m4/task/**
|
* Path=/m4/task/**
|
||||||
*/
|
*/
|
||||||
///m4/task/task/10/receiveTasks 参数:taskIds
|
///m4/task/task/10/receiveTasks 参数:taskIds
|
||||||
@ -138,8 +128,7 @@ public class HttpInterface {
|
|||||||
public static String MESSAGE_INFO_PUSH;//消息通知
|
public static String MESSAGE_INFO_PUSH;//消息通知
|
||||||
|
|
||||||
public static void initHttpInter(String USERID) {
|
public static void initHttpInter(String USERID) {
|
||||||
/**
|
/* 我的
|
||||||
* 我的
|
|
||||||
* Path=/m4/user/*
|
* Path=/m4/user/*
|
||||||
*/
|
*/
|
||||||
//172.23.139.4:8001/m4/user/update
|
//172.23.139.4:8001/m4/user/update
|
||||||
@ -154,8 +143,7 @@ public class HttpInterface {
|
|||||||
USER_DETAIL_BY_USER_ID = IP + USER_PATH + "user/" + USERID + "/getUserDetailByUserid/" + USERID; //获取用户信息
|
USER_DETAIL_BY_USER_ID = IP + USER_PATH + "user/" + USERID + "/getUserDetailByUserid/" + USERID; //获取用户信息
|
||||||
//http://172.21.98.90:9999/m4/user/userGuide/1/insertUserGuide
|
//http://172.21.98.90:9999/m4/user/userGuide/1/insertUserGuide
|
||||||
INSERT_USER_GUIDE = IP + USER_PATH + "userGuide/" + USERID + "/insertUserGuide";//引导页完成接口
|
INSERT_USER_GUIDE = IP + USER_PATH + "userGuide/" + USERID + "/insertUserGuide";//引导页完成接口
|
||||||
/**
|
/* 发现
|
||||||
* 发现
|
|
||||||
* Path=/m4/msgList/**
|
* Path=/m4/msgList/**
|
||||||
*/
|
*/
|
||||||
// public static String IP1 = "http://dtxbmaps.navinfo.com/dtxb/msg/";
|
// public static String IP1 = "http://dtxbmaps.navinfo.com/dtxb/msg/";
|
||||||
@ -170,8 +158,7 @@ public class HttpInterface {
|
|||||||
//http://172.23.139.4:8002/findAndMessage/1/submitExam
|
//http://172.23.139.4:8002/findAndMessage/1/submitExam
|
||||||
EXAM_SUBMIT = IP + MSG_LIST_PATH + "findAndMessage/" + USERID + "/submitExam";//发现 -能力测评提交试卷 post
|
EXAM_SUBMIT = IP + MSG_LIST_PATH + "findAndMessage/" + USERID + "/submitExam";//发现 -能力测评提交试卷 post
|
||||||
MESSAGE_INFO_PUSH = IP + MSG_LIST_PATH + "InfoPush/" + USERID + "/push";//寻宝-消息通知
|
MESSAGE_INFO_PUSH = IP + MSG_LIST_PATH + "InfoPush/" + USERID + "/push";//寻宝-消息通知
|
||||||
/**
|
/*提现 金额
|
||||||
* 提现 金额
|
|
||||||
* Path=/m4/price/**
|
* Path=/m4/price/**
|
||||||
*/
|
*/
|
||||||
//http://172.23.139.4:8004/userPrice/1/getPrice
|
//http://172.23.139.4:8004/userPrice/1/getPrice
|
||||||
@ -180,8 +167,7 @@ public class HttpInterface {
|
|||||||
USER_PRICE_EXCHANGE = IP + PRICE_PATH + "userPrice/" + USERID + "/userPriceExchange";//我的-财务信息-提现
|
USER_PRICE_EXCHANGE = IP + PRICE_PATH + "userPrice/" + USERID + "/userPriceExchange";//我的-财务信息-提现
|
||||||
//dtxbmaps.navinfo.com/dtxb/m4/price/priceExchange/1/getList?datetime=1628647356815
|
//dtxbmaps.navinfo.com/dtxb/m4/price/priceExchange/1/getList?datetime=1628647356815
|
||||||
PRICE_EXCHANGE = IP + PRICE_PATH + "priceExchange/" + USERID + "/getList";//提现记录
|
PRICE_EXCHANGE = IP + PRICE_PATH + "priceExchange/" + USERID + "/getList";//提现记录
|
||||||
/**
|
/*任务
|
||||||
* 任务
|
|
||||||
*Path=/m4/task/**
|
*Path=/m4/task/**
|
||||||
*/
|
*/
|
||||||
///m4/task/task/10/receiveTasks 参数:taskIds
|
///m4/task/task/10/receiveTasks 参数:taskIds
|
||||||
@ -234,8 +220,6 @@ public class HttpInterface {
|
|||||||
COMPLETE = IP + TASK_PATH + "polygonTask/" + USERID + "/complete";//面状任务结束领取
|
COMPLETE = IP + TASK_PATH + "polygonTask/" + USERID + "/complete";//面状任务结束领取
|
||||||
SUBMIT_POLYGON_TASK = IP + TASK_PATH + "polygonTask/" + USERID + "/submitPolygontask";//面状任务开始采集
|
SUBMIT_POLYGON_TASK = IP + TASK_PATH + "polygonTask/" + USERID + "/submitPolygontask";//面状任务开始采集
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* public static String IPm8 = "http://172.23.139.4:8003/m4/";
|
* public static String IPm8 = "http://172.23.139.4:8003/m4/";
|
||||||
* http://172.23.139.4:8003/m4/task/1/unReceivedTask?taskIds=&auditIds=214,278
|
* http://172.23.139.4:8003/m4/task/1/unReceivedTask?taskIds=&auditIds=214,278
|
||||||
|
@ -27,6 +27,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import okhttp3.FormBody;
|
import okhttp3.FormBody;
|
||||||
|
import okhttp3.MediaType;
|
||||||
import okhttp3.RequestBody;
|
import okhttp3.RequestBody;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -52,6 +53,7 @@ public class OkGoBuilder<T> {
|
|||||||
private List<File> files;
|
private List<File> files;
|
||||||
|
|
||||||
private String token;
|
private String token;
|
||||||
|
private String upString;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单列模式
|
* 单列模式
|
||||||
@ -120,6 +122,46 @@ public class OkGoBuilder<T> {
|
|||||||
this.clazz = clazz;
|
this.clazz = clazz;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* post 发现-能力测评:
|
||||||
|
*/
|
||||||
|
public void postCapacity(Callback<T> callback){
|
||||||
|
if (!NetWorkUtils.iConnected(UserApplication.userApplication)) { // 当前网络不可用
|
||||||
|
callback.onError(new Throwable("网络不可用"),2);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
OkGo
|
||||||
|
.<T>post(url)
|
||||||
|
.isMultipart(true)
|
||||||
|
.headers(getHeader())
|
||||||
|
.upString(json, MediaType.parse("application/json"))
|
||||||
|
.tag(this)
|
||||||
|
.execute(new DialogCallback<T>(clazz) {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(Response<T> response) {
|
||||||
|
if (response.code() == 200) {
|
||||||
|
callback.onSuccess(response.body(), 1);
|
||||||
|
} else {
|
||||||
|
Toast.makeText(activity, response.message(), Toast.LENGTH_SHORT).show();
|
||||||
|
} }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Response<T> response) {
|
||||||
|
super.onError(response);
|
||||||
|
Throwable throwable = response.getException();
|
||||||
|
if (throwable != null) {
|
||||||
|
throwable.printStackTrace();
|
||||||
|
callback.onError(throwable, 2);
|
||||||
|
/*
|
||||||
|
* 友盟+
|
||||||
|
* 使用自定义错误,查看时请在错误列表页面选择【自定义异常】
|
||||||
|
*/
|
||||||
|
UMCrash.generateCustomLog("网络请求报错-位置:OKGOBuilder" + throwable, "UmengException");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -176,5 +176,4 @@
|
|||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="20dp"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -9,18 +9,18 @@
|
|||||||
android:id="@+id/camera"
|
android:id="@+id/camera"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:cameraPictureSizeMaxArea="3686400"
|
|
||||||
app:cameraPictureSizeMinArea="1166400"
|
|
||||||
app:cameraPictureSizeMaxHeight="1920"
|
|
||||||
app:cameraPictureSizeMinHeight="1080"
|
|
||||||
app:cameraPictureSizeMaxWidth="1920"
|
|
||||||
app:cameraPictureSizeMinWidth="1080"
|
|
||||||
app:cameraPictureSizeAspectRatio="1920:1080"
|
|
||||||
app:cameraPictureFormat="jpeg"
|
|
||||||
app:cameraPictureSizeBiggest="true"
|
|
||||||
app:cameraPictureSizeSmallest="true"
|
|
||||||
app:cameraPictureMetering="true"
|
|
||||||
android:keepScreenOn="true"
|
android:keepScreenOn="true"
|
||||||
|
app:cameraPictureFormat="jpeg"
|
||||||
|
app:cameraPictureMetering="true"
|
||||||
|
app:cameraPictureSizeAspectRatio="1920:1080"
|
||||||
|
app:cameraPictureSizeBiggest="true"
|
||||||
|
app:cameraPictureSizeMaxArea="3686400"
|
||||||
|
app:cameraPictureSizeMaxHeight="1920"
|
||||||
|
app:cameraPictureSizeMaxWidth="1920"
|
||||||
|
app:cameraPictureSizeMinArea="1166400"
|
||||||
|
app:cameraPictureSizeMinHeight="1080"
|
||||||
|
app:cameraPictureSizeMinWidth="1080"
|
||||||
|
app:cameraPictureSizeSmallest="true"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
@ -33,6 +33,8 @@
|
|||||||
app:cameraPictureSizeMinWidth="1080"
|
app:cameraPictureSizeMinWidth="1080"
|
||||||
app:cameraPictureSizeSmallest="true"
|
app:cameraPictureSizeSmallest="true"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<com.tencent.tencentmap.mapsdk.maps.TextureMapView
|
<com.tencent.tencentmap.mapsdk.maps.TextureMapView
|
||||||
|
Loading…
x
Reference in New Issue
Block a user