1.修改物理删除 只要提交成功就会删除数据 2.修改获取数据库给设置值的逻辑 3.修改友盟的一些bug
This commit is contained in:
parent
a0be1ab4d0
commit
4f9c4fbdf4
@ -9,8 +9,8 @@ android {
|
||||
applicationId "com.navinfo.outdoor"
|
||||
minSdkVersion 22
|
||||
targetSdkVersion 30
|
||||
versionCode 7
|
||||
versionName "6.1113"
|
||||
versionCode 8
|
||||
versionName "6.1118"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
lintOptions {
|
||||
|
@ -123,7 +123,7 @@ public class GuidanceActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
guidanceBuilder = new StringBuilder();
|
||||
guidanceBuilder.append(TimestampUtil.time()).append("GuidanceActivity-onCreate-initData ,");
|
||||
guidanceBuilder.append(TimestampUtil.time()).append(",").append("GuidanceActivity-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
guidanceBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -149,7 +149,7 @@ public class GuidanceActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
v.setEnabled(false);
|
||||
guidanceBuilder.append(TimestampUtil.time()).append("点击了请查看APP使用说明 ,");
|
||||
guidanceBuilder.append(TimestampUtil.time()).append(",").append("点击了请查看APP使用说明 ,");
|
||||
Message message = new Message();
|
||||
message.what = 0x101;
|
||||
handler.sendMessageDelayed(message, 1000);
|
||||
@ -161,7 +161,7 @@ public class GuidanceActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
v.setEnabled(false);
|
||||
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||
guidanceBuilder.append(TimestampUtil.time()).append(",").append("点击了下一步 ,");
|
||||
Message message = new Message();
|
||||
message.what = 0x102;
|
||||
handler.sendMessageDelayed(message, 500);
|
||||
@ -172,7 +172,7 @@ public class GuidanceActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
v.setEnabled(false);
|
||||
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||
guidanceBuilder.append(TimestampUtil.time()).append(",").append("点击了下一步 ,");
|
||||
Message message = new Message();
|
||||
message.what = 0x103;
|
||||
handler.sendMessageDelayed(message, 500);
|
||||
@ -183,7 +183,7 @@ public class GuidanceActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
v.setEnabled(false);
|
||||
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||
guidanceBuilder.append(TimestampUtil.time()).append(",").append("点击了下一步 ,");
|
||||
Message message = new Message();
|
||||
message.what = 0x104;
|
||||
handler.sendMessageDelayed(message, 500);
|
||||
@ -194,7 +194,7 @@ public class GuidanceActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
v.setEnabled(false);
|
||||
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||
guidanceBuilder.append(TimestampUtil.time()).append(",").append("点击了下一步 ,");
|
||||
Message message = new Message();
|
||||
message.what = 0x105;
|
||||
handler.sendMessageDelayed(message, 500);
|
||||
@ -205,7 +205,7 @@ public class GuidanceActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
v.setEnabled(false);
|
||||
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||
guidanceBuilder.append(TimestampUtil.time()).append(",").append("点击了下一步 ,");
|
||||
Message message = new Message();
|
||||
message.what = 0x106;
|
||||
handler.sendMessageDelayed(message, 500);
|
||||
@ -216,7 +216,7 @@ public class GuidanceActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
v.setEnabled(false);
|
||||
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||
guidanceBuilder.append(TimestampUtil.time()).append(",").append("点击了下一步 ,");
|
||||
Message message = new Message();
|
||||
message.what = 0x107;
|
||||
handler.sendMessageDelayed(message, 500);
|
||||
@ -227,7 +227,7 @@ public class GuidanceActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
v.setEnabled(false);
|
||||
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||
guidanceBuilder.append(TimestampUtil.time()).append(",").append("点击了下一步 ,");
|
||||
Message message = new Message();
|
||||
message.what = 0x108;
|
||||
handler.sendMessageDelayed(message, 500);
|
||||
@ -238,7 +238,7 @@ public class GuidanceActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
v.setEnabled(false);
|
||||
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||
guidanceBuilder.append(TimestampUtil.time()).append(",").append("点击了下一步 ,");
|
||||
Message message = new Message();
|
||||
message.what = 0x109;
|
||||
handler.sendMessageDelayed(message, 500);
|
||||
@ -249,7 +249,7 @@ public class GuidanceActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
v.setEnabled(false);
|
||||
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||
guidanceBuilder.append(TimestampUtil.time()).append(",").append("点击了下一步 ,");
|
||||
Message message = new Message();
|
||||
message.what = 0x110;
|
||||
handler.sendMessageDelayed(message, 500);
|
||||
@ -260,7 +260,7 @@ public class GuidanceActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
v.setEnabled(false);
|
||||
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||
guidanceBuilder.append(TimestampUtil.time()).append(",").append("点击了下一步 ,");
|
||||
Message message = new Message();
|
||||
message.what = 0x111;
|
||||
handler.sendMessageDelayed(message, 500);
|
||||
@ -271,7 +271,7 @@ public class GuidanceActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
v.setEnabled(false);
|
||||
guidanceBuilder.append(TimestampUtil.time()).append("点击了学会了,");
|
||||
guidanceBuilder.append(TimestampUtil.time()).append(",").append("点击了学会了,");
|
||||
Message message = new Message();
|
||||
message.what = 0x112;
|
||||
handler.sendMessageDelayed(message, 500);
|
||||
|
@ -15,10 +15,12 @@ import com.navinfo.outdoor.util.BackHandlerHelper;
|
||||
import com.navinfo.outdoor.util.NoSlideViewPager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.view.View;
|
||||
@ -58,6 +60,16 @@ public class HomeActivity extends BaseActivity {
|
||||
return R.layout.activity_home;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (Constant.USHERED!=null){
|
||||
Constant.initRootFolder(Constant.USHERED);
|
||||
}else {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
|
@ -100,7 +100,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
}
|
||||
}
|
||||
loginBuilder = new StringBuilder();
|
||||
loginBuilder.append(TimestampUtil.time()).append("LoginActivity-initData ,");
|
||||
loginBuilder.append(TimestampUtil.time()).append(",").append("LoginActivity-initData ,");
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
@ -146,19 +146,19 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.tv_register:
|
||||
loginBuilder.append(TimestampUtil.time()).append("点击注册 ,");
|
||||
loginBuilder.append(TimestampUtil.time()).append(",").append("点击注册 ,");
|
||||
Intent register = new Intent(this, FragmentManagement.class);
|
||||
register.putExtra("tag", 5);
|
||||
startActivity(register);
|
||||
break;
|
||||
case R.id.tv_forget_paw:
|
||||
loginBuilder.append(TimestampUtil.time()).append("点击忘记密码 ,");
|
||||
loginBuilder.append(TimestampUtil.time()).append(",").append("点击忘记密码 ,");
|
||||
Intent forgetPaw = new Intent(this, FragmentManagement.class);
|
||||
forgetPaw.putExtra("tag", 6);
|
||||
startActivity(forgetPaw);
|
||||
break;
|
||||
case R.id.btn_login:
|
||||
loginBuilder.append(TimestampUtil.time()).append("点击登录 , ");
|
||||
loginBuilder.append(TimestampUtil.time()).append(",").append("点击登录 , ");
|
||||
btnLogin.setEnabled(false);
|
||||
Message message = new Message();
|
||||
message.what = 0x103;
|
||||
@ -181,7 +181,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
}
|
||||
break;
|
||||
case R.id.tv_statement:
|
||||
loginBuilder.append(TimestampUtil.time()).append("点击了用户协议 ,");
|
||||
loginBuilder.append(TimestampUtil.time()).append(",").append("点击了用户协议 ,");
|
||||
Intent stateIntent = new Intent(this, StatementActivity.class);
|
||||
startActivity(stateIntent);
|
||||
break;
|
||||
@ -224,7 +224,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
Constant.REFRESH_TOKEN = body.getRefresh_token();
|
||||
Constant.USHERED = body.getUserId();
|
||||
Constant.PASS_WORD = paw;
|
||||
loginBuilder.append(TimestampUtil.time()).append("登录获取token ,");
|
||||
loginBuilder.append(TimestampUtil.time()).append(",").append("登录获取token ,");
|
||||
initGetUserInfo();//获取用户信息
|
||||
}else {
|
||||
Toast.makeText(LoginActivity.this, "获取id 失败", Toast.LENGTH_SHORT).show();
|
||||
@ -302,11 +302,11 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
navInfoEditor.commit();
|
||||
int needGuide = body.getNeedGuide();//0不需要 1需要
|
||||
if (needGuide == 1) {
|
||||
loginBuilder.append(TimestampUtil.time()).append("进入介绍页 ,");
|
||||
loginBuilder.append(TimestampUtil.time()).append(",").append("进入介绍页 ,");
|
||||
Intent intent = new Intent(LoginActivity.this, GuidanceActivity.class);
|
||||
startActivity(intent);
|
||||
} else {
|
||||
loginBuilder.append(TimestampUtil.time()).append("登录成功 ,");
|
||||
loginBuilder.append(TimestampUtil.time()).append(",").append("登录成功 ,");
|
||||
Toast.makeText(LoginActivity.this, "登录成功", Toast.LENGTH_SHORT).show();
|
||||
Intent intent = new Intent(LoginActivity.this, HomeActivity.class);
|
||||
startActivity(intent);
|
||||
@ -341,19 +341,19 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
loginBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
loginBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
loginBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
loginBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
loginBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
loginBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
loginBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), loginBuilder.toString(), true);
|
||||
if (EventBus.getDefault().isRegistered(this)) {//加上判断
|
||||
|
@ -63,7 +63,7 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.capture_picture) {
|
||||
photographBuilder.append(TimestampUtil.time()).append("onClick:点击了拍摄 ,");
|
||||
photographBuilder.append(TimestampUtil.time()).append(",").append("onClick:点击了拍摄 ,");
|
||||
cameraView.takePicture();
|
||||
}
|
||||
}
|
||||
@ -95,7 +95,7 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
||||
}
|
||||
}
|
||||
photographBuilder = new StringBuilder();
|
||||
photographBuilder.append(TimestampUtil.time()).append("PhotographActivity-onCreate-initData ,");
|
||||
photographBuilder.append(TimestampUtil.time()).append(",").append("PhotographActivity-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
photographBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -119,9 +119,9 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
||||
public void onPictureTaken(@NonNull PictureResult result) {
|
||||
super.onPictureTaken(result);
|
||||
if (Objects.requireNonNull(cameraView.getPictureSize()).getWidth() < cameraView.getPictureSize().getHeight()) {
|
||||
photographBuilder.append(TimestampUtil.time()).append("cameraView 用户竖向拍摄 ,");
|
||||
photographBuilder.append(TimestampUtil.time()).append(",").append("cameraView 用户竖向拍摄 ,");
|
||||
} else {
|
||||
photographBuilder.append(TimestampUtil.time()).append("cameraView 用户横屏拍摄 ,");
|
||||
photographBuilder.append(TimestampUtil.time()).append(",").append("cameraView 用户横屏拍摄 ,");
|
||||
}
|
||||
File file = new File(photo_path);
|
||||
/*File destFolder = new File(file.getParentFile().getAbsolutePath()+"aaa");
|
||||
@ -208,14 +208,14 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
photographBuilder.append(TimestampUtil.time()).append("onResume ,");
|
||||
photographBuilder.append(TimestampUtil.time()).append(",").append("onResume ,");
|
||||
cameraView.open();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
photographBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
photographBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
cameraView.close();
|
||||
}
|
||||
|
||||
@ -223,7 +223,7 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
cameraView.destroy();
|
||||
photographBuilder.append(TimestampUtil.time()).append("onDestroy ");
|
||||
photographBuilder.append(TimestampUtil.time()).append(",").append("onDestroy ");
|
||||
photographBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), photographBuilder.toString(), true);
|
||||
if (EventBus.getDefault().isRegistered(this)) {
|
||||
|
@ -255,15 +255,15 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
if (isChecked) {
|
||||
if (radioPicture != 1) {
|
||||
capturePicture.setText("暂停采集");
|
||||
picturesBuilder.append(TimestampUtil.time()).append("capturePicture 点击了开始采集 ,");
|
||||
picturesBuilder.append(TimestampUtil.time()).append(",").append("capturePicture 点击了开始采集 ,");
|
||||
} else {
|
||||
picturesBuilder.append(TimestampUtil.time()).append("capturePicture 点击了拍摄 ,");
|
||||
picturesBuilder.append(TimestampUtil.time()).append(",").append("capturePicture 点击了拍摄 ,");
|
||||
}
|
||||
startTimer();
|
||||
} else {
|
||||
if (radioPicture != 1) {
|
||||
capturePicture.setText("开始采集");
|
||||
picturesBuilder.append(TimestampUtil.time()).append("capturePicture 点击了暂停采集 ,");
|
||||
picturesBuilder.append(TimestampUtil.time()).append(",").append("capturePicture 点击了暂停采集 ,");
|
||||
}
|
||||
stopTimer();
|
||||
}
|
||||
@ -473,7 +473,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
}
|
||||
picturesBuilder = new StringBuilder();
|
||||
picturesBuilder.append(TimestampUtil.time()).append("PicturesActivity-onCreate-initData ,");
|
||||
picturesBuilder.append(TimestampUtil.time()).append(",").append("PicturesActivity-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
picturesBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -487,7 +487,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
if (isOration) {
|
||||
stopTimer();
|
||||
}
|
||||
picturesBuilder.append(TimestampUtil.time()).append("onClick 点击了结束采集 ,");
|
||||
picturesBuilder.append(TimestampUtil.time()).append(",").append("onClick 点击了结束采集 ,");
|
||||
Intent intent = new Intent();
|
||||
finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".webp";
|
||||
intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath);
|
||||
@ -495,29 +495,29 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
this.finish();
|
||||
break;
|
||||
case R.id.image_view:
|
||||
picturesBuilder.append(TimestampUtil.time()).append("onClick 点击了切换的窗口 ,");
|
||||
picturesBuilder.append(TimestampUtil.time()).append(",").append("onClick 点击了切换的窗口 ,");
|
||||
v.setEnabled(false);
|
||||
benSwitch();
|
||||
handler.sendEmptyMessageDelayed(0x102, 2000);// 利用handler延迟发送更改状态信息
|
||||
break;
|
||||
case R.id.btn_switch:
|
||||
picturesBuilder.append(TimestampUtil.time()).append("onClick 点击了切换按钮 ,");
|
||||
picturesBuilder.append(TimestampUtil.time()).append(",").append("onClick 点击了切换按钮 ,");
|
||||
v.setEnabled(false);
|
||||
handler.sendEmptyMessageDelayed(0x102, 2000);// 利用handler延迟发送更改状态信息
|
||||
benSwitch();
|
||||
break;
|
||||
case R.id.iv_zoom_add://放大
|
||||
picturesBuilder.append(TimestampUtil.time()).append("onClick 点击了放大 ,");
|
||||
picturesBuilder.append(TimestampUtil.time()).append(",").append("onClick 点击了放大 ,");
|
||||
CameraUpdate cameraUpdateIn = CameraUpdateFactory.zoomIn();
|
||||
tencentMap.animateCamera(cameraUpdateIn);
|
||||
break;
|
||||
case R.id.iv_zoom_del://缩小
|
||||
picturesBuilder.append(TimestampUtil.time()).append("onClick 点击了缩小 ,");
|
||||
picturesBuilder.append(TimestampUtil.time()).append(",").append("onClick 点击了缩小 ,");
|
||||
CameraUpdate cameraUpdateOut = CameraUpdateFactory.zoomOut();
|
||||
tencentMap.animateCamera(cameraUpdateOut);
|
||||
break;
|
||||
case R.id.iv_location://定位:
|
||||
picturesBuilder.append(TimestampUtil.time()).append("onClick 点击了定位 ,");
|
||||
picturesBuilder.append(TimestampUtil.time()).append(",").append("onClick 点击了定位 ,");
|
||||
if (Constant.currentLocation != null) {
|
||||
CameraUpdate cameraSigma = CameraUpdateFactory
|
||||
.newCameraPosition(new CameraPosition(new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
||||
@ -655,7 +655,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
picturesBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
picturesBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
tvMapView.onPause();
|
||||
camera.close();
|
||||
stopTimer();
|
||||
@ -664,7 +664,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
picturesBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
picturesBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
tvMapView.onStop();
|
||||
}
|
||||
|
||||
@ -682,7 +682,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
removables.get(i).remove();
|
||||
}
|
||||
removables.clear();
|
||||
picturesBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
picturesBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
picturesBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), picturesBuilder.toString(), true);
|
||||
if (EventBus.getDefault().isRegistered(this)) {
|
||||
@ -828,7 +828,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
MessageDialog.show(this, "提示", message, "是", "否").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
picturesBuilder.append(TimestampUtil.time()).append("onClick 点击了结束采集 ,");
|
||||
picturesBuilder.append(TimestampUtil.time()).append(",").append("onClick 点击了结束采集 ,");
|
||||
Intent intent = new Intent();
|
||||
finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".webp";
|
||||
intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath);
|
||||
|
@ -90,7 +90,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
}
|
||||
}
|
||||
userBuilder = new StringBuilder();
|
||||
userBuilder.append(TimestampUtil.time()).append(" UserFragment-onCreate-initData ,");
|
||||
userBuilder.append(TimestampUtil.time()).append(",").append(" UserFragment-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
userBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -149,11 +149,11 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_user:
|
||||
userBuilder.append(TimestampUtil.time()).append("点击了用户资料的返回 ,");
|
||||
userBuilder.append(TimestampUtil.time()).append(",").append("点击了用户资料的返回 ,");
|
||||
finish();
|
||||
break;
|
||||
case R.id.btn_gathering:
|
||||
userBuilder.append(TimestampUtil.time()).append("点击了去绑定的返回 ,");
|
||||
userBuilder.append(TimestampUtil.time()).append(",").append("点击了去绑定的返回 ,");
|
||||
if (Constant.AUDIOTAPES == -1) {
|
||||
Toast.makeText(this, "请先实名认证", Toast.LENGTH_SHORT).show();
|
||||
} else if (Constant.AUDIOTAPES == 1) {//认证通过
|
||||
@ -165,34 +165,34 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
}
|
||||
break;
|
||||
case R.id.btn_attestations:
|
||||
userBuilder.append(TimestampUtil.time()).append("点击了去认证的返回 ,");
|
||||
userBuilder.append(TimestampUtil.time()).append(",").append("点击了去认证的返回 ,");
|
||||
Intent attestationIntent = new Intent(this, FragmentManagement.class);
|
||||
attestationIntent.putExtra("tag", 25);
|
||||
startActivity(attestationIntent);
|
||||
break;
|
||||
case R.id.ll_region:
|
||||
userBuilder.append(TimestampUtil.time()).append("点击了所在区域 ,");
|
||||
userBuilder.append(TimestampUtil.time()).append(",").append("点击了所在区域 ,");
|
||||
showPickerView();
|
||||
break;
|
||||
case R.id.edit_qq:
|
||||
userBuilder.append(TimestampUtil.time()).append("请输入qq ,");
|
||||
userBuilder.append(TimestampUtil.time()).append(",").append("请输入qq ,");
|
||||
// qq();
|
||||
break;
|
||||
case R.id.edit_mailbox:
|
||||
userBuilder.append(TimestampUtil.time()).append("请输入电子邮件 ,");
|
||||
userBuilder.append(TimestampUtil.time()).append(",").append("请输入电子邮件 ,");
|
||||
break;
|
||||
case R.id.btn_save:
|
||||
netWork();
|
||||
break;
|
||||
case R.id.btn_weChat_binding:
|
||||
userBuilder.append(TimestampUtil.time()).append("点击了微信 去提交的按钮 ,");
|
||||
userBuilder.append(TimestampUtil.time()).append(",").append("点击了微信 去提交的按钮 ,");
|
||||
Toast.makeText(this, "此功能未开通", Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void netWork() {
|
||||
userBuilder.append(TimestampUtil.time()).append("点击了保存的按钮 ,");
|
||||
userBuilder.append(TimestampUtil.time()).append(",").append("点击了保存的按钮 ,");
|
||||
String userphone = etPhone.getText().toString().trim();
|
||||
String userqq = etQq.getText().toString().trim();
|
||||
String usermailbox = etMailbox.getText().toString().trim();
|
||||
@ -395,19 +395,19 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
userBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
userBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
userBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
userBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
userBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
userBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
userBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), userBuilder.toString(), true);
|
||||
}
|
||||
|
@ -13,11 +13,14 @@ import android.widget.ImageView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.ImageShowActivity;
|
||||
import com.navinfo.outdoor.activity.VideoActivity;
|
||||
import com.navinfo.outdoor.bean.FileBean;
|
||||
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||
import com.navinfo.outdoor.util.RotateTransformation;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@ -68,6 +71,7 @@ public class PhotoAdapter extends RecyclerView.Adapter<PhotoAdapter.ViewHolder>
|
||||
File file = fileBean.getFile();
|
||||
if (file.exists()) {
|
||||
AWMp4ParserHelper.getInstance().loadFirstWithGlide(context, Uri.fromFile(file).toString(), holder.ivPhoto, 500);
|
||||
// Glide.with(context).load(file).apply(RequestOptions.bitmapTransform(new RotateTransformation(0))).into(holder.ivPhoto);
|
||||
}
|
||||
holder.ivPhoto.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@ -79,7 +83,6 @@ public class PhotoAdapter extends RecyclerView.Adapter<PhotoAdapter.ViewHolder>
|
||||
Intent intent = new Intent(context, ImageShowActivity.class);
|
||||
intent.putExtra("info", arrayList);
|
||||
intent.putExtra("type",position);
|
||||
|
||||
context.startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
@ -44,10 +44,14 @@ public class PoiTaskAdapter extends RecyclerView.Adapter<PoiTaskAdapter.ViewHold
|
||||
holder.tvTime.setText(listBean.getCreateTime());
|
||||
if (listBean.getAuditStatus()==0){
|
||||
holder.tvAuditStatus.setText("审核通过");
|
||||
holder.tvMassage.setVisibility(View.GONE);
|
||||
}else if (listBean.getAuditStatus() == 1){
|
||||
holder.tvAuditStatus.setText("审核未通过");
|
||||
holder.tvMassage.setVisibility(View.VISIBLE);
|
||||
holder.tvMassage.setText(listBean.getAuditMsg());
|
||||
}else if (listBean.getAuditStatus() == -1){
|
||||
holder.tvAuditStatus.setText("待审核");
|
||||
holder.tvMassage.setVisibility(View.GONE);
|
||||
}
|
||||
holder.tvMany.setText("¥"+listBean.getPrice());
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import com.tencent.tencentmap.mapsdk.maps.TencentMap;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptor;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptorFactory;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||
import com.umeng.umcrash.UMCrash;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@ -27,12 +28,11 @@ public class Constant {
|
||||
public static final String GET_ERR_MESSAGE3 = "自动加载libtencentloc.so失败";
|
||||
public static final String ROOT_FOLDER = SdkFolderCreate.getSDPath() + "/navinfoOutDoor";
|
||||
|
||||
public static String BASE_FOLDER = ROOT_FOLDER;
|
||||
public static String BASE_FOLDER = null;
|
||||
//保存图片的目录
|
||||
public static String PICTURE_FOLDER;
|
||||
public static String VIDEOS;
|
||||
public static String POI_DAO=null;
|
||||
|
||||
public static String POI_DAO;
|
||||
public static String SHARED_PREFERENCES = "navInfo";
|
||||
public static String MESSAGE_TYPE = "messageType";
|
||||
public static String DATA_FILE = "dataFile";
|
||||
@ -59,6 +59,7 @@ public class Constant {
|
||||
if (!logFolder.exists()) {
|
||||
SdkFolderCreate.mkdirs(logFolder.getAbsolutePath());
|
||||
}
|
||||
UMCrash.generateCustomLog("initRootFolder:"+"USERID:"+userId+",BASE_FOLDER:"+BASE_FOLDER+",PICTURE_FOLDER:"+PICTURE_FOLDER+",POI_DAO:"+POI_DAO+",MOBILE:"+Constant.MOBILE, "initRootFolder");
|
||||
}
|
||||
|
||||
// 申请权限的RequestCode
|
||||
|
@ -121,8 +121,10 @@ public abstract class BaseFragment extends Fragment implements FragmentBackHandl
|
||||
|
||||
public void setLoadingDialogText(String s) {
|
||||
//给loading 添加文字
|
||||
TextView view = alertDialog.findViewById(R.id.progressBar_tx);
|
||||
view.setText(s);
|
||||
if (alertDialog!=null){
|
||||
TextView view = alertDialog.findViewById(R.id.progressBar_tx);
|
||||
view.setText(s);
|
||||
}
|
||||
}
|
||||
|
||||
public void dismissLoadingDialog() {
|
||||
@ -131,8 +133,7 @@ public abstract class BaseFragment extends Fragment implements FragmentBackHandl
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void intint2WebActivity(String url, HashMap<String, String> paramMap) {
|
||||
protected void intentWebActivity(String url, HashMap<String, String> paramMap) {
|
||||
Intent intent = new Intent(getContext(), WebActivity.class);
|
||||
if (paramMap !=null) {
|
||||
intent.putExtra("map", paramMap);
|
||||
|
@ -118,7 +118,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
}
|
||||
}
|
||||
capacityMeasureBuilder = new StringBuilder();
|
||||
capacityMeasureBuilder.append(TimestampUtil.time()).append("CapacityMeasurementFragment-onCreate-initData ,");
|
||||
capacityMeasureBuilder.append(TimestampUtil.time()).append(",").append("CapacityMeasurementFragment-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
capacityMeasureBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -190,11 +190,11 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_measurement_finish:
|
||||
capacityMeasureBuilder.append(TimestampUtil.time()).append("点击了返回的按钮 ,");
|
||||
capacityMeasureBuilder.append(TimestampUtil.time()).append(",").append("点击了返回的按钮 ,");
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
break;
|
||||
case R.id.btn:
|
||||
capacityMeasureBuilder.append(TimestampUtil.time()).append("点击了提交的的按钮 ,");
|
||||
capacityMeasureBuilder.append(TimestampUtil.time()).append(",").append("点击了提交的的按钮 ,");
|
||||
if (baleen.size() != 0) {
|
||||
Map<String, String> checkedMap = capacityMeasureAdapter.getCheckedMap();
|
||||
for (int i = 0; i < baleen.size(); i++) {
|
||||
@ -285,19 +285,19 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
capacityMeasureBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
capacityMeasureBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
capacityMeasureBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
capacityMeasureBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
capacityMeasureBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
capacityMeasureBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
capacityMeasureBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), capacityMeasureBuilder.toString(), true);
|
||||
}
|
||||
|
@ -179,14 +179,12 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
ChargingPileDao chargingPileDao = poiDatabase.getChargingPileDao();
|
||||
checkBoxLife = findViewById(R.id.check_pot_life);
|
||||
CheckBox checkBoxRight = findViewById(R.id.check_pot_right);
|
||||
checkBoxLife.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了checkBox 的按钮,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了checkBox 的按钮,");
|
||||
if (checkBoxLife.isChecked()) {
|
||||
moveLatlng(latLng, new TencentMap.CancelableCallback() {
|
||||
@Override
|
||||
@ -232,7 +230,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
checkButton1.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了checkButton1 的按钮,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了checkButton1 的按钮,");
|
||||
if (isChecked) {
|
||||
buffer1 = "1,";
|
||||
buffer2 = "";
|
||||
@ -252,7 +250,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
checkButton2.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了checkButton2 的按钮,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了checkButton2 的按钮,");
|
||||
if (isChecked) {
|
||||
buffer2 = "2,";
|
||||
checkButton1.setChecked(false);
|
||||
@ -265,7 +263,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
checkButton3.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了checkButton3 的按钮,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了checkButton3 的按钮,");
|
||||
if (isChecked) {
|
||||
buffer3 = "3,";
|
||||
checkButton1.setChecked(false);
|
||||
@ -278,7 +276,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
checkButton4.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了checkButton4 的按钮,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了checkButton4 的按钮,");
|
||||
if (isChecked) {
|
||||
buffer4 = "4,";
|
||||
checkButton1.setChecked(false);
|
||||
@ -291,7 +289,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
checkButton5.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了checkButton5 的按钮,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了checkButton5 的按钮,");
|
||||
if (isChecked) {
|
||||
buffer5 = "5,";
|
||||
checkButton1.setChecked(false);
|
||||
@ -310,12 +308,12 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
switch (position) {
|
||||
case 0:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 存在,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 存在,");
|
||||
exist = 0;//存在
|
||||
pileDisables(View.VISIBLE);
|
||||
break;
|
||||
case 1:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 不存在,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 不存在,");
|
||||
exist = 1;//不存在
|
||||
pileDisables(View.GONE);
|
||||
rlDevice.setVisibility(View.GONE);
|
||||
@ -338,43 +336,43 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
switch (position) {
|
||||
case 0:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地上五层,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 地上五层,");
|
||||
cp_floor = 5;
|
||||
break;
|
||||
case 1:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地上四层,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 地上四层,");
|
||||
cp_floor = 4;
|
||||
break;
|
||||
case 2:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地上三层,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 地上三层,");
|
||||
cp_floor = 3;
|
||||
break;
|
||||
case 3:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地上二层,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 地上二层,");
|
||||
cp_floor = 2;
|
||||
break;
|
||||
case 4:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地上一层,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 地上一层,");
|
||||
cp_floor = 1;
|
||||
break;
|
||||
case 5:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地下一层,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 地下一层,");
|
||||
cp_floor = -1;
|
||||
break;
|
||||
case 6:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地下二层,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 地下二层,");
|
||||
cp_floor = -2;
|
||||
break;
|
||||
case 7:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地下三层,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 地下三层,");
|
||||
cp_floor = -3;
|
||||
break;
|
||||
case 8:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地下四层,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 地下四层,");
|
||||
cp_floor = -4;
|
||||
break;
|
||||
case 9:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地下五层,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 地下五层,");
|
||||
cp_floor = -5;
|
||||
break;
|
||||
}
|
||||
@ -392,14 +390,14 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
switch (position) {
|
||||
case 0:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 存在,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 存在,");
|
||||
rlFacility.setBackgroundResource(R.drawable.selector_hui_bg);
|
||||
rlScutcheon.setVisibility(View.GONE);
|
||||
rlDevice.setVisibility(View.GONE);
|
||||
sign_exist = 0;
|
||||
break;
|
||||
case 1:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 不存在,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 不存在,");
|
||||
rlFacility.setBackgroundColor(Color.parseColor("#03A9F4"));
|
||||
if (exist==0){
|
||||
rlScutcheon.setVisibility(View.VISIBLE);
|
||||
@ -425,23 +423,23 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
switch (position) {
|
||||
case 0:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 可以使用,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 可以使用,");
|
||||
cp_availableState = 0;
|
||||
break;
|
||||
case 1:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 不可使用,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 不可使用,");
|
||||
cp_availableState = 1;
|
||||
break;
|
||||
case 2:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 维修中,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 维修中,");
|
||||
cp_availableState = 2;
|
||||
break;
|
||||
case 3:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 建设中,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 建设中,");
|
||||
cp_availableState = 3;
|
||||
break;
|
||||
case 4:
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 规划中,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击了下拉框 规划中,");
|
||||
cp_availableState = 4;
|
||||
break;
|
||||
}
|
||||
@ -515,7 +513,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
rlAvailable.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击长按删除 确定按钮,");
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
@ -535,7 +533,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
rlUsable.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击长按删除 确定按钮,");
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
@ -555,7 +553,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
rlScutcheon.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击长按删除 确定按钮,");
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
@ -576,7 +574,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
rlParking.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击长按删除 确定按钮,");
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
@ -596,7 +594,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
rlPanorama.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击长按删除 确定按钮,");
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
@ -616,7 +614,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
rlNumber.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击长按删除 确定按钮,");
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
@ -637,7 +635,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
rlFacility.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击长按删除 确定按钮,");
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
@ -657,7 +655,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
rlEquipment.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击长按删除 确定按钮,");
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
@ -677,7 +675,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
rlDevice.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击长按删除 确定按钮,");
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
@ -697,7 +695,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
rlCoding.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
|
||||
chargingPileBuilder.append(TimestampUtil.time()).append(",").append("点击长按删除 确定按钮,");
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
|
@ -111,7 +111,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
private EditText editNameContent, editSiteContent;
|
||||
private ArrayList<PhoneBean> poiBeans;
|
||||
private Button btnSaveLocal, btnUploading;
|
||||
private PoiDao poiDao;
|
||||
private CheckBox checkBoxLife;
|
||||
private Spinner spinnerType;
|
||||
String[] caye = new String[]{"充电站", "充换电站", "充电桩组", "换电站"};//1."充电站"2 "充换电站"3 "充电桩组"4 "换电站"5 ,
|
||||
@ -120,7 +119,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
private LinearLayout linearChargingPile;
|
||||
private ChargingPileAdapter chargingPileAdapter;
|
||||
private int station_type = 1;
|
||||
private ChargingPileDao chargingPileDao;
|
||||
private LatLng latLng;
|
||||
private RelativeLayout linearExist;
|
||||
private Spinner spinnerExist;
|
||||
@ -277,9 +275,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
chargingPileDao = poiDatabase.getChargingPileDao();
|
||||
checkBoxLife = findViewById(R.id.check_pot_life);
|
||||
CheckBox checkBoxRight = findViewById(R.id.check_pot_right);
|
||||
nestedScrollView = findViewById(R.id.nested_scroll_view);
|
||||
@ -347,7 +342,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
checkBoxLife.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append("点击了编辑的按钮 ,");
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("点击了编辑的按钮 ,");
|
||||
if (checkBoxLife.isChecked()) {
|
||||
moveLatlng(latLng, new TencentMap.CancelableCallback() {
|
||||
@Override
|
||||
@ -397,19 +392,19 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
switch (position) {
|
||||
case 0:
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append("下拉框选择 充电站,");
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("下拉框选择 充电站,");
|
||||
station_type = 1;
|
||||
break;
|
||||
case 1:
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append("下拉框选择 充换电站,");
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("下拉框选择 充换电站,");
|
||||
station_type = 2;
|
||||
break;
|
||||
case 2:
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append("下拉框选择 充电桩组,");
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("下拉框选择 充电桩组,");
|
||||
station_type = 3;
|
||||
break;
|
||||
case 3:
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append("下拉框选择 换电站,");
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("下拉框选择 换电站,");
|
||||
station_type = 4;
|
||||
break;
|
||||
}
|
||||
@ -429,7 +424,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
switch (position) {
|
||||
case 0:
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append("下拉框选择 存在,");
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("下拉框选择 存在,");
|
||||
rlInternalPhotos.setVisibility(View.VISIBLE);
|
||||
rlElse.setVisibility(View.VISIBLE);
|
||||
rlScutcheon.setVisibility(View.VISIBLE);
|
||||
@ -437,7 +432,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
existence = 0;
|
||||
break;
|
||||
case 1:
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append("下拉框选择 不存在,");
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("下拉框选择 不存在,");
|
||||
rlInternalPhotos.setVisibility(View.GONE);
|
||||
rlElse.setVisibility(View.GONE);
|
||||
rlScutcheon.setVisibility(View.GONE);
|
||||
@ -445,7 +440,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
existence = 1;
|
||||
break;
|
||||
case 2:
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append("下拉框选择 无法验证,");
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("下拉框选择 无法验证,");
|
||||
rlInternalPhotos.setVisibility(View.GONE);
|
||||
rlElse.setVisibility(View.GONE);
|
||||
rlScutcheon.setVisibility(View.GONE);
|
||||
@ -472,7 +467,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("点击了长按删除图片确定 按钮,");
|
||||
ivElse.setImageDrawable(null);
|
||||
if (tvElse.getTag() != null) {
|
||||
File file = new File((String) tvElse.getTag());
|
||||
@ -492,7 +487,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("点击了长按删除图片确定 按钮,");
|
||||
ivScutcheon.setImageDrawable(null);
|
||||
if (tvScutcheon.getTag() != null) {
|
||||
File file = new File((String) tvScutcheon.getTag());
|
||||
@ -512,7 +507,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("点击了长按删除图片确定 按钮,");
|
||||
ivPanorama.setImageDrawable(null);
|
||||
if (tvPanorama.getTag() != null) {
|
||||
File file = new File((String) tvPanorama.getTag());
|
||||
@ -532,7 +527,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("点击了长按删除图片确定 按钮,");
|
||||
ivName.setImageDrawable(null);
|
||||
if (tvNamePic.getTag() != null) {
|
||||
File file = new File((String) tvNamePic.getTag());
|
||||
@ -552,7 +547,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("点击了长按删除图片确定 按钮,");
|
||||
ivInternal.setImageDrawable(null);
|
||||
if (tvInternal.getTag() != null) {
|
||||
File file = new File((String) tvInternal.getTag());
|
||||
@ -718,7 +713,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<ChargingPileEntity> chargingPileList = chargingPileDao.getChargingPileByStationId(showPoiEntity.getId());
|
||||
List<ChargingPileEntity> chargingPileList = PoiDatabase.getInstance(getContext()).getChargingPileDao().getChargingPileByStationId(showPoiEntity.getId());
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -890,7 +885,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
}
|
||||
}
|
||||
chargingStationBuilder = new StringBuilder();
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append("ChargingStationActivity-onCreate-initData ,");
|
||||
chargingStationBuilder.append(TimestampUtil.time()).append(",").append("ChargingStationActivity-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
chargingStationBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -1017,7 +1012,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
PoiEntity poiDaoPoiEntity = PoiDatabase.getInstance(getContext()).getPoiDao().getPoiEntity(showPoiEntity.getId());
|
||||
// 首先批量保存充电站对应的充电桩数据
|
||||
saveChargingPileByChargingStation(showPoiEntity);
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@ -1715,7 +1710,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
}
|
||||
}*/
|
||||
poiEntity.setTaskStatus(100);
|
||||
poiDao.updatePoiEntity(poiEntity);
|
||||
PoiDatabase.getInstance(getContext()).getPoiDao().updatePoiEntity(poiEntity);
|
||||
}
|
||||
}).start();
|
||||
//initList();
|
||||
|
@ -88,7 +88,7 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
}
|
||||
}
|
||||
eventPrefectureBuilder = new StringBuilder();
|
||||
eventPrefectureBuilder.append(TimestampUtil.time()).append("EventPrefectureFragment-onCreate-initData ,");
|
||||
eventPrefectureBuilder.append(TimestampUtil.time()).append(",").append("EventPrefectureFragment-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
eventPrefectureBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -197,10 +197,10 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
eventPrefectureAdapter.setClickItem(new EventPrefectureAdapter.clickItem() {
|
||||
@Override
|
||||
public void item(int aInt) {
|
||||
eventPrefectureBuilder.append(TimestampUtil.time()).append("点击了item ,");
|
||||
eventPrefectureBuilder.append(TimestampUtil.time()).append(",").append("点击了item ,");
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("id",aInt+"");
|
||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||
intentWebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -209,26 +209,26 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.iv_event_task) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
eventPrefectureBuilder.append(TimestampUtil.time()).append("点击了返回的按钮 ,");
|
||||
eventPrefectureBuilder.append(TimestampUtil.time()).append(",").append("点击了返回的按钮 ,");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
eventPrefectureBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
eventPrefectureBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
eventPrefectureBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
eventPrefectureBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
eventPrefectureBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
eventPrefectureBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
eventPrefectureBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), eventPrefectureBuilder.toString(), true);
|
||||
}
|
||||
|
@ -113,6 +113,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
obtain.obj = isSliding;
|
||||
EventBus.getDefault().post(obtain);
|
||||
|
||||
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain1.obj = true;
|
||||
@ -223,7 +224,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
}
|
||||
}
|
||||
filterBuilder = new StringBuilder();
|
||||
filterBuilder.append(TimestampUtil.time()).append("FilterActivity-onCreate-initData ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("FilterActivity-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
filterBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -338,7 +339,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
checkOk.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了checkBox 按钮 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了checkBox 按钮 ,");
|
||||
if (Constant.LEVEL == 1 || Constant.LEVEL == 2) {
|
||||
filterAdapter.setAddFilter(isChecked);
|
||||
filterAdapter.notifyDataSetChanged();
|
||||
@ -352,7 +353,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
filterAdapter.setItemCLick(new FilterAdapter.ItemCLick() {
|
||||
@Override
|
||||
public void item(PoiEntity poiEntity) {
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了条目item ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了条目item ,");
|
||||
//查看详情
|
||||
Message obtains = Message.obtain();
|
||||
obtains.what = Constant.FILTER_LIST_ITEM;
|
||||
@ -363,7 +364,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
filterAdapter.setItemOnCLick(new FilterAdapter.ItemOnCLick() {
|
||||
@Override
|
||||
public void item(PoiEntity poiEntity, boolean isChockBox) {
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了条目中的checkBox 按钮 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了条目中的checkBox 按钮 ,");
|
||||
if (isChockBox) {
|
||||
btnChock.add(poiEntity);
|
||||
} else {
|
||||
@ -381,7 +382,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.btn_draw:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了批量领取的按钮 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了批量领取的按钮 ,");
|
||||
if (Constant.LEVEL == 1 || Constant.LEVEL == 2) {
|
||||
if (btnChock == null) {
|
||||
return;
|
||||
@ -400,7 +401,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
}
|
||||
break;
|
||||
case R.id.btn_filter:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了地图显示的按钮 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了地图显示的按钮 ,");
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.TREASURE_FRAGMENT;
|
||||
obtain.obj = true;
|
||||
@ -414,22 +415,22 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
onBackPressed();
|
||||
break;
|
||||
case R.id.cl_number:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了任务个数的按钮 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了任务个数的按钮 ,");
|
||||
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"200", "500", "1000"}, new OnMenuItemClickListener() {
|
||||
@Override
|
||||
public void onClick(String text, int index) {
|
||||
tvNumber.setText(text);
|
||||
switch (index) {
|
||||
case 0:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了任务个数 200 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了任务个数 200 ,");
|
||||
Constant.NUMBER = 200;
|
||||
break;
|
||||
case 1:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了任务个数 500 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了任务个数 500 ,");
|
||||
Constant.NUMBER = 500;
|
||||
break;
|
||||
case 2:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了任务个数 1000 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了任务个数 1000 ,");
|
||||
Constant.NUMBER = 1000;
|
||||
break;
|
||||
}
|
||||
@ -441,30 +442,30 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
});
|
||||
break;
|
||||
case R.id.cl_photograph:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了权限类型的按钮 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了权限类型的按钮 ,");
|
||||
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"全部", "普通任务", "专属任务", "挑战任务", "奖励任务"}, new OnMenuItemClickListener() {
|
||||
@Override
|
||||
public void onClick(String text, int index) {
|
||||
tvPhotograph.setText(text);
|
||||
switch (index) {
|
||||
case 0:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了权限类型 全部 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了权限类型 全部 ,");
|
||||
Constant.LIMIT_TYPE = -1;
|
||||
break;
|
||||
case 1:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了权限类型 普通任务 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了权限类型 普通任务 ,");
|
||||
Constant.LIMIT_TYPE = 0;
|
||||
break;
|
||||
case 2:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了权限类型 专属任务 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了权限类型 专属任务 ,");
|
||||
Constant.LIMIT_TYPE = 1;
|
||||
break;
|
||||
case 3:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了权限类型 挑战任务 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了权限类型 挑战任务 ,");
|
||||
Constant.LIMIT_TYPE = 2;
|
||||
break;
|
||||
case 4:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了权限类型 奖励任务 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了权限类型 奖励任务 ,");
|
||||
Constant.LIMIT_TYPE = 3;
|
||||
break;
|
||||
}
|
||||
@ -484,38 +485,38 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
6 "面状任务"
|
||||
*/
|
||||
case R.id.cl_exclusive:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了任务类型的按钮 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了任务类型的按钮 ,");
|
||||
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"全部", "POI", "充电站", "POI录像", "道路录像", "其他", "面状任务"}, new OnMenuItemClickListener() {
|
||||
@Override
|
||||
public void onClick(String text, int index) {
|
||||
tvExclusive.setText(text);
|
||||
switch (index) {
|
||||
case 0:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了任务类型 全部 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了任务类型 全部 ,");
|
||||
Constant.TASK_TYPE = -1;
|
||||
break;
|
||||
case 1:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了任务类型 POI ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了任务类型 POI ,");
|
||||
Constant.TASK_TYPE = 1;
|
||||
break;
|
||||
case 2:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了任务类型 充电站 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了任务类型 充电站 ,");
|
||||
Constant.TASK_TYPE = 2;
|
||||
break;
|
||||
case 3:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了任务类型 POI录像 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了任务类型 POI录像 ,");
|
||||
Constant.TASK_TYPE = 3;
|
||||
break;
|
||||
case 4:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了任务类型 道路录像 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了任务类型 道路录像 ,");
|
||||
Constant.TASK_TYPE = 4;
|
||||
break;
|
||||
case 5:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了任务类型 其他 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了任务类型 其他 ,");
|
||||
Constant.TASK_TYPE = 5;
|
||||
break;
|
||||
case 6:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了任务类型 面状任务 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了任务类型 面状任务 ,");
|
||||
Constant.TASK_TYPE = 6;
|
||||
break;
|
||||
}
|
||||
@ -534,19 +535,19 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
tvType.setText(text);
|
||||
switch (index) {
|
||||
case 0:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了任务状态 全部 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了任务状态 全部 ,");
|
||||
Constant.TASK_STARTUP = -1;
|
||||
break;
|
||||
case 1:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了任务状态 未领取 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了任务状态 未领取 ,");
|
||||
Constant.TASK_STARTUP = 0;
|
||||
break;
|
||||
case 2:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了任务状态 已领取 ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了任务状态 已领取 ,");
|
||||
Constant.TASK_STARTUP = 1;
|
||||
break;
|
||||
case 3:
|
||||
filterBuilder.append(TimestampUtil.time()).append("点击了任务状态 已领取(网络) ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("点击了任务状态 已领取(网络) ,");
|
||||
Constant.TASK_STARTUP = 2;
|
||||
break;
|
||||
}
|
||||
@ -748,13 +749,13 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
filterBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
filterBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -762,7 +763,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
filterBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
filterBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
filterBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), filterBuilder.toString(), true);
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public class FindFragment extends BaseFragment implements View.OnClickListener {
|
||||
}
|
||||
}
|
||||
findBuilder = new StringBuilder();
|
||||
findBuilder.append(TimestampUtil.time()).append("FindFragment-onCreate-initData ,");
|
||||
findBuilder.append(TimestampUtil.time()).append(",").append("FindFragment-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
findBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -90,25 +90,25 @@ public class FindFragment extends BaseFragment implements View.OnClickListener {
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.linear_task_prefecture:
|
||||
findBuilder.append(TimestampUtil.time()).append("点击了最新公告:任务专区 跳转 ,");
|
||||
findBuilder.append(TimestampUtil.time()).append(",").append("点击了最新公告:任务专区 跳转 ,");
|
||||
Intent prefectureIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||
prefectureIntent.putExtra("tag", 7);
|
||||
startActivity(prefectureIntent);
|
||||
break;
|
||||
case R.id.linear_task_explain:
|
||||
findBuilder.append(TimestampUtil.time()).append("点击了帮助中心:任务说明 跳转 ,");
|
||||
findBuilder.append(TimestampUtil.time()).append(",").append("点击了帮助中心:任务说明 跳转 ,");
|
||||
Intent explainIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||
explainIntent.putExtra("tag", 8);
|
||||
startActivity(explainIntent);
|
||||
break;
|
||||
case R.id.linear_event_prefecture:
|
||||
findBuilder.append(TimestampUtil.time()).append("点击了最新公告:活动专区 跳转 ,");
|
||||
findBuilder.append(TimestampUtil.time()).append(",").append("点击了最新公告:活动专区 跳转 ,");
|
||||
Intent eventIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||
eventIntent.putExtra("tag", 9);
|
||||
startActivity(eventIntent);
|
||||
break;
|
||||
case R.id.linear_end:
|
||||
findBuilder.append(TimestampUtil.time()).append("点击了帮助中心:能力测评 ,");
|
||||
findBuilder.append(TimestampUtil.time()).append(",").append("点击了帮助中心:能力测评 ,");
|
||||
Toast.makeText(getContext(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
||||
/*Intent endIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||
endIntent.putExtra("tag", 11);
|
||||
@ -120,19 +120,19 @@ public class FindFragment extends BaseFragment implements View.OnClickListener {
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
findBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
findBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
findBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
findBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
findBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
findBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
findBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), findBuilder.toString(), true);
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
}
|
||||
forgetPawBuilder = new StringBuilder();
|
||||
forgetPawBuilder.append(TimestampUtil.time()).append("ForgetPawFragment-onViewCreated-initData,");
|
||||
forgetPawBuilder.append(TimestampUtil.time()).append(",").append("ForgetPawFragment-onViewCreated-initData,");
|
||||
if (Constant.USHERED!=null){
|
||||
forgetPawBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -106,11 +106,11 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_forgePaw_finish:
|
||||
forgetPawBuilder.append(TimestampUtil.time()).append("点击了忘记密码的返回,");
|
||||
forgetPawBuilder.append(TimestampUtil.time()).append(",").append("点击了忘记密码的返回,");
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
break;
|
||||
case R.id.forgetPaw_get_note:
|
||||
forgetPawBuilder.append(TimestampUtil.time()).append("点击了获取短信验证码,");
|
||||
forgetPawBuilder.append(TimestampUtil.time()).append(",").append("点击了获取短信验证码,");
|
||||
if (!RegexUtil.isPhone(etForgetPawPhone.getText().toString())) {
|
||||
Toast.makeText(getActivity(), "手机号错误,请重新输入", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
@ -119,7 +119,7 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
|
||||
break;
|
||||
case R.id.btn_forgetPaw:
|
||||
forgetPawBuilder.append(TimestampUtil.time()).append("点击了提交,");
|
||||
forgetPawBuilder.append(TimestampUtil.time()).append(",").append("点击了提交,");
|
||||
initForgetPaw();
|
||||
break;
|
||||
}
|
||||
@ -281,19 +281,19 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
forgetPawBuilder.append(TimestampUtil.time()).append("onPause,");
|
||||
forgetPawBuilder.append(TimestampUtil.time()).append(",").append("onPause,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
forgetPawBuilder.append(TimestampUtil.time()).append("onStop,");
|
||||
forgetPawBuilder.append(TimestampUtil.time()).append(",").append("onStop,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
forgetPawBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
forgetPawBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
forgetPawBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), forgetPawBuilder.toString(), true);
|
||||
}
|
||||
|
@ -61,8 +61,6 @@ import java.util.Objects;
|
||||
public class GatherGetFragment extends BaseFragment implements View.OnClickListener {
|
||||
private Button btnCancelGet, btnGetTask, btnGather, btnFinishGather;
|
||||
private PoiEntity poiEntity;
|
||||
private PoiDao poiDao;
|
||||
private ChargingPileDao chargingPileDao;
|
||||
private File logFile;
|
||||
private StringBuilder gatherGetBuilder;
|
||||
|
||||
@ -93,7 +91,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
}
|
||||
gatherGetBuilder = new StringBuilder();
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append("GatherGetFragment-onCreate-initData ,");
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append(",").append("GatherGetFragment-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
gatherGetBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -139,9 +137,6 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
chargingPileDao = poiDatabase.getChargingPileDao();
|
||||
TextView tvTitle = findViewById(R.id.tv_title);
|
||||
TextView tvMoney = findViewById(R.id.tv_money);
|
||||
TextView tvTime = findViewById(R.id.tv_time);
|
||||
@ -236,7 +231,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.btn_delete:
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append("点击了返回的按钮 ,");
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append(",").append("点击了返回的按钮 ,");
|
||||
assert getArguments() != null;
|
||||
boolean aBoolean = getArguments().getBoolean("boolean", false);
|
||||
Message obtain = Message.obtain();
|
||||
@ -249,13 +244,13 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
EventBus.getDefault().post(obtains);
|
||||
break;
|
||||
case R.id.btn_cancel_get://结束领取
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append("点击了结束领取的按钮 ,");
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append(",").append("点击了结束领取的按钮 ,");
|
||||
if (poiEntity != null) {
|
||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, poiEntity);
|
||||
}
|
||||
break;
|
||||
case R.id.btn_get_task://领取任务
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append("点击了领取任务的按钮 ,");
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append(",").append("点击了领取任务的按钮 ,");
|
||||
if (poiEntity != null) {
|
||||
int type = poiEntity.getType();
|
||||
if (type == 6) {//面状任务的领取类型
|
||||
@ -274,7 +269,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
break;
|
||||
case R.id.btn_gather://立即采集
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append("点击了立即采集的按钮 ,");
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append(",").append("点击了立即采集的按钮 ,");
|
||||
//如果是领取的任务或者是新得任务就只能在当前用户位置方圆5000以内才可以使用
|
||||
if (poiEntity.getTaskStatus() < 2) {
|
||||
double latitude = Constant.currentLocation.getLatitude();
|
||||
@ -284,7 +279,6 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
double geometry = GeometryTools.distanceToDouble(startLatLng, endLatLng);
|
||||
if (geometry > 5000) {
|
||||
Toast.makeText(getActivity(), "作业不在领取范围内,无法领取", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
} else {
|
||||
if (geometry > 50) {
|
||||
// Voice.sprat("注意在附近50米范围内进行采集",0);
|
||||
@ -304,7 +298,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
break;
|
||||
case R.id.btn_finish_gather://结束采集
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append("点击了结束采集的按钮 ,");
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append(",").append("点击了结束采集的按钮 ,");
|
||||
if (poiEntity != null) {
|
||||
int type = poiEntity.getType();
|
||||
if (type == 6) {
|
||||
@ -314,7 +308,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void run() {
|
||||
poiEntity.setTaskStatus(100);
|
||||
poiDao.updatePoiEntity(poiEntity);
|
||||
PoiDatabase.getInstance(getContext()).getPoiDao().updatePoiEntity(poiEntity);
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -376,7 +370,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PoiEntity taskIdPoiEntity = poiDao.getTaskIdPoiEntity(poiEntity.getTaskId());
|
||||
PoiEntity taskIdPoiEntity = PoiDatabase.getInstance(getContext()).getPoiDao().getTaskIdPoiEntity(poiEntity.getTaskId());
|
||||
if (taskIdPoiEntity == null) {
|
||||
PoiEntity chargingStationEntity = new PoiEntity();
|
||||
chargingStationEntity.setTaskId(poiEntity.getTaskId());
|
||||
@ -628,7 +622,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void run() {
|
||||
poiEntity.setTaskStatus(100);
|
||||
poiDao.updatePoiEntity(poiEntity);
|
||||
PoiDatabase.getInstance(getContext()).getPoiDao().updatePoiEntity(poiEntity);
|
||||
/* if (poiEntity.getType() == 2) {
|
||||
chargingPileDao.deleteChargingFidPileEntity(poiEntity.getId());
|
||||
}*/
|
||||
@ -772,7 +766,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void run() {
|
||||
poiEntity.setTaskStatus(100);
|
||||
poiDao.updatePoiEntity(poiEntity);
|
||||
PoiDatabase.getInstance(getContext()).getPoiDao().updatePoiEntity(poiEntity);
|
||||
}
|
||||
}).start();
|
||||
} else if (response.getCode() == 230) {
|
||||
@ -827,7 +821,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PoiEntity taskIdPoiEntity = poiDao.getTaskIdPoiEntity(poiEntity.getTaskId());
|
||||
PoiEntity taskIdPoiEntity = PoiDatabase.getInstance(getContext()).getPoiDao().getTaskIdPoiEntity(poiEntity.getTaskId());
|
||||
if (taskIdPoiEntity == null) {//数据库没有这条数据
|
||||
ReceivedPoiBean.BodyBean listBean = response.getBody();
|
||||
PoiEntity poiListEntity = new PoiEntity();
|
||||
@ -971,7 +965,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PoiEntity taskIdPoiEntity = poiDao.getTaskIdPoiEntity(poiEntity.getTaskId());
|
||||
PoiEntity taskIdPoiEntity = PoiDatabase.getInstance(getContext()).getPoiDao().getTaskIdPoiEntity(poiEntity.getTaskId());
|
||||
if (taskIdPoiEntity == null) {//数据库没有这条数据
|
||||
PoiEntity poiListEntity = new PoiEntity();
|
||||
poiListEntity.setTaskId(poiEntity.getTaskId());
|
||||
@ -1083,19 +1077,19 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
gatherGetBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), gatherGetBuilder.toString(), true);
|
||||
}
|
||||
|
@ -149,14 +149,14 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_gathering:
|
||||
gatheringBuilder.append(TimestampUtil.time()).append("点击返回的按钮 ,");
|
||||
gatheringBuilder.append(TimestampUtil.time()).append(",").append("点击返回的按钮 ,");
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
break;
|
||||
case R.id.et_bank_num:
|
||||
gatheringBuilder.append(TimestampUtil.time()).append("输入银行卡号 ,");
|
||||
gatheringBuilder.append(TimestampUtil.time()).append(",").append("输入银行卡号 ,");
|
||||
break;
|
||||
case R.id.iv_bank:
|
||||
gatheringBuilder.append(TimestampUtil.time()).append("点击弹窗 ,");
|
||||
gatheringBuilder.append(TimestampUtil.time()).append(",").append("点击弹窗 ,");
|
||||
String bankJson = new GetJsonDataUtil().getJson(Objects.requireNonNull(getContext()), "bank.json");//获取assets目录下的json文件数据
|
||||
//用Gabon 转成实体
|
||||
jsonBean = parseData(bankJson);
|
||||
@ -222,7 +222,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
dialog.show();
|
||||
break;
|
||||
case R.id.btn_bank:
|
||||
gatheringBuilder.append(TimestampUtil.time()).append("点击绑定银行卡 ,");
|
||||
gatheringBuilder.append(TimestampUtil.time()).append(",").append("点击绑定银行卡 ,");
|
||||
if (etBankNum.getText().toString().equals("")) {
|
||||
Toast.makeText(getActivity(), "银行卡号不能为空", Toast.LENGTH_SHORT).show();
|
||||
Log.e("TAG", "onClick: " + etBankNum);
|
||||
@ -231,7 +231,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
gatheringNetWork();
|
||||
break;
|
||||
case R.id.gathering_camera:
|
||||
gatheringBuilder.append(TimestampUtil.time()).append("点击拍照 ,");
|
||||
gatheringBuilder.append(TimestampUtil.time()).append(",").append("点击拍照 ,");
|
||||
Intent gatheringNumberIntent = new Intent(getActivity(), PhotographActivity.class);
|
||||
File file = PhotoUtils.showPhotoFile("a", null);
|
||||
gatheringNumberIntent.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath());
|
||||
@ -286,7 +286,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "绑定成功", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
gatheringBuilder.append(TimestampUtil.time()).append("绑定成功 ,");
|
||||
gatheringBuilder.append(TimestampUtil.time()).append(",").append("绑定成功 ,");
|
||||
Constant.BACKGROUND_NAME = bank;
|
||||
Constant.BACKGROUND = etBankAccount;
|
||||
navInfoEditor.putString("bankAccount", etBankAccount);
|
||||
@ -375,19 +375,19 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
gatheringBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
gatheringBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
gatheringBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
gatheringBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
gatheringBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
gatheringBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
gatheringBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), gatheringBuilder.toString(), true);
|
||||
}
|
||||
|
@ -520,7 +520,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
}
|
||||
hasSubmitBuilder = new StringBuilder();
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append("HasSubmitFragment-onCreate-initData ,");
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append(",").append("HasSubmitFragment-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
hasSubmitBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -530,14 +530,14 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.cl_poi:
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append("点击了poi item跳转到poi列表 ,");
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了poi item跳转到poi列表 ,");
|
||||
Intent poiIntent = new Intent(getContext(), FragmentManagement.class);
|
||||
poiIntent.putExtra("tag", 31);
|
||||
poiIntent.putExtra("type", 1);
|
||||
startActivity(poiIntent);
|
||||
break;
|
||||
case R.id.cl_road:
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append("点击了road item跳转到road列表 ,");
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了road item跳转到road列表 ,");
|
||||
Intent roadIntent = new Intent(getContext(), FragmentManagement.class);
|
||||
roadIntent.putExtra("tag", 31);
|
||||
roadIntent.putExtra("type", 4);
|
||||
@ -545,21 +545,21 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
break;
|
||||
|
||||
case R.id.cl_charging:
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append("点击了charging item跳转到charging列表 ,");
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了charging item跳转到charging列表 ,");
|
||||
Intent chargingIntent = new Intent(getContext(), FragmentManagement.class);
|
||||
chargingIntent.putExtra("tag", 31);
|
||||
chargingIntent.putExtra("type", 2);
|
||||
startActivity(chargingIntent);
|
||||
break;
|
||||
case R.id.cl_other:
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append("点击了other item跳转到other列表 ,");
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了other item跳转到other列表 ,");
|
||||
Intent otherIntent = new Intent(getContext(), FragmentManagement.class);
|
||||
otherIntent.putExtra("tag", 31);
|
||||
otherIntent.putExtra("type", 5);
|
||||
startActivity(otherIntent);
|
||||
break;
|
||||
case R.id.cl_poiVideo:
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append("点击了poiVideo item跳转到poiVideo列表 ,");
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了poiVideo item跳转到poiVideo列表 ,");
|
||||
Intent poiVideoIntent = new Intent(getContext(), FragmentManagement.class);
|
||||
poiVideoIntent.putExtra("tag", 31);
|
||||
poiVideoIntent.putExtra("type", 3);
|
||||
@ -571,13 +571,13 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -585,7 +585,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
hasSubmitBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), hasSubmitBuilder.toString(), true);
|
||||
}
|
||||
|
@ -78,10 +78,10 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
||||
@Override
|
||||
public void item(int id) {
|
||||
|
||||
messageBuilder.append(TimestampUtil.time()).append("点击item ,");
|
||||
messageBuilder.append(TimestampUtil.time()).append(",").append("点击item ,");
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("id", id + "");
|
||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||
intentWebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||
}
|
||||
});
|
||||
messageRecycler.getDefaultFootView().setNoMoreHint("已全部加载完毕");
|
||||
@ -162,7 +162,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
||||
}
|
||||
}
|
||||
messageBuilder = new StringBuilder();
|
||||
messageBuilder.append(TimestampUtil.time()).append("MessageFragment-onCreate-initData ,");
|
||||
messageBuilder.append(TimestampUtil.time()).append(",").append("MessageFragment-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
messageBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -171,7 +171,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.message_final) {
|
||||
messageBuilder.append(TimestampUtil.time()).append("点击返回,");
|
||||
messageBuilder.append(TimestampUtil.time()).append(",").append("点击返回,");
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
}
|
||||
}
|
||||
@ -179,19 +179,19 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
messageBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
messageBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
messageBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
messageBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
messageBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
messageBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
messageBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), messageBuilder.toString(), true);
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
}
|
||||
}
|
||||
mainBuilder = new StringBuilder();
|
||||
mainBuilder.append(TimestampUtil.time()).append("MineFragment-onCreate-initData ,");
|
||||
mainBuilder.append(TimestampUtil.time()).append(",").append("MineFragment-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
mainBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -234,7 +234,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
switch (v.getId()) {
|
||||
case R.id.image_heard:
|
||||
case R.id.tv_name://跳转到个人信息
|
||||
mainBuilder.append(TimestampUtil.time()).append("点击了头像和名字 跳转到个人信息 ,");
|
||||
mainBuilder.append(TimestampUtil.time()).append(",").append("点击了头像和名字 跳转到个人信息 ,");
|
||||
Intent intentUser = new Intent(getActivity(), UserActivity.class);
|
||||
intentUser.putExtra("tag", 16);
|
||||
startActivity(intentUser);
|
||||
@ -257,7 +257,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
case R.id.btn_withdraw://提现页面
|
||||
mainBuilder.append(TimestampUtil.time()).append("点击了去提现的按钮 ,");
|
||||
mainBuilder.append(TimestampUtil.time()).append(",").append("点击了去提现的按钮 ,");
|
||||
Intent intentWithdraw = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentWithdraw.putExtra("tag", 15);
|
||||
startActivity(intentWithdraw);
|
||||
@ -272,19 +272,19 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
intentSet.putExtra("tag", 22);
|
||||
startActivity(intentSet);*/
|
||||
case R.id.rl_contact://联系我们
|
||||
mainBuilder.append(TimestampUtil.time()).append("点击了item 跳转到联系我们 ,");
|
||||
mainBuilder.append(TimestampUtil.time()).append(",").append("点击了item 跳转到联系我们 ,");
|
||||
Intent intentContact = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentContact.putExtra("tag", 21);
|
||||
startActivity(intentContact);
|
||||
break;
|
||||
case R.id.rl_about://关于
|
||||
mainBuilder.append(TimestampUtil.time()).append("点击了item 跳转到关于页面 ,");
|
||||
mainBuilder.append(TimestampUtil.time()).append(",").append("点击了item 跳转到关于页面 ,");
|
||||
Intent intentAbout = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentAbout.putExtra("tag", 23);
|
||||
startActivity(intentAbout);
|
||||
break;
|
||||
case R.id.btn_quit://退出登录
|
||||
mainBuilder.append(TimestampUtil.time()).append("点击了退出登录的按钮 ,");
|
||||
mainBuilder.append(TimestampUtil.time()).append(",").append("点击了退出登录的按钮 ,");
|
||||
Intent intent = new Intent(getContext(), LoginActivity.class);
|
||||
startActivity(intent);
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
@ -295,13 +295,13 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
mainBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
mainBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
mainBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
mainBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -309,7 +309,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
mainBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
mainBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
mainBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), mainBuilder.toString(), true);
|
||||
}
|
||||
|
@ -102,7 +102,6 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
private ImageView ivPictures;
|
||||
private TextView tvPictures;
|
||||
private Button btnOtherLocal;
|
||||
private PoiDao poiDao;
|
||||
private LatLng latLng;
|
||||
private int station_type = 7;
|
||||
private ArrayList<File> otherUploadList;
|
||||
@ -163,7 +162,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "当前在任务作业中,是否退出", "确定", "取消").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
otherBuilder.append(TimestampUtil.time()).append("点击了返回当前页面的 确定 按钮,");
|
||||
otherBuilder.append(TimestampUtil.time()).append(",").append("点击了返回当前页面的 确定 按钮,");
|
||||
if (showPoiEntity != null) {
|
||||
if (showPoiEntity.getTaskStatus() == 5) {
|
||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
||||
@ -206,7 +205,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
}).setOnCancelButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
otherBuilder.append(TimestampUtil.time()).append("点击了返回当前页面的 取消 按钮,");
|
||||
otherBuilder.append(TimestampUtil.time()).append(",").append("点击了返回当前页面的 取消 按钮,");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@ -215,8 +214,6 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
spinnerOther = findViewById(R.id.spinner_other);
|
||||
ArrayAdapter<String> adapterOthers = new ArrayAdapter<>(Objects.requireNonNull(getContext()), android.R.layout.simple_spinner_item, others);
|
||||
adapterOthers.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||
@ -226,15 +223,15 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
switch (position) {
|
||||
case 0:
|
||||
otherBuilder.append(TimestampUtil.time()).append("下拉框选择 门牌 ,");
|
||||
otherBuilder.append(TimestampUtil.time()).append(",").append("下拉框选择 门牌 ,");
|
||||
station_type = 7;
|
||||
break;
|
||||
case 1:
|
||||
otherBuilder.append(TimestampUtil.time()).append("下拉框选择 公交 ,");
|
||||
otherBuilder.append(TimestampUtil.time()).append(",").append("下拉框选择 公交 ,");
|
||||
station_type = 8;
|
||||
break;
|
||||
case 2:
|
||||
otherBuilder.append(TimestampUtil.time()).append("下拉框选择 情报 ,");
|
||||
otherBuilder.append(TimestampUtil.time()).append(",").append("下拉框选择 情报 ,");
|
||||
station_type = 9;
|
||||
break;
|
||||
}
|
||||
@ -248,7 +245,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
checkPot.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
otherBuilder.append(TimestampUtil.time()).append("点击了点位编辑,");
|
||||
otherBuilder.append(TimestampUtil.time()).append(",").append("点击了点位编辑,");
|
||||
if (checkPot.isChecked()) {
|
||||
moveLatlng(latLng, new TencentMap.CancelableCallback() {
|
||||
@Override
|
||||
@ -314,15 +311,15 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
switch (position) {
|
||||
case 0:
|
||||
otherBuilder.append(TimestampUtil.time()).append("下拉框选择 存在 ,");
|
||||
otherBuilder.append(TimestampUtil.time()).append(",").append("下拉框选择 存在 ,");
|
||||
existence = 0;
|
||||
break;
|
||||
case 1:
|
||||
otherBuilder.append(TimestampUtil.time()).append("下拉框选择 不存在 ,");
|
||||
otherBuilder.append(TimestampUtil.time()).append(",").append("下拉框选择 不存在 ,");
|
||||
existence = 1;
|
||||
break;
|
||||
case 2:
|
||||
otherBuilder.append(TimestampUtil.time()).append("下拉框选择 无法验证 ,");
|
||||
otherBuilder.append(TimestampUtil.time()).append(",").append("下拉框选择 无法验证 ,");
|
||||
existence = 2;
|
||||
break;
|
||||
}
|
||||
@ -346,7 +343,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
otherBuilder.append(TimestampUtil.time()).append("长按删除图片 点击了确定按钮 ,");
|
||||
otherBuilder.append(TimestampUtil.time()).append(",").append("长按删除图片 点击了确定按钮 ,");
|
||||
ivPicture.setImageDrawable(null);
|
||||
if (tvPicture.getTag() != null) {
|
||||
File file = new File((String) tvPicture.getTag());
|
||||
@ -367,7 +364,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
otherBuilder.append(TimestampUtil.time()).append("长按删除图片 点击了确定按钮 ,");
|
||||
otherBuilder.append(TimestampUtil.time()).append(",").append("长按删除图片 点击了确定按钮 ,");
|
||||
ivPictures.setImageDrawable(null);
|
||||
if (tvPictures.getTag() != null) {
|
||||
File file = new File((String) tvPictures.getTag());
|
||||
@ -425,7 +422,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
otherBuilder = new StringBuilder();
|
||||
otherBuilder.append(TimestampUtil.time()).append("OtherActivity-onCreate-initData ,");
|
||||
otherBuilder.append(TimestampUtil.time()).append(",").append("OtherActivity-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
otherBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -513,25 +510,25 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.rl_picture:
|
||||
otherBuilder.append(TimestampUtil.time()).append("点击了第一个照片进行拍照 ,");
|
||||
otherBuilder.append(TimestampUtil.time()).append(",").append("点击了第一个照片进行拍照 ,");
|
||||
Intent intentPicture = new Intent(getActivity(), PhotographActivity.class);
|
||||
File file = PhotoUtils.showPhotoFile("a", latLng);
|
||||
intentPicture.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath());
|
||||
startActivityForResult(intentPicture, 101);
|
||||
break;
|
||||
case R.id.rl_pictures:
|
||||
otherBuilder.append(TimestampUtil.time()).append("点击了第二个照片进行拍照 ,");
|
||||
otherBuilder.append(TimestampUtil.time()).append(",").append("点击了第二个照片进行拍照 ,");
|
||||
Intent intentPictures = new Intent(getActivity(), PhotographActivity.class);
|
||||
File files = PhotoUtils.showPhotoFile("b", latLng);
|
||||
intentPictures.putExtra(Constant.INTENT_PHOTO_PATH, files.getPath());
|
||||
startActivityForResult(intentPictures, 102);
|
||||
break;
|
||||
case R.id.btn_other_local:
|
||||
otherBuilder.append(TimestampUtil.time()).append("点击了保存本地的按钮,");
|
||||
otherBuilder.append(TimestampUtil.time()).append(",").append("点击了保存本地的按钮,");
|
||||
initPoiSaveLocal(false);
|
||||
break;
|
||||
case R.id.btn_other_uploading:
|
||||
otherBuilder.append(TimestampUtil.time()).append("点击了上传的按钮,");
|
||||
otherBuilder.append(TimestampUtil.time()).append(",").append("点击了上传的按钮,");
|
||||
if (otherUploadList != null) {
|
||||
otherUploadList.clear();
|
||||
}
|
||||
@ -891,7 +888,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
@Override
|
||||
public void run() {
|
||||
poiEntity.setTaskStatus(100);
|
||||
poiDao.updatePoiEntity(poiEntity);
|
||||
PoiDatabase.getInstance(getContext()).getPoiDao().updatePoiEntity(poiEntity);
|
||||
}
|
||||
}).start();
|
||||
//initList();
|
||||
|
@ -104,7 +104,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
private ArrayList<PhoneBean> poiBeans;
|
||||
private Button btnSaveLocal;
|
||||
private Button btnUploading;
|
||||
private PoiDao poiDao;
|
||||
|
||||
private CheckBox checkBoxLife;
|
||||
private LatLng latLng;
|
||||
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
||||
@ -173,7 +173,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "当前在任务作业中,是否退出", "确定", "取消").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
poiBuilder.append(TimestampUtil.time()).append("点击了返回当前页面的 确定 按钮,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了返回当前页面的 确定 按钮,");
|
||||
if (showPoiEntity != null) {
|
||||
if (showPoiEntity.getTaskStatus() == 5) {
|
||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
||||
@ -216,7 +216,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
}).setOnCancelButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
poiBuilder.append(TimestampUtil.time()).append("点击了返回当前页面的 取消 按钮,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了返回当前页面的 取消 按钮,");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@ -225,14 +225,12 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
CheckBox checkBoxRight = findViewById(R.id.check_pot_right);
|
||||
checkBoxLife = findViewById(R.id.check_pot_life);
|
||||
checkBoxLife.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
poiBuilder.append(TimestampUtil.time()).append("点击了点位编辑,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了点位编辑,");
|
||||
if (checkBoxLife.isChecked()) {
|
||||
moveLatlng(latLng, new TencentMap.CancelableCallback() {
|
||||
@Override
|
||||
@ -317,15 +315,15 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
switch (position) {
|
||||
case 0:
|
||||
poiBuilder.append(TimestampUtil.time()).append("下拉框选择 存在 ,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("下拉框选择 存在 ,");
|
||||
existence = 0;
|
||||
break;
|
||||
case 1:
|
||||
poiBuilder.append(TimestampUtil.time()).append("下拉框选择 不存在 ,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("下拉框选择 不存在 ,");
|
||||
existence = 1;
|
||||
break;
|
||||
case 2:
|
||||
poiBuilder.append(TimestampUtil.time()).append("下拉框选择 无法验证 ,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("下拉框选择 无法验证 ,");
|
||||
existence = 2;
|
||||
break;
|
||||
}
|
||||
@ -351,7 +349,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
poiBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了长按删除图片确定 按钮,");
|
||||
ivPanorama.setImageDrawable(null);
|
||||
if (tvPanorama.getTag() != null) {
|
||||
File file = new File((String) tvPanorama.getTag());
|
||||
@ -371,7 +369,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
poiBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了长按删除图片确定 按钮,");
|
||||
ivName.setImageDrawable(null);
|
||||
if (tvPoiNamePic.getTag() != null) {
|
||||
File file = new File((String) tvPoiNamePic.getTag());
|
||||
@ -391,7 +389,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
poiBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了长按删除图片确定 按钮,");
|
||||
ivElse.setImageDrawable(null);
|
||||
if (tvElse.getTag() != null) {
|
||||
File file = new File((String) tvElse.getTag());
|
||||
@ -411,7 +409,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
poiBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了长按删除图片确定 按钮,");
|
||||
ivInternal.setImageDrawable(null);
|
||||
if (tvInternal.getTag() != null) {
|
||||
File file = new File((String) tvInternal.getTag());
|
||||
@ -432,7 +430,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
poiBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了长按删除图片确定 按钮,");
|
||||
ivCard.setImageDrawable(null);
|
||||
if (tvCard.getTag() != null) {
|
||||
File file = new File((String) tvCard.getTag());
|
||||
@ -717,7 +715,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
}
|
||||
}
|
||||
poiBuilder = new StringBuilder();
|
||||
poiBuilder.append(TimestampUtil.time()).append("PoiActivity-onCreate-initData ,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("PoiActivity-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
poiBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -736,11 +734,11 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.btn_save_local:
|
||||
poiBuilder.append(TimestampUtil.time()).append("点击了保存本地的按钮,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了保存本地的按钮,");
|
||||
initPoiSaveLocal(false);
|
||||
break;
|
||||
case R.id.btn_uploading:
|
||||
poiBuilder.append(TimestampUtil.time()).append("点击了上传的按钮,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了上传的按钮,");
|
||||
if (poiPicList != null) {
|
||||
poiPicList.clear();
|
||||
}
|
||||
@ -794,40 +792,40 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
}
|
||||
break;
|
||||
case R.id.tv_poi_examine:
|
||||
poiBuilder.append(TimestampUtil.time()).append("点击了查重的按钮,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了查重的按钮,");
|
||||
findingDuplicateByWork();
|
||||
break;
|
||||
case R.id.rl_panorama:
|
||||
findingDuplicateByWork();
|
||||
poiBuilder.append(TimestampUtil.time()).append("点击了全景图的进行拍照,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了全景图的进行拍照,");
|
||||
Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class);
|
||||
File filePanorama = PhotoUtils.showPhotoFile("a", latLng);
|
||||
intentPanorama.putExtra(Constant.INTENT_PHOTO_PATH, filePanorama.getPath());
|
||||
startActivityForResult(intentPanorama, 101);
|
||||
break;
|
||||
case R.id.rl_name:
|
||||
poiBuilder.append(TimestampUtil.time()).append("点击了名称的进行拍照,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了名称的进行拍照,");
|
||||
Intent intentName = new Intent(getActivity(), PhotographActivity.class);
|
||||
File fileName = PhotoUtils.showPhotoFile("b", latLng);
|
||||
intentName.putExtra(Constant.INTENT_PHOTO_PATH, fileName.getPath());
|
||||
startActivityForResult(intentName, 102);
|
||||
break;
|
||||
case R.id.rl_internal_photos:
|
||||
poiBuilder.append(TimestampUtil.time()).append("点击了内部照片的进行拍照,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了内部照片的进行拍照,");
|
||||
Intent intentInternal = new Intent(getActivity(), PhotographActivity.class);
|
||||
File fileInternal = PhotoUtils.showPhotoFile("c", latLng);
|
||||
intentInternal.putExtra(Constant.INTENT_PHOTO_PATH, fileInternal.getPath());
|
||||
startActivityForResult(intentInternal, 103);
|
||||
break;
|
||||
case R.id.rl_card:
|
||||
poiBuilder.append(TimestampUtil.time()).append("点击了名片的进行拍照,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了名片的进行拍照,");
|
||||
Intent intentCard = new Intent(getActivity(), PhotographActivity.class);
|
||||
File fileCard = PhotoUtils.showPhotoFile("d", latLng);
|
||||
intentCard.putExtra(Constant.INTENT_PHOTO_PATH, fileCard.getPath());
|
||||
startActivityForResult(intentCard, 104);
|
||||
break;
|
||||
case R.id.rl_else:
|
||||
poiBuilder.append(TimestampUtil.time()).append("点击了其他的进行拍照,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了其他的进行拍照,");
|
||||
Intent intentElse = new Intent(getActivity(), PhotographActivity.class);
|
||||
File fileElse = PhotoUtils.showPhotoFile("e", latLng);
|
||||
intentElse.putExtra(Constant.INTENT_PHOTO_PATH, fileElse.getPath());
|
||||
@ -1254,13 +1252,13 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
poiBuilder.append(TimestampUtil.time()).append("onPause,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("onPause,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
poiBuilder.append(TimestampUtil.time()).append("onStop,");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("onStop,");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1271,7 +1269,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
if (markerPoi != null) {
|
||||
markerPoi.remove();
|
||||
}
|
||||
poiBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
poiBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
poiBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), poiBuilder.toString(), true);
|
||||
}
|
||||
@ -1301,7 +1299,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void run() {
|
||||
poiEntity.setTaskStatus(100);
|
||||
poiDao.updatePoiEntity(poiEntity);
|
||||
PoiDatabase.getInstance(getActivity()).getPoiDao().updatePoiEntity(poiEntity);
|
||||
}
|
||||
}).start();
|
||||
//initList();
|
||||
|
@ -130,7 +130,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
}
|
||||
}
|
||||
poiTaskBuilder = new StringBuilder();
|
||||
poiTaskBuilder.append(TimestampUtil.time()).append("PoiTaskFragment-onCreate-initData ,");
|
||||
poiTaskBuilder.append(TimestampUtil.time()).append(",").append("PoiTaskFragment-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
poiTaskBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -221,26 +221,26 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.iv_poiTask_finish) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
poiTaskBuilder.append(TimestampUtil.time()).append("点击返回按钮 ,");
|
||||
poiTaskBuilder.append(TimestampUtil.time()).append(",").append("点击返回按钮 ,");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
poiTaskBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
poiTaskBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
poiTaskBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
poiTaskBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
poiTaskBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
poiTaskBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
poiTaskBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), poiTaskBuilder.toString(), true);
|
||||
}
|
||||
|
@ -82,15 +82,14 @@ import java.util.Objects;
|
||||
*/
|
||||
|
||||
public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||
private EditText etRoadName,etDesc;
|
||||
private EditText etRoadName, etDesc;
|
||||
private ImageView ivPoiVideoPicture;
|
||||
private Button btnRoadSave;
|
||||
private PoiDao poiDao;
|
||||
private File fileZip,logFile;
|
||||
private File fileZip, logFile;
|
||||
private FrameLayout fmPoiVideoPic;
|
||||
private LatLng latLng;
|
||||
private Marker markerPoiVideo;
|
||||
private TextView tvCombo,tvShort;
|
||||
private TextView tvCombo, tvShort;
|
||||
private StringBuilder poiVideoBuilder;
|
||||
private LatLng rearLatLng;
|
||||
|
||||
@ -145,7 +144,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "当前在任务作业中,是否退出", "确定", "取消").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append("点击了返回当前页面的 确定 按钮,");
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了返回当前页面的 确定 按钮,");
|
||||
if (showPoiEntity != null) {
|
||||
if (showPoiEntity.getTaskStatus() == 5) {
|
||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
||||
@ -195,7 +194,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
}).setOnCancelButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append("点击了返回当前页面的 取消 按钮,");
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了返回当前页面的 取消 按钮,");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@ -204,8 +203,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
||||
NestedScrollView nestedScrollView = findViewById(R.id.nested_scroll_view);
|
||||
if (slidingPaneLayout != null) {
|
||||
@ -229,7 +226,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append("点击了长按删除图片的 按钮,");
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了长按删除图片的 按钮,");
|
||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||
fileListByUUID.get(i).delete();
|
||||
@ -271,7 +268,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
}
|
||||
}
|
||||
poiVideoBuilder = new StringBuilder();
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append("PoiVideoActivity-onCreate-initData ,");
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("PoiVideoActivity-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
poiVideoBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -414,7 +411,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.fm_poi_video_picture:
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append("点击了图片查看列表 ,");
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了图片查看列表 ,");
|
||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||
if (fileListByUUID.size() > 1) {
|
||||
Intent photoAlbumIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||
@ -426,11 +423,11 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
}
|
||||
break;
|
||||
case R.id.btn_poi_video_save:
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append("点击了保存本地的按钮 ,");
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了保存本地的按钮 ,");
|
||||
initPoiSaveLocal(false);
|
||||
break;
|
||||
case R.id.tv_short://点击拍摄
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append("点击了拍摄的按钮 ,");
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了拍摄的按钮 ,");
|
||||
double latitude = Constant.currentLocation.getLatitude();
|
||||
double longitude = Constant.currentLocation.getLongitude();
|
||||
LatLng startLatLng = new LatLng(latitude, longitude); //用户当前位置
|
||||
@ -456,7 +453,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
startActivityForResult(intents, 0x102);
|
||||
break;
|
||||
case R.id.tv_combo://自动连拍:
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append("点击了自动连拍的按钮 ,");
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了自动连拍的按钮 ,");
|
||||
LatLng startLng = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()); //用户当前位置
|
||||
double geom = GeometryTools.distanceToDouble(startLng, latLng);
|
||||
double rearGeom = GeometryTools.distanceToDouble(startLng, rearLatLng);
|
||||
@ -480,7 +477,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
startActivityForResult(intent, 0x101);
|
||||
break;
|
||||
case R.id.btn_poi_video_upload:
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append("点击了上传的按钮 ,");
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了上传的按钮 ,");
|
||||
if (Constant.isPresent) {
|
||||
if (fmPoiVideoPic.getTag() != null) {
|
||||
List<File> videoFileList = (List<File>) fmPoiVideoPic.getTag();
|
||||
@ -498,7 +495,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
if (showPoiEntity == null) {
|
||||
showPoiEntity = new PoiEntity();
|
||||
}
|
||||
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 2 || showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 5) {
|
||||
if (showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 2 || showPoiEntity.getTaskStatus() == 5) {
|
||||
initPoiSaveLocal(true);
|
||||
} else {
|
||||
poiVideoUpload(showPoiEntity.getBodyId(), fileZip);
|
||||
@ -767,13 +764,13 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -784,7 +781,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
if (markerPoiVideo != null) {
|
||||
markerPoiVideo.remove();
|
||||
}
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append("onDestroy ");
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("onDestroy ");
|
||||
poiVideoBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), poiVideoBuilder.toString(), true);
|
||||
}
|
||||
@ -813,7 +810,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
@Override
|
||||
public void run() {
|
||||
poiEntity.setTaskStatus(100);
|
||||
poiDao.updatePoiEntity(poiEntity);
|
||||
PoiDatabase.getInstance(getActivity()).getPoiDao().updatePoiEntity(poiEntity);
|
||||
}
|
||||
}).start();
|
||||
/*if (poiEntity.getId() != null) {
|
||||
|
@ -109,7 +109,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
}
|
||||
registerBuilder = new StringBuilder();
|
||||
registerBuilder.append(TimestampUtil.time()).append("RegisterFragment-onViewCreated-initData,");
|
||||
registerBuilder.append(TimestampUtil.time()).append(",").append("RegisterFragment-onViewCreated-initData,");
|
||||
if (Constant.USHERED != null) {
|
||||
registerBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -119,20 +119,20 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_register_finish:
|
||||
registerBuilder.append(TimestampUtil.time()).append("注册点击了返回,");
|
||||
registerBuilder.append(TimestampUtil.time()).append(",").append("注册点击了返回,");
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
break;
|
||||
case R.id.have_go_login:
|
||||
registerBuilder.append(TimestampUtil.time()).append("点击了已有账号,去登录,");
|
||||
registerBuilder.append(TimestampUtil.time()).append(",").append("点击了已有账号,去登录,");
|
||||
Intent registerLogin = new Intent(getActivity(), LoginActivity.class);
|
||||
startActivity(registerLogin);
|
||||
break;
|
||||
case R.id.btn_register:
|
||||
registerBuilder.append(TimestampUtil.time()).append("点击了注册,");
|
||||
registerBuilder.append(TimestampUtil.time()).append(",").append("点击了注册,");
|
||||
initRegister();
|
||||
break;
|
||||
case R.id.register_get_note:
|
||||
registerBuilder.append(TimestampUtil.time()).append("点击了获取短信验证码,");
|
||||
registerBuilder.append(TimestampUtil.time()).append(",").append("点击了获取短信验证码,");
|
||||
if (!RegexUtil.isPhone(etRegisterPhone.getText().toString())) {
|
||||
Toast.makeText(getActivity(), "手机号错误,请重新输入", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
@ -281,8 +281,6 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void registerNote() {
|
||||
@ -309,20 +307,19 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
|
||||
registerBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
registerBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
registerBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
registerBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
registerBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
registerBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
registerBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), registerBuilder.toString(), true);
|
||||
}
|
||||
|
@ -87,7 +87,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
private EditText etRoadName, etDesc;
|
||||
private ImageView ivRoadPicture;
|
||||
private Button btnRoadSave;
|
||||
private PoiDao poiDao;
|
||||
private File fileZip;
|
||||
private FrameLayout fmRoadPic;
|
||||
private Marker markerRoad;
|
||||
@ -142,7 +141,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
.setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
roadBuilder.append(TimestampUtil.time()).append("点击了返回当前页面的 确认 按钮,");
|
||||
roadBuilder.append(TimestampUtil.time()).append(",").append("点击了返回当前页面的 确认 按钮,");
|
||||
if (showPoiEntity != null) {
|
||||
if (showPoiEntity.getTaskStatus() == 5) {
|
||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
||||
@ -193,7 +192,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
.setOnCancelButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
roadBuilder.append(TimestampUtil.time()).append("点击了返回当前页面的 取消 按钮,");
|
||||
roadBuilder.append(TimestampUtil.time()).append(",").append("点击了返回当前页面的 取消 按钮,");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@ -208,8 +207,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
tvPictures = findViewById(R.id.tv_pictures);
|
||||
tvPictures.setOnClickListener(this);
|
||||
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
||||
@ -229,7 +226,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
roadBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
|
||||
roadBuilder.append(TimestampUtil.time()).append(",").append("点击长按删除 确定按钮,");
|
||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||
fileListByUUID.get(i).delete();
|
||||
@ -271,7 +268,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
}
|
||||
}
|
||||
roadBuilder = new StringBuilder();
|
||||
roadBuilder.append(TimestampUtil.time()).append("RoadActivity-onCreate-initData ,");
|
||||
roadBuilder.append(TimestampUtil.time()).append(",").append("RoadActivity-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
roadBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -431,11 +428,11 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.btn_road_save:
|
||||
roadBuilder.append(TimestampUtil.time()).append("点击了保存本地的按钮 ,");
|
||||
roadBuilder.append(TimestampUtil.time()).append(",").append("点击了保存本地的按钮 ,");
|
||||
initPoiSaveLocal(false);
|
||||
break;
|
||||
case R.id.fm_road_picture:
|
||||
roadBuilder.append(TimestampUtil.time()).append("点击了图片查看列表 ,");
|
||||
roadBuilder.append(TimestampUtil.time()).append(",").append("点击了图片查看列表 ,");
|
||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||
if (fileListByUUID.size() > 1) {
|
||||
Intent photoAlbumIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||
@ -447,7 +444,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
}
|
||||
break;
|
||||
case R.id.tv_pictures:
|
||||
roadBuilder.append(TimestampUtil.time()).append("点击了自动拍照的按钮 ,");
|
||||
roadBuilder.append(TimestampUtil.time()).append(",").append("点击了自动拍照的按钮 ,");
|
||||
double latitude = Constant.currentLocation.getLatitude();
|
||||
double longitude = Constant.currentLocation.getLongitude();
|
||||
LatLng startLatLng = new LatLng(latitude, longitude);//用户当前位置
|
||||
@ -473,7 +470,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
startActivityForResult(intent, 0x101);
|
||||
break;
|
||||
case R.id.road_upload:
|
||||
roadBuilder.append(TimestampUtil.time()).append("点击了上传的按钮 ,");
|
||||
roadBuilder.append(TimestampUtil.time()).append(",").append("点击了上传的按钮 ,");
|
||||
if (Constant.isPresent) {
|
||||
if (fmRoadPic.getTag() != null) {
|
||||
List<File> videoFileList = (List<File>) fmRoadPic.getTag();
|
||||
@ -763,13 +760,13 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
roadBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
roadBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
roadBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
roadBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -780,7 +777,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
if (markerRoad != null) {
|
||||
markerRoad.remove();
|
||||
}
|
||||
roadBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
roadBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
roadBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), roadBuilder.toString(), true);
|
||||
}
|
||||
@ -809,7 +806,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
@Override
|
||||
public void run() {
|
||||
poiEntity.setTaskStatus(100);
|
||||
poiDao.updatePoiEntity(poiEntity);
|
||||
PoiDatabase.getInstance(getContext()).getPoiDao().updatePoiEntity(poiEntity);
|
||||
}
|
||||
}).start();
|
||||
/*if (poiEntity.getId() != null) {
|
||||
|
@ -109,7 +109,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
staySubmitAdapter.setOnClickItem(new StaySubmitAdapter.onClickItem() {
|
||||
@Override
|
||||
public void item(int position, PoiEntity poiEntity) {
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append("点击了条目item 进行跳转 ,");
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了条目item 进行跳转 ,");
|
||||
Message subObtain = Message.obtain();
|
||||
subObtain.what = Constant.EVENT_WORK_HOME;
|
||||
subObtain.obj = true;
|
||||
@ -124,12 +124,11 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
cbSelect.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append("点击了全选进行勾选 ,");
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了全选进行勾选 ,");
|
||||
staySubmitAdapter.setAllDataChecked(isChecked);
|
||||
staySubmitAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -164,7 +163,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
}
|
||||
}
|
||||
staySubmitBuilder = new StringBuilder();
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append("StaySubmitFragment-onCreate-initData ,");
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append(",").append("StaySubmitFragment-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
staySubmitBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -196,7 +195,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
dismissLoadingDialog();
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
public List<PoiEntity> initRoadWord(int type) {
|
||||
@ -218,7 +217,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.cl_stay_type://1 "POI"2 "充电站"3 "POI录像"4 "道路录像"5 "其他"6 "面状任务"
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append("点击了待提交的类型 ,");
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了待提交的类型 ,");
|
||||
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"全部", "poi", "充电站", "poi录像", "道路录像", "其他"}, new OnMenuItemClickListener() {
|
||||
@Override
|
||||
public void onClick(String text, int index) {
|
||||
@ -253,7 +252,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
});
|
||||
break;
|
||||
case R.id.tv_delete:
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append("点击了删除按钮 ,");
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了删除按钮 ,");
|
||||
if (Constant.isPresent) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@ -268,7 +267,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
}
|
||||
break;
|
||||
case R.id.btn_stay_submit://提交
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append("点击了提交的按钮 ,");
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了提交的按钮 ,");
|
||||
if (Constant.isPresent) {
|
||||
if (poiEntities == null) {
|
||||
poiEntities = new ArrayList<>();
|
||||
@ -380,43 +379,48 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
newEntities.clear();
|
||||
}
|
||||
PoiDatabase roadDatabase = PoiDatabase.getInstance(getContext());
|
||||
PoiDao roadDao = roadDatabase.getPoiDao();
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append("refreshData ,");
|
||||
if (roadDao != null) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
List<PoiEntity> roadAll = roadDao.getAllPoiByRecoded();
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (Constant.USHERED != null) {
|
||||
staySubmitBuilder.append("refreshData - userId:").append(Constant.USHERED).append(" path:").append(PoiDatabase.getDbName).append(",");
|
||||
if (roadDatabase != null) {
|
||||
PoiDao roadDao = roadDatabase.getPoiDao();
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append(",").append("refreshData ,");
|
||||
if (roadDao != null) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
List<PoiEntity> roadAll = roadDao.getAllPoiByRecoded();
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (Constant.USHERED != null) {
|
||||
staySubmitBuilder.append("refreshData - userId:").append(Constant.USHERED).append(" path:").append(PoiDatabase.getDbName).append(",");
|
||||
}
|
||||
roadEntities.clear();
|
||||
roadEntities.addAll(roadAll);
|
||||
staySubmitAdapter.setAllRoad(roadEntities);
|
||||
staySubmitAdapter.notifyDataSetChanged();
|
||||
}
|
||||
roadEntities.clear();
|
||||
roadEntities.addAll(roadAll);
|
||||
staySubmitAdapter.setAllRoad(roadEntities);
|
||||
staySubmitAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
} catch (Exception e) {
|
||||
UMCrash.generateCustomLog(e, "自定义");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
UMCrash.generateCustomLog(e, "自定义");
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "无法读取数据库,请尝试重启程序!", Toast.LENGTH_SHORT).show();
|
||||
UMCrash.generateCustomLog("无法读取数据库", "自定义");
|
||||
}).start();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "无法读取数据库,请尝试重启程序!", Toast.LENGTH_SHORT).show();
|
||||
UMCrash.generateCustomLog("无法读取数据库", "自定义");
|
||||
}
|
||||
}else {
|
||||
Toast.makeText(getActivity(), "数据库创建失败,请关闭程序重新进入", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -425,7 +429,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
dismissLoadingDialog();
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
staySubmitBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
staySubmitBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), staySubmitBuilder.toString(), true);
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
taskExplainAdapter.setOnItemClick(new TaskExplainAdapter.OnItemClick() {
|
||||
@Override
|
||||
public void onClick(int pos) {
|
||||
taskExplainBuilder.append(TimestampUtil.time()).append("点击了item ,");
|
||||
taskExplainBuilder.append(TimestampUtil.time()).append(",").append("点击了item ,");
|
||||
Intent itemIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||
itemIntent.putExtra("tag", 10);
|
||||
itemIntent.putExtra("id", pos + "");
|
||||
@ -132,7 +132,7 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
taskExplainBuilder = new StringBuilder();
|
||||
taskExplainBuilder.append(TimestampUtil.time()).append("TaskExplainFragment-onCreate-initData ,");
|
||||
taskExplainBuilder.append(TimestampUtil.time()).append(",").append("TaskExplainFragment-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
taskExplainBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -214,26 +214,26 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.iv_find_task_explain) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
taskExplainBuilder.append(TimestampUtil.time()).append("点击了返回的按钮 ,");
|
||||
taskExplainBuilder.append(TimestampUtil.time()).append(",").append("点击了返回的按钮 ,");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
taskExplainBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
taskExplainBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
taskExplainBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
taskExplainBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
taskExplainBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
taskExplainBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
taskExplainBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), taskExplainBuilder.toString(), true);
|
||||
}
|
||||
|
@ -97,10 +97,10 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
||||
taskExplainAdapter2.setOnItemClick(new TaskExplainAdapter2.OnItemClick2() {
|
||||
@Override
|
||||
public void onClick2(int pos) {
|
||||
taskExplain2Builder.append(TimestampUtil.time()).append("点击了item ,");
|
||||
taskExplain2Builder.append(TimestampUtil.time()).append(",").append("点击了item ,");
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("id", pos + "");
|
||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||
intentWebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||
|
||||
}
|
||||
});
|
||||
@ -129,7 +129,7 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
||||
}
|
||||
}
|
||||
taskExplain2Builder = new StringBuilder();
|
||||
taskExplain2Builder.append(TimestampUtil.time()).append("TaskExplainFragment-onCreate-initData ,");
|
||||
taskExplain2Builder.append(TimestampUtil.time()).append(",").append("TaskExplainFragment-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
taskExplain2Builder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -194,7 +194,6 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
||||
} else {
|
||||
if (taskPrefectureBean.getBody().getList() == null) {
|
||||
taskExplain2Recycler.setNoMore(true);
|
||||
|
||||
} else {
|
||||
explainList.addAll(taskPrefectureBean.getBody().getList());
|
||||
taskExplainAdapter2.notifyDataSetChanged();
|
||||
@ -212,26 +211,26 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.iv_task_explain2_finish) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
taskExplain2Builder.append(TimestampUtil.time()).append("点击了返回的按钮 ,");
|
||||
taskExplain2Builder.append(TimestampUtil.time()).append(",").append("点击了返回的按钮 ,");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
taskExplain2Builder.append(TimestampUtil.time()).append("onPause ,");
|
||||
taskExplain2Builder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
taskExplain2Builder.append(TimestampUtil.time()).append("onStop ,");
|
||||
taskExplain2Builder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
taskExplain2Builder.append(TimestampUtil.time()).append("onDestroy");
|
||||
taskExplain2Builder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
taskExplain2Builder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), taskExplain2Builder.toString(), true);
|
||||
}
|
||||
|
@ -91,10 +91,10 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
taskPrefectureAdapter.setClickItem(new TaskPrefectureAdapter.clickItem() {
|
||||
@Override
|
||||
public void item(int id) {
|
||||
taskPrefectureBuilder.append(TimestampUtil.time()).append("点击了item ,");
|
||||
taskPrefectureBuilder.append(TimestampUtil.time()).append(",").append("点击了item ,");
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("id", id + "");
|
||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||
intentWebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -122,7 +122,7 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
}
|
||||
}
|
||||
taskPrefectureBuilder = new StringBuilder();
|
||||
taskPrefectureBuilder.append(TimestampUtil.time()).append("TaskPrefectureFragment-onCreate-initData ,");
|
||||
taskPrefectureBuilder.append(TimestampUtil.time()).append(",").append("TaskPrefectureFragment-onCreate-initData ,");
|
||||
if (Constant.USHERED != null) {
|
||||
taskPrefectureBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -198,26 +198,26 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.iv_find_task) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
taskPrefectureBuilder.append(TimestampUtil.time()).append("点击了返回的按钮 ,");
|
||||
taskPrefectureBuilder.append(TimestampUtil.time()).append(",").append("点击了返回的按钮 ,");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
taskPrefectureBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||
taskPrefectureBuilder.append(TimestampUtil.time()).append(",").append("onPause ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
taskPrefectureBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||
taskPrefectureBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
taskPrefectureBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
taskPrefectureBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
taskPrefectureBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), taskPrefectureBuilder.toString(), true);
|
||||
}
|
||||
|
@ -130,7 +130,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
private SlidingUpPanelLayout sliding_layout;
|
||||
private FrameLayout frameLayout;
|
||||
private GatherGetFragment gatherGetFragment;
|
||||
private PoiDao poiDao;
|
||||
private String centerEncode;
|
||||
private List<Removable> removables;
|
||||
private List<Removable> removableScreenMarker;
|
||||
@ -166,6 +165,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
public static TreasureFragment newInstance(Bundle bundle) {
|
||||
TreasureFragment fragment = new TreasureFragment();
|
||||
fragment.setArguments(bundle);
|
||||
@ -259,10 +259,9 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
tencentMap.animateCamera(cameraSigma, new TencentMap.CancelableCallback() {
|
||||
@Override
|
||||
public void onFinish() {
|
||||
|
||||
dismissLoadingDialog();
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
treasureBuilder.append(TimestampUtil.time()).append("onFinish-获取到当前位置,");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("onFinish-获取到当前位置,");
|
||||
refreshFilterData();
|
||||
//上传用户位置金纬度
|
||||
iniUserLocation();
|
||||
@ -399,7 +398,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
} else if (messageNoticeBean.getCode() == 230) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -416,7 +415,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -425,7 +424,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -478,7 +477,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
} else if (getPhoneBean.getCode() == 230) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -495,20 +494,20 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),"请求超时", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),message, Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -570,22 +569,22 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
public void onSuccess(UserBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200) {//上传用户位置金纬度 寻宝删选接口请求成功
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (response.getCode() == 230) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -598,16 +597,16 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),"请求超时", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -877,7 +876,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
} else if (response.getCode() == 230) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -894,7 +893,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -903,7 +902,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -1083,18 +1082,14 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
int taskStatus = Constant.TASK_STARTUP;
|
||||
int type = Constant.TASK_TYPE;
|
||||
int limit = Constant.LIMIT_TYPE;
|
||||
if (poiDao == null) {
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
if (poiDatabase == null) {
|
||||
return;
|
||||
}
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<PoiEntity> allTaskStatus = poiDao.getAllTaskStatus(taskStatus, taskStatus, type, type, limit, limit);
|
||||
//List<PoiEntity> allTaskStatus = poiDao.getAllPoi();
|
||||
/*List<PoiEntity> allPoiStatus = poiDao.getAllPoiStatus();
|
||||
if (allPoiStatus != null) {
|
||||
poiDao.deleteAll(allPoiStatus);
|
||||
}*/
|
||||
List<PoiEntity> allTaskStatus = poiDatabase.getPoiDao().getAllTaskStatus(taskStatus, taskStatus, type, type, limit, limit);
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
@ -1559,7 +1554,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
}
|
||||
treasureBuilder = new StringBuilder();
|
||||
treasureBuilder.append(TimestampUtil.time()).append("TreasureFragment-onViewCreated-initData,");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("TreasureFragment-onViewCreated-initData,");
|
||||
if (Constant.USHERED != null) {
|
||||
treasureBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -1582,7 +1577,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你poi页面还有未提交完的数据,之前的成果已保存,点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
treasureBuilder.append(TimestampUtil.time()).append("未提交完的数据-点击了poi,");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("未提交完的数据-点击了poi,");
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("poiEntity", poiEntity);
|
||||
PoiFragment poiFragment = PoiFragment.newInstance(bundle);
|
||||
@ -1598,7 +1593,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你充电站页面还有未提交完的数据,之前的成果已保存,点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
treasureBuilder.append(TimestampUtil.time()).append("未提交完的数据-点击了充电站,");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("未提交完的数据-点击了充电站,");
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("poiEntity", poiEntity);
|
||||
ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle);
|
||||
@ -1614,7 +1609,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你poi录像页面还有未提交完的数据,之前的成果已保存,点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
treasureBuilder.append(TimestampUtil.time()).append("未提交完的数据-点击了poi录像,");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("未提交完的数据-点击了poi录像,");
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("poiEntity", poiEntity);
|
||||
PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle);
|
||||
@ -1630,7 +1625,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你道路页面还有未提交完的数据,之前的成果已保存,点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
treasureBuilder.append(TimestampUtil.time()).append("未提交完的数据-点击了道路,");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("未提交完的数据-点击了道路,");
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("poiEntity", poiEntity);
|
||||
RoadFragment roadFragment = RoadFragment.newInstance(bundle);
|
||||
@ -1646,7 +1641,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你其他页面还有未提交完的数据,之前的成果已保存,点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
treasureBuilder.append(TimestampUtil.time()).append("未提交完的数据-点击了其他,");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("未提交完的数据-点击了其他,");
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("poiEntity", poiEntity);
|
||||
OtherFragment otherFragment = OtherFragment.newInstance(bundle);
|
||||
@ -1697,14 +1692,14 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
mapView.onPause();
|
||||
treasureBuilder.append(TimestampUtil.time()).append("onPause,");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("onPause,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
mapView.onStop();
|
||||
treasureBuilder.append(TimestampUtil.time()).append("onStop,");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("onStop,");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1714,7 +1709,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
super.onDestroy();
|
||||
mapView.onDestroy();
|
||||
treasureBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
treasureBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), treasureBuilder.toString(), true);
|
||||
|
||||
@ -1731,21 +1726,21 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_zoom_add://放大
|
||||
treasureBuilder.append(TimestampUtil.time()).append("点击了放大的按钮,");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("点击了放大的按钮,");
|
||||
CameraUpdate cameraUpdateIn = CameraUpdateFactory.zoomIn();
|
||||
tencentMap.animateCamera(cameraUpdateIn);
|
||||
break;
|
||||
case R.id.iv_zoom_del://缩小:
|
||||
treasureBuilder.append(TimestampUtil.time()).append("点击了缩小的按钮,");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("点击了缩小的按钮,");
|
||||
CameraUpdate cameraUpdateOut = CameraUpdateFactory.zoomOut();
|
||||
tencentMap.animateCamera(cameraUpdateOut);
|
||||
break;
|
||||
case R.id.iv_refrish://刷新:
|
||||
treasureBuilder.append(TimestampUtil.time()).append("点击了刷新的按钮,");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("点击了刷新的按钮,");
|
||||
refreshFilterData();
|
||||
break;
|
||||
case R.id.iv_location://定位:
|
||||
treasureBuilder.append(TimestampUtil.time()).append("点击了定位的按钮,");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("点击了定位的按钮,");
|
||||
if (Constant.currentLocation != null) {
|
||||
CameraUpdate cameraSigma =
|
||||
CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
||||
@ -1760,11 +1755,11 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
break;
|
||||
case R.id.iv_submit://弹窗
|
||||
treasureBuilder.append(TimestampUtil.time()).append("点击了弹窗 上报的按钮,");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("点击了弹窗 上报的按钮,");
|
||||
initSubmit();
|
||||
break;
|
||||
case R.id.iv_filter:
|
||||
treasureBuilder.append(TimestampUtil.time()).append("点击了删选的按钮,");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("点击了删选的按钮,");
|
||||
debounce(ivFilter);
|
||||
FilterFragment filterFragment = FilterFragment.newInstance(new Bundle());
|
||||
showSlidingFragment(filterFragment);
|
||||
@ -1773,7 +1768,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
handler.sendEmptyMessageDelayed(0x101, 2000);
|
||||
break;
|
||||
case R.id.iv_message:
|
||||
treasureBuilder.append(TimestampUtil.time()).append("点击了消息的按钮,");
|
||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("点击了消息的按钮,");
|
||||
Intent messageIntent = new Intent(getContext(), FragmentManagement.class);
|
||||
messageIntent.putExtra("tag", 35);
|
||||
startActivity(messageIntent);
|
||||
|
@ -84,7 +84,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
}
|
||||
withdrawBuilder = new StringBuilder();
|
||||
withdrawBuilder.append(TimestampUtil.time()).append("WithdrawFragment-onViewCreated-initData,");
|
||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("WithdrawFragment-onViewCreated-initData,");
|
||||
if (Constant.USHERED != null) {
|
||||
withdrawBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
@ -111,10 +111,10 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
if (Constant.BACKGROUND == null) {
|
||||
Toast.makeText(getActivity(), "没有绑定银行卡,请先绑定银行卡", Toast.LENGTH_SHORT).show();
|
||||
checkBox.setChecked(false);
|
||||
withdrawBuilder.append(TimestampUtil.time()).append("点击了银行卡的勾选,");
|
||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("点击了银行卡的勾选,");
|
||||
} else {
|
||||
checkBox.setChecked(true);
|
||||
withdrawBuilder.append(TimestampUtil.time()).append("取消了银行卡的勾选,");
|
||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("取消了银行卡的勾选,");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -204,17 +204,17 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_withdraw:
|
||||
withdrawBuilder.append(TimestampUtil.time()).append("点击了财务信息的返回 ,");
|
||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("点击了财务信息的返回 ,");
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
break;
|
||||
case R.id.tv_text:
|
||||
withdrawBuilder.append(TimestampUtil.time()).append("点击了提现记录 ,");
|
||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("点击了提现记录 ,");
|
||||
Intent intentText = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentText.putExtra("tag", 26);
|
||||
startActivity(intentText);
|
||||
break;
|
||||
case R.id.button:
|
||||
withdrawBuilder.append(TimestampUtil.time()).append("点击了立即提现 ,");
|
||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("点击了立即提现 ,");
|
||||
String price = etAllPrice.getText().toString().trim();
|
||||
if (!price.equals("")) {
|
||||
double aDouble = Double.parseDouble(price);
|
||||
@ -235,7 +235,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否提取到" + Constant.BACKGROUND.substring(Constant.BACKGROUND.length() - 4) + "的银行卡", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
withdrawBuilder.append(TimestampUtil.time()).append("点击了提取到银行卡的确定按钮 ,");
|
||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("点击了提取到银行卡的确定按钮 ,");
|
||||
immediatelyPrice();
|
||||
return false;
|
||||
}
|
||||
@ -246,7 +246,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
break;
|
||||
case R.id.tv_all:
|
||||
withdrawBuilder.append(TimestampUtil.time()).append("点击了全部 ,");
|
||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("点击了全部 ,");
|
||||
if (canExchangePrice != 0) {
|
||||
etAllPrice.setText(canExchangePrice + "");
|
||||
}
|
||||
@ -277,7 +277,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "该提现申请已提交", "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
withdrawBuilder.append(TimestampUtil.time()).append("提现了成功 ,");
|
||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("提现了成功 ,");
|
||||
initNetWork();
|
||||
return false;
|
||||
}
|
||||
@ -285,7 +285,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
} else if (response.getCode() == 230) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
withdrawBuilder.append(TimestampUtil.time()).append("提现了失败 ,");
|
||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("提现了失败 ,");
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
etAllPrice.getText().clear();
|
||||
@ -310,19 +310,19 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
withdrawBuilder.append(TimestampUtil.time()).append("onPause,");
|
||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("onPause,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
withdrawBuilder.append(TimestampUtil.time()).append("onStop,");
|
||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("onStop,");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
withdrawBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||
withdrawBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), withdrawBuilder.toString(), true);
|
||||
}
|
||||
|
@ -3,6 +3,8 @@ package com.navinfo.outdoor.http;
|
||||
public class HttpInterface {
|
||||
public static final String IP= "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
||||
public static final String IP_= "http://dtxbmaps.navinfo.com/dtxb_test/m4";//测试接口
|
||||
|
||||
|
||||
public static final String USER_PATH ="/user/";//我的
|
||||
public static final String MSG_LIST_PATH ="/msgList/";//发现
|
||||
public static final String USER_LOGIN_PATH ="/userlogin/";//登录
|
||||
|
@ -411,7 +411,12 @@ public class OkGoBuilder<T> {
|
||||
*/
|
||||
public okhttp3.Response getSynchronization() {
|
||||
if (!NetWorkUtils.iConnected(UserApplication.userApplication)) { // 当前网络不可用
|
||||
Toast.makeText(activity, "网络不可用,请检查网络", Toast.LENGTH_SHORT).show();
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(activity, "网络不可用,请检查网络", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
return null;
|
||||
}
|
||||
initTimeOut(time);
|
||||
|
@ -13,6 +13,7 @@ import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.util.SdkFolderCreate;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/*
|
||||
* (1) 使用entities来映射相关的实体类
|
||||
* (2) version来指明当前数据库的版本号
|
||||
@ -25,6 +26,7 @@ import java.io.File;
|
||||
* 因为大部分情况,操作数据库都还算是比较耗时的动作。
|
||||
* 如果需要在主线程调用则使用allowMainThreadQueries进行说明。
|
||||
*/
|
||||
|
||||
@Database(entities = {PoiEntity.class,ChargingPileEntity.class}, version = 2, exportSchema = false)
|
||||
public abstract class PoiDatabase extends RoomDatabase {
|
||||
private static final String DB_NAME = "navinfo.db";
|
||||
@ -40,9 +42,6 @@ public abstract class PoiDatabase extends RoomDatabase {
|
||||
instance=null;
|
||||
}
|
||||
private static PoiDatabase create(final Context context) {
|
||||
if (Constant.POI_DAO==null){
|
||||
return null;
|
||||
}
|
||||
File dbFolder = new File(Constant.POI_DAO); // 数据库文件夹路径
|
||||
if (!dbFolder.exists()) {
|
||||
SdkFolderCreate.mkdirs(dbFolder.getAbsolutePath());
|
||||
|
@ -188,7 +188,9 @@ public class PoiSaveUtils {
|
||||
.url(url)
|
||||
.time(30)
|
||||
.Builder(mContext)
|
||||
.token(Constant.ACCESS_TOKEN).params(httpParams).getSynchronization();
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams)
|
||||
.getSynchronization();
|
||||
if (execute == null) {
|
||||
return -1;
|
||||
}
|
||||
@ -340,22 +342,20 @@ public class PoiSaveUtils {
|
||||
.fileList(list)
|
||||
.postFileSynchronization();
|
||||
if (execute == null) {
|
||||
bInt++;
|
||||
return;
|
||||
}
|
||||
if (execute.code() != 200) {
|
||||
bInt++;
|
||||
return;
|
||||
}
|
||||
assert execute.body() != null;
|
||||
String bodyStr = execute.body().string();
|
||||
if (bodyStr == null) {
|
||||
return;
|
||||
}
|
||||
Gson gson = new Gson();
|
||||
OtherUploadPicBean otherUploadPicBean = gson.fromJson(bodyStr, OtherUploadPicBean.class);
|
||||
OtherUploadPicBean otherUploadPicBean = new Gson().fromJson(bodyStr, OtherUploadPicBean.class);
|
||||
if (otherUploadPicBean.getCode() == 200) {
|
||||
poiEntity.setTaskStatus(100);
|
||||
PoiDatabase.getInstance(mContext).getPoiDao().updatePoiEntity(poiEntity);
|
||||
/* for (int i = 0; i < list.size(); i++) {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
list.get(i).delete();
|
||||
}
|
||||
if (poiEntity.getType()==3||poiEntity.getType()==4) {
|
||||
@ -367,7 +367,7 @@ public class PoiSaveUtils {
|
||||
File filePath = AWMp4ParserHelper.getInstance().getFilePath(poiEntity.getId());
|
||||
filePath.delete();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
Log.d("TAGss", "uploadPoiNet: 成功" + anInt);
|
||||
anInt++;
|
||||
return;
|
||||
@ -522,10 +522,10 @@ public class PoiSaveUtils {
|
||||
Gson gson = new Gson();
|
||||
PoiUploadBean uploadBeanResult = gson.fromJson(pileUpLoadResultStr, PoiUploadBean.class);
|
||||
if (uploadBeanResult.getCode() == 200) {
|
||||
/* PoiDatabase.getInstance(mContext).getChargingPileDao().deleteChargingPileEntity(chargingPileEntity);
|
||||
//PoiDatabase.getInstance(mContext).getChargingPileDao().deleteChargingPileEntity(chargingPileEntity);
|
||||
for (int i = 0; i < chargingPileFileList.size(); i++) {
|
||||
chargingPileFileList.get(i).delete();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
@ -0,0 +1,28 @@
|
||||
package com.navinfo.outdoor.util;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Matrix;
|
||||
|
||||
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
|
||||
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
|
||||
import io.reactivex.annotations.NonNull;
|
||||
|
||||
public class RotateTransformation extends BitmapTransformation {
|
||||
private float rotateRotationAngle = 0f;
|
||||
public RotateTransformation(float rotateRotationAngle) {
|
||||
this.rotateRotationAngle = rotateRotationAngle;
|
||||
}
|
||||
@Override
|
||||
protected Bitmap transform(@NonNull BitmapPool pool, @NonNull Bitmap toTransform, int outWidth, int outHeight) {
|
||||
Matrix matrix = new Matrix();
|
||||
matrix.postRotate(rotateRotationAngle);
|
||||
return Bitmap.createBitmap(toTransform, 0, 0, toTransform.getWidth(), toTransform.getHeight(), matrix, true);
|
||||
}
|
||||
@Override
|
||||
public void updateDiskCacheKey(@NonNull MessageDigest messageDigest) {
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,6 @@ public class UploadUtils {
|
||||
* @param fileZip
|
||||
*/
|
||||
public Callback getRoadUploadCallback(Activity mContext, PoiEntity showPoiEntity, File fileZip) {
|
||||
PoiDao poiDao = PoiDatabase.getInstance(mContext).getPoiDao();
|
||||
return new Callback<OtherUploadPicBean>() {
|
||||
@Override
|
||||
public void onSuccess(OtherUploadPicBean response, int id) {
|
||||
@ -47,15 +46,15 @@ public class UploadUtils {
|
||||
@Override
|
||||
public void run() {
|
||||
showPoiEntity.setTaskStatus(100);
|
||||
poiDao.updatePoiEntity(showPoiEntity);
|
||||
/* if (showPoiEntity.getId()!=null){
|
||||
PoiDatabase.getInstance(mContext).getPoiDao().updatePoiEntity(showPoiEntity);
|
||||
if (showPoiEntity.getId()!=null){
|
||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||
fileListByUUID.get(i).delete();
|
||||
}
|
||||
File filePath = AWMp4ParserHelper.getInstance().getFilePath(showPoiEntity.getId());
|
||||
filePath.delete();
|
||||
}*/
|
||||
}
|
||||
fileZip.delete();
|
||||
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
@ -98,7 +97,6 @@ public class UploadUtils {
|
||||
* @return
|
||||
*/
|
||||
public Callback getPoiUploadCallback(Activity mContext, PoiEntity showPoiEntity, ArrayList<File> poiPicList) {
|
||||
PoiDao poiDao = PoiDatabase.getInstance(mContext).getPoiDao();
|
||||
return new Callback<OtherUploadPicBean>() {
|
||||
@Override
|
||||
public void onSuccess(OtherUploadPicBean response, int id) {
|
||||
@ -107,10 +105,10 @@ public class UploadUtils {
|
||||
@Override
|
||||
public void run() {
|
||||
showPoiEntity.setTaskStatus(100);
|
||||
poiDao.updatePoiEntity(showPoiEntity);
|
||||
/*for (int i = 0; i < poiPicList.size(); i++) {
|
||||
PoiDatabase.getInstance(mContext).getPoiDao().updatePoiEntity(showPoiEntity);
|
||||
for (int i = 0; i < poiPicList.size(); i++) {
|
||||
poiPicList.get(i).delete();
|
||||
}*/
|
||||
}
|
||||
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -152,7 +150,6 @@ public class UploadUtils {
|
||||
* @return
|
||||
*/
|
||||
public Callback getPoiVideoUploadCallback(Activity mContext, PoiEntity showPoiEntity, File fileZip) {
|
||||
PoiDao poiDao = PoiDatabase.getInstance(mContext).getPoiDao();
|
||||
return new Callback<OtherUploadPicBean>() {
|
||||
@Override
|
||||
public void onSuccess(OtherUploadPicBean response, int id) {
|
||||
@ -161,15 +158,15 @@ public class UploadUtils {
|
||||
@Override
|
||||
public void run() {
|
||||
showPoiEntity.setTaskStatus(100);
|
||||
poiDao.updatePoiEntity(showPoiEntity);
|
||||
/*if (showPoiEntity.getId() != null) {
|
||||
PoiDatabase.getInstance(mContext).getPoiDao().updatePoiEntity(showPoiEntity);
|
||||
if (showPoiEntity.getId() != null) {
|
||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||
fileListByUUID.get(i).delete();
|
||||
}
|
||||
File filePath = AWMp4ParserHelper.getInstance().getFilePath(showPoiEntity.getId());
|
||||
filePath.delete();
|
||||
}*/
|
||||
}
|
||||
fileZip.delete();
|
||||
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
@ -212,7 +209,6 @@ public class UploadUtils {
|
||||
* @return
|
||||
*/
|
||||
public Callback getOtherUploadCallback(Activity mContext, PoiEntity showPoiEntity, List<File> otherUploadList) {
|
||||
PoiDao poiDao = PoiDatabase.getInstance(mContext).getPoiDao();
|
||||
return new Callback<PoiUploadBean>() {
|
||||
@Override
|
||||
public void onSuccess(PoiUploadBean response, int id) {
|
||||
@ -221,10 +217,10 @@ public class UploadUtils {
|
||||
@Override
|
||||
public void run() {
|
||||
showPoiEntity.setTaskStatus(100);
|
||||
poiDao.updatePoiEntity(showPoiEntity);
|
||||
/* for (int i = 0; i < otherUploadList.size(); i++) {
|
||||
PoiDatabase.getInstance(mContext).getPoiDao().updatePoiEntity(showPoiEntity);
|
||||
for (int i = 0; i < otherUploadList.size(); i++) {
|
||||
otherUploadList.get(i).delete();
|
||||
}*/
|
||||
}
|
||||
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -267,7 +263,6 @@ public class UploadUtils {
|
||||
* @return
|
||||
*/
|
||||
public Callback getChargingUploadCallback(Activity mContext, PoiEntity showPoiEntity, ArrayList<File> chargingStationList) {
|
||||
PoiDao poiDao = PoiDatabase.getInstance(mContext).getPoiDao();
|
||||
return new Callback<PoiUploadBean>() {
|
||||
@Override
|
||||
public void onSuccess(PoiUploadBean response, int id) {
|
||||
@ -276,10 +271,10 @@ public class UploadUtils {
|
||||
@Override
|
||||
public void run() {
|
||||
showPoiEntity.setTaskStatus(100);
|
||||
poiDao.updatePoiEntity(showPoiEntity);
|
||||
/* for (int i = 0; i < chargingStationList.size(); i++) {
|
||||
PoiDatabase.getInstance(mContext).getPoiDao().updatePoiEntity(showPoiEntity);
|
||||
for (int i = 0; i < chargingStationList.size(); i++) {
|
||||
chargingStationList.get(i).delete();
|
||||
}*/
|
||||
}
|
||||
mContext.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -98,6 +98,8 @@
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="任务描述:"
|
||||
android:textSize="15sp"
|
||||
android:ellipsize="end"
|
||||
android:lines="2"
|
||||
app:layout_constraintStart_toStartOf="@+id/relative_linear"
|
||||
app:layout_constraintTop_toBottomOf="@+id/relative_linear" />
|
||||
|
||||
|
@ -44,9 +44,9 @@
|
||||
android:id="@+id/tv_auditMsg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_marginRight="10dp"
|
||||
app:layout_constraintRight_toLeftOf="@+id/tv_auditStatus"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_auditStatus"
|
||||
app:layout_constraintHorizontal_bias="0.9"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_createTime"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_createTime" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
|
Loading…
x
Reference in New Issue
Block a user