修改图片分辨率,纪录中的待提交的修改
This commit is contained in:
parent
0673897a2d
commit
add1d841fe
@ -6,6 +6,7 @@ import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
|
@ -208,10 +208,10 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
if (type == 3) {
|
||||
message.what = 0x103;
|
||||
handler.sendMessageDelayed(message, 0);
|
||||
Toast.makeText(PicturesActivity.this, "保存成功:" + videoIndex, Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(PicturesActivity.this, "保存成功:" + (videoIndex+1), Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
message.what = 0x101;
|
||||
Toast.makeText(PicturesActivity.this, "保存成功" + videoIndex, Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(PicturesActivity.this, "保存成功" + (videoIndex+1), Toast.LENGTH_SHORT).show();
|
||||
handler.sendMessageDelayed(message, 2000);
|
||||
}
|
||||
}
|
||||
|
@ -89,6 +89,8 @@ public class TestActivity extends BaseActivity {
|
||||
removables = new ArrayList<>();//存储网络数据的marker数据(线,面,点)
|
||||
markerLatlng = new ArrayList<>();//存储网络数据的marker数据(线,面,点)
|
||||
initList(Constant.currentLocation);
|
||||
initNewMarker();
|
||||
|
||||
}
|
||||
|
||||
private void initList(TencentLocation tencentLocation) {
|
||||
@ -323,7 +325,6 @@ public class TestActivity extends BaseActivity {
|
||||
//uiSettings.setAllGesturesEnabled(false);
|
||||
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
|
||||
// initCluster();
|
||||
initNewMarker();
|
||||
|
||||
|
||||
}
|
||||
@ -352,23 +353,21 @@ public class TestActivity extends BaseActivity {
|
||||
circle.setFillColor(0xFF00ff00);
|
||||
|
||||
// 移除圆
|
||||
// circle.remove();
|
||||
// circle.remove();
|
||||
//中心点的圆
|
||||
Geometry geometry = GeometryTools.createGeometry(mapCenterPoint);
|
||||
ArrayList<LatLng> latLngs = new ArrayList<>();
|
||||
for (int i = 0; i < items.size(); i++) {
|
||||
LatLng position = items.get(i).getPosition();
|
||||
latLngs.add(position);
|
||||
}
|
||||
// 多 点
|
||||
MultiPoint multiPoint = GeometryTools.createMultiPoint(latLngs);
|
||||
MultiPoint multiPoint = GeometryTools.createMultiPoint(markerLatlng);
|
||||
// 点与多点直接形成的交叉点
|
||||
Geometry intersection = geometry.intersection(multiPoint);
|
||||
if (multiPoint!=null){
|
||||
Geometry intersection = geometry.intersection(multiPoint);
|
||||
//
|
||||
String geometryType = intersection.getGeometryType();
|
||||
//
|
||||
Log.d("ddddd", "initNewMarker: " + geometryType);
|
||||
}
|
||||
|
||||
|
||||
String geometryType = intersection.getGeometryType();
|
||||
Log.d("ddddd", "initNewMarker: " + geometryType);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -201,6 +201,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
List<File> videoFileListByUUID = AWMp4ParserHelper.getInstance().getVideoFileListByUUID(showPoiEntity.getId());
|
||||
for (int i = 0; i < videoFileListByUUID.size(); i++) {
|
||||
videoFileListByUUID.get(i).delete();
|
||||
|
||||
}
|
||||
ivPoiVideoPicture.setImageDrawable(null);
|
||||
return false;
|
||||
@ -326,7 +327,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
|
||||
private void disables() {
|
||||
etRoadName.setEnabled(false);
|
||||
|
||||
ivPoiVideoPicture.setEnabled(false);
|
||||
tvPictures.setEnabled(false);
|
||||
tvPicture.setEnabled(false);
|
||||
@ -627,7 +627,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
//表示文件名,系统将会在/dada/dada/包名/shared_prefs目录下生成
|
||||
//一个以该参数命名的.xml文件。第二个mode表示创建的模式,通过查看
|
||||
//方法注释得知,建议以0或者MODE_PRIVATE为默认值。
|
||||
SharedPreferences poi = getActivity().getSharedPreferences(Constant.DATA_FILE, 0);
|
||||
SharedPreferences poi = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.DATA_FILE, 0);
|
||||
//获取Editor对象
|
||||
SharedPreferences.Editor edit = poi.edit();
|
||||
//根据要保存的数据的类型,调用对应的put方法,
|
||||
@ -636,7 +636,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
//以键值对的形式添加新值。
|
||||
edit.putString("poiEntity", newPoiEntity);
|
||||
//提交新值。必须执行,否则前面的操作都无效。
|
||||
edit.commit();
|
||||
edit.apply();
|
||||
Log.d("TAG", "initRoadSharePre: " + newPoiEntity);
|
||||
}
|
||||
|
||||
@ -749,7 +749,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
@Override
|
||||
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
||||
String roadName = etRoadName.getText().toString().trim();
|
||||
if (roadName != null && !roadName.equals("")) {
|
||||
if (roadName!= null&&!roadName.equals("")) {
|
||||
poiEntity.setName(roadName + "");
|
||||
} else {
|
||||
DateFormat formatters = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
|
||||
@ -768,7 +768,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
}
|
||||
sb.append("-").append(formats);
|
||||
poiEntity.setName(sb.toString());
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
etRoadName.setText(sb);
|
||||
@ -825,7 +825,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
if (lineString != null) {
|
||||
poiEntity.setGeoWkt(lineString);
|
||||
}
|
||||
poiEntity.setRecord_way(2);//录像
|
||||
poiEntity.setRecord_way(2);//连拍
|
||||
}
|
||||
}
|
||||
return poiEntity;
|
||||
@ -840,7 +840,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
poiCheckResult.setMsg("请录像");
|
||||
return poiCheckResult;
|
||||
}
|
||||
|
||||
}
|
||||
if (tvPictures.isEnabled()) {
|
||||
if (tvPicture.isEnabled()) {
|
||||
@ -866,4 +865,5 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
protected PoiCheckResult checkChargingPileEntity(ChargingPileEntity entity) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -737,6 +737,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
Log.d("TAG", "onGranted: " + lineString);
|
||||
String photoStr = AWMp4ParserHelper.getInstance().getVideoFileListStr((List<File>) fmRoadPic.getTag());
|
||||
poiEntity.setPhoto(photoStr);
|
||||
poiEntity.setRecord_way(1);
|
||||
if (lineString != null) {
|
||||
poiEntity.setGeoWkt(lineString);
|
||||
}
|
||||
|
@ -382,6 +382,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
String userEncode = Geohash.getInstance().encode(tencentLocation.getLatitude(), tencentLocation.getLongitude());
|
||||
OkGo.getInstance().cancelTag(this);
|
||||
Log.d("TAG", "initList: "+Constant.USHERED);
|
||||
showLoadingDialog();
|
||||
// 请求方式和请求url
|
||||
HttpParams httpParams = new HttpParams();
|
||||
|
@ -38,8 +38,8 @@ public class PoiSaveUtils {
|
||||
private Activity mContext;
|
||||
private Gson gson;
|
||||
private static PoiSaveUtils instance;
|
||||
private int anInt=0;
|
||||
private int bInt=0;
|
||||
private int anInt = 0;
|
||||
private int bInt = 0;
|
||||
|
||||
public static PoiSaveUtils getInstance(Activity mContext) {
|
||||
if (instance == null) {
|
||||
@ -70,15 +70,12 @@ public class PoiSaveUtils {
|
||||
if (saveChargingPileByChargingStation(poiEntity)) {
|
||||
if (savePoiNet(poiEntity) == 200) { // 网络保存成功
|
||||
// 开始上传流程
|
||||
if (saveChargingPileUploadChargingStation(poiEntity)){
|
||||
if (saveChargingPileUploadChargingStation(poiEntity)) {
|
||||
uploadPoiNet(poiEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (poiEntity.getType() == 6) {//面状任务
|
||||
|
||||
|
||||
} else {//其他类型
|
||||
}else {//其他类型
|
||||
if (savePoiNet(poiEntity) == 200) { // 网络保存成功
|
||||
//走上传流程:
|
||||
uploadPoiNet(poiEntity);
|
||||
@ -90,7 +87,7 @@ public class PoiSaveUtils {
|
||||
public void run() {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.EVENT_STAY_REFRESH;
|
||||
obtain.obj = "提交成功"+anInt+",提交失败"+bInt;
|
||||
obtain.obj = "提交成功" + anInt + ",提交失败" + bInt;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
});
|
||||
@ -260,8 +257,13 @@ public class PoiSaveUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
List<File> videoFileList=null;
|
||||
if (poiEntity.getRecord_way()==1){
|
||||
videoFileList = AWMp4ParserHelper.getInstance().getVideoFileListByUUID(poiEntity.getId());
|
||||
}else if (poiEntity.getRecord_way()==2){
|
||||
videoFileList = AWMp4ParserHelper.getInstance().getJPGFileListByUUID(poiEntity.getId());
|
||||
|
||||
List<File> videoFileList = AWMp4ParserHelper.getInstance().getVideoFileListByUUID(poiEntity.getId());
|
||||
}
|
||||
if (videoFileList != null && !videoFileList.isEmpty()) {
|
||||
List<File> txtFileList = new ArrayList<>();
|
||||
for (File videoFile : videoFileList) {
|
||||
@ -311,11 +313,12 @@ public class PoiSaveUtils {
|
||||
OtherUploadPicBean otherUploadPicBean = gson.fromJson(bodyStr, OtherUploadPicBean.class);
|
||||
if (otherUploadPicBean.getCode() == 200) {
|
||||
PoiDatabase.getInstance(mContext).getPoiDao().deletePoiEntity(poiEntity);
|
||||
Log.d("TAGss", "uploadPoiNet: 成功");
|
||||
anInt++;
|
||||
Log.d("TAGss", "uploadPoiNet: 成功"+anInt);
|
||||
anInt++;
|
||||
return;
|
||||
} else {
|
||||
Log.d("TAGss", "uploadPoiNet: 失败");
|
||||
bInt++;
|
||||
Log.d("TAGss", "uploadPoiNet: 失败"+bInt);
|
||||
bInt++;
|
||||
return;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
@ -474,9 +477,9 @@ public class PoiSaveUtils {
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams)
|
||||
.fileList(chargingPileFileList).postFileSynchronization();
|
||||
if (execute==null){
|
||||
return -1;
|
||||
}
|
||||
if (execute==null){
|
||||
return -1;
|
||||
}
|
||||
if (execute.code() != 200) {
|
||||
return execute.code();
|
||||
}
|
||||
|
@ -16,8 +16,8 @@
|
||||
android:id="@+id/camera"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:cameraPictureSizeMaxArea="1100"
|
||||
app:cameraVideoSizeMaxWidth="800000"
|
||||
app:cameraPictureSizeMaxArea="1200000"
|
||||
app:cameraPictureSizeMaxWidth="1080"
|
||||
android:keepScreenOn="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user