1.修改拍摄的样式,2.解决删除操作 3.认证图片显示问题
This commit is contained in:
parent
9b3ec4439c
commit
61915b4ead
@ -283,7 +283,7 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
startActivity(new Intent(GuidanceActivity.this, HomeActivity.class));
|
startActivity(new Intent(GuidanceActivity.this, HomeActivity.class));
|
||||||
GuidanceActivity.this.finish();
|
GuidanceActivity.this.finish();
|
||||||
Toast.makeText(GuidanceActivity.this, "可以在发现版块的任务说明中,进行再次学习哦", Toast.LENGTH_LONG).show();
|
Toast.makeText(GuidanceActivity.this, "可以在发现版块的任务说明中,进行再次学习哦", Toast.LENGTH_LONG).show();
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(GuidanceActivity.this);
|
FlushTokenUtil.flushToken(GuidanceActivity.this);
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(GuidanceActivity.this, response.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(GuidanceActivity.this, response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
|
@ -10,6 +10,7 @@ import com.navinfo.outdoor.fragment.FindFragment;
|
|||||||
import com.navinfo.outdoor.fragment.MineFragment;
|
import com.navinfo.outdoor.fragment.MineFragment;
|
||||||
import com.navinfo.outdoor.fragment.RecordFragment;
|
import com.navinfo.outdoor.fragment.RecordFragment;
|
||||||
import com.navinfo.outdoor.fragment.TreasureFragment;
|
import com.navinfo.outdoor.fragment.TreasureFragment;
|
||||||
|
import com.navinfo.outdoor.room.PoiDatabase;
|
||||||
import com.navinfo.outdoor.util.BackHandlerHelper;
|
import com.navinfo.outdoor.util.BackHandlerHelper;
|
||||||
import com.navinfo.outdoor.util.NoSlideViewPager;
|
import com.navinfo.outdoor.util.NoSlideViewPager;
|
||||||
|
|
||||||
@ -193,6 +194,7 @@ public class HomeActivity extends BaseActivity {
|
|||||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
|
PoiDatabase.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -213,7 +213,6 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
Constant.initRootFolder(body.getUserId());
|
Constant.initRootFolder(body.getUserId());
|
||||||
HttpInterface.initHttpInter(body.getUserId());
|
HttpInterface.initHttpInter(body.getUserId());
|
||||||
loginBuilder.append("userId:").append(body.getUserId()).append(",");
|
loginBuilder.append("userId:").append(body.getUserId()).append(",");
|
||||||
}
|
|
||||||
navInfoEditor.putString("access_token", body.getAccess_token());
|
navInfoEditor.putString("access_token", body.getAccess_token());
|
||||||
navInfoEditor.putString("refresh_token", body.getRefresh_token());
|
navInfoEditor.putString("refresh_token", body.getRefresh_token());
|
||||||
navInfoEditor.putString("pass_word", paw);
|
navInfoEditor.putString("pass_word", paw);
|
||||||
@ -226,6 +225,9 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
Constant.PASS_WORD = paw;
|
Constant.PASS_WORD = paw;
|
||||||
loginBuilder.append("登录获取token ,");
|
loginBuilder.append("登录获取token ,");
|
||||||
initGetUserInfo();//获取用户信息
|
initGetUserInfo();//获取用户信息
|
||||||
|
}else {
|
||||||
|
Toast.makeText(LoginActivity.this, "获取id 失败", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(LoginActivity.this, response.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(LoginActivity.this, response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
//调用系统安装程序
|
//调用系统安装程序
|
||||||
//安装apk,也可以进行静默安装
|
//安装apk,也可以进行静默安装
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||||
File file = new File(Constant.NABISCO_APk + "DTXB.apk");
|
File file = new File(Constant.NABISCO_APk , "DTXB.apk");
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||||
Uri contentUri = FileProvider.getUriForFile(MainActivity.this, "com.navinfo.outdoor.fileprovider", file);
|
Uri contentUri = FileProvider.getUriForFile(MainActivity.this, "com.navinfo.outdoor.fileprovider", file);
|
||||||
@ -383,7 +383,6 @@ public class MainActivity extends BaseActivity {
|
|||||||
if (body.getUserId() != null && !body.getUserId().equals("")) {
|
if (body.getUserId() != null && !body.getUserId().equals("")) {
|
||||||
Constant.initRootFolder(body.getUserId());
|
Constant.initRootFolder(body.getUserId());
|
||||||
HttpInterface.initHttpInter(body.getUserId());
|
HttpInterface.initHttpInter(body.getUserId());
|
||||||
}
|
|
||||||
navInfoEditor.putString("access_token", body.getAccess_token());
|
navInfoEditor.putString("access_token", body.getAccess_token());
|
||||||
Constant.ACCESS_TOKEN = body.getAccess_token();
|
Constant.ACCESS_TOKEN = body.getAccess_token();
|
||||||
navInfoEditor.putString("refresh_token", body.getRefresh_token());
|
navInfoEditor.putString("refresh_token", body.getRefresh_token());
|
||||||
@ -392,6 +391,9 @@ public class MainActivity extends BaseActivity {
|
|||||||
Constant.USHERED = body.getUserId();
|
Constant.USHERED = body.getUserId();
|
||||||
navInfoEditor.commit();
|
navInfoEditor.commit();
|
||||||
initGetUserInfo();//获取用户信息
|
initGetUserInfo();//获取用户信息
|
||||||
|
}else {
|
||||||
|
Toast.makeText(MainActivity.this, "获取用户id失败,请重试", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
@ -450,7 +452,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
FileOutputStream fileOutputStream = null;
|
FileOutputStream fileOutputStream = null;
|
||||||
if (is != null) {
|
if (is != null) {
|
||||||
//对apk进行保存
|
//对apk进行保存
|
||||||
File file = new File(Constant.NABISCO_APk + "DTXB.apk");
|
File file = new File(Constant.NABISCO_APk , "DTXB.apk");
|
||||||
fileOutputStream = new FileOutputStream(file);
|
fileOutputStream = new FileOutputStream(file);
|
||||||
byte[] buf = new byte[1024];
|
byte[] buf = new byte[1024];
|
||||||
int ch;
|
int ch;
|
||||||
|
@ -36,6 +36,7 @@ import com.navinfo.outdoor.http.OkGoBuilder;
|
|||||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||||
import com.navinfo.outdoor.util.GetJsonDataUtil;
|
import com.navinfo.outdoor.util.GetJsonDataUtil;
|
||||||
import com.navinfo.outdoor.util.RegexUtil;
|
import com.navinfo.outdoor.util.RegexUtil;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
|
|
||||||
@ -89,7 +90,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
userBuilder = new StringBuilder();
|
userBuilder = new StringBuilder();
|
||||||
userBuilder.append("UserFragment-onCreate-initData ,");
|
userBuilder.append(TimestampUtil.time()).append(" UserFragment-onCreate-initData ,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
userBuilder.append("userId:").append(Constant.USHERED).append(",");
|
userBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
@ -148,11 +149,11 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.iv_user:
|
case R.id.iv_user:
|
||||||
userBuilder.append("点击了用户资料的返回 ,");
|
userBuilder.append(TimestampUtil.time()).append("点击了用户资料的返回 ,");
|
||||||
finish();
|
finish();
|
||||||
break;
|
break;
|
||||||
case R.id.btn_gathering:
|
case R.id.btn_gathering:
|
||||||
userBuilder.append("点击了去绑定的返回 ,");
|
userBuilder.append(TimestampUtil.time()).append("点击了去绑定的返回 ,");
|
||||||
if (Constant.AUDIOTAPES == -1) {
|
if (Constant.AUDIOTAPES == -1) {
|
||||||
Toast.makeText(this, "请先实名认证", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "请先实名认证", Toast.LENGTH_SHORT).show();
|
||||||
} else if (Constant.AUDIOTAPES == 1) {//认证通过
|
} else if (Constant.AUDIOTAPES == 1) {//认证通过
|
||||||
@ -164,34 +165,34 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.btn_attestations:
|
case R.id.btn_attestations:
|
||||||
userBuilder.append("点击了去认证的返回 ,");
|
userBuilder.append(TimestampUtil.time()).append("点击了去认证的返回 ,");
|
||||||
Intent attestationIntent = new Intent(this, FragmentManagement.class);
|
Intent attestationIntent = new Intent(this, FragmentManagement.class);
|
||||||
attestationIntent.putExtra("tag", 25);
|
attestationIntent.putExtra("tag", 25);
|
||||||
startActivity(attestationIntent);
|
startActivity(attestationIntent);
|
||||||
break;
|
break;
|
||||||
case R.id.ll_region:
|
case R.id.ll_region:
|
||||||
userBuilder.append("点击了所在区域 ,");
|
userBuilder.append(TimestampUtil.time()).append("点击了所在区域 ,");
|
||||||
showPickerView();
|
showPickerView();
|
||||||
break;
|
break;
|
||||||
case R.id.edit_qq:
|
case R.id.edit_qq:
|
||||||
userBuilder.append("请输入qq ,");
|
userBuilder.append(TimestampUtil.time()).append("请输入qq ,");
|
||||||
// qq();
|
// qq();
|
||||||
break;
|
break;
|
||||||
case R.id.edit_mailbox:
|
case R.id.edit_mailbox:
|
||||||
userBuilder.append("请输入电子邮件 ,");
|
userBuilder.append(TimestampUtil.time()).append("请输入电子邮件 ,");
|
||||||
break;
|
break;
|
||||||
case R.id.btn_save:
|
case R.id.btn_save:
|
||||||
netWork();
|
netWork();
|
||||||
break;
|
break;
|
||||||
case R.id.btn_weChat_binding:
|
case R.id.btn_weChat_binding:
|
||||||
userBuilder.append("点击了微信 去提交的按钮 ,");
|
userBuilder.append(TimestampUtil.time()).append("点击了微信 去提交的按钮 ,");
|
||||||
Toast.makeText(this, "此功能未开通", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "此功能未开通", Toast.LENGTH_SHORT).show();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void netWork() {
|
private void netWork() {
|
||||||
userBuilder.append("点击了保存的按钮 ,");
|
userBuilder.append(TimestampUtil.time()).append("点击了保存的按钮 ,");
|
||||||
String userphone = etPhone.getText().toString().trim();
|
String userphone = etPhone.getText().toString().trim();
|
||||||
String userqq = etQq.getText().toString().trim();
|
String userqq = etQq.getText().toString().trim();
|
||||||
String usermailbox = etMailbox.getText().toString().trim();
|
String usermailbox = etMailbox.getText().toString().trim();
|
||||||
@ -262,7 +263,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else if(response.getCode()==203){
|
}else if(response.getCode()==230){
|
||||||
FlushTokenUtil.flushToken(UserActivity.this);
|
FlushTokenUtil.flushToken(UserActivity.this);
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(UserActivity.this, response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(UserActivity.this, response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
|
@ -83,7 +83,7 @@ public class WebActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
richBody = richBody.replace("<img", "<img style='max-width: 100%'");
|
richBody = richBody.replace("<img", "<img style='max-width: 100%'");
|
||||||
nWebView.loadDataWithBaseURL(null, richBody, "text/html", "utf-8", null);
|
nWebView.loadDataWithBaseURL(null, richBody, "text/html", "utf-8", null);
|
||||||
}
|
}
|
||||||
}else if(response.getCode()==203){
|
}else if(response.getCode()==230){
|
||||||
FlushTokenUtil.flushToken(WebActivity.this);
|
FlushTokenUtil.flushToken(WebActivity.this);
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(WebActivity.this, response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(WebActivity.this, response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
|
@ -30,21 +30,22 @@ public class Constant {
|
|||||||
public static String BASE_FOLDER = ROOT_FOLDER;
|
public static String BASE_FOLDER = ROOT_FOLDER;
|
||||||
//保存图片的目录
|
//保存图片的目录
|
||||||
public static String PICTURE_FOLDER;
|
public static String PICTURE_FOLDER;
|
||||||
public static String VIDEOS_;
|
public static String VIDEOS;
|
||||||
public static String POI_DAO;
|
public static String POI_DAO=null;
|
||||||
public static String LOG_FOLDER = ROOT_FOLDER + "/log";
|
|
||||||
public static String SHARED_PREFERENCES = "navInfo";
|
public static String SHARED_PREFERENCES = "navInfo";
|
||||||
public static String MESSAGE_TYPE = "messageType";
|
public static String MESSAGE_TYPE = "messageType";
|
||||||
public static String DATA_FILE = "dataFile";
|
public static String DATA_FILE = "dataFile";
|
||||||
//下载文件
|
//下载文件
|
||||||
public static final String NABISCO_APk = ROOT_FOLDER + "/apk";
|
public static final String NABISCO_APk = ROOT_FOLDER + "/apk";
|
||||||
|
public static String LOG_FOLDER = ROOT_FOLDER + "/log";
|
||||||
public static int TelLength = 0;
|
public static int TelLength = 0;
|
||||||
|
|
||||||
public static void initRootFolder(String userId) {
|
public static void initRootFolder(String userId) {
|
||||||
BASE_FOLDER = ROOT_FOLDER + "/" + userId;
|
BASE_FOLDER = ROOT_FOLDER + "/" + userId;
|
||||||
PICTURE_FOLDER = BASE_FOLDER + "/picture";
|
PICTURE_FOLDER = BASE_FOLDER + "/picture";
|
||||||
POI_DAO = BASE_FOLDER + "/BaseDao/";
|
POI_DAO = BASE_FOLDER + "/BaseDao";
|
||||||
VIDEOS_ = BASE_FOLDER + "/videos";
|
VIDEOS= BASE_FOLDER + "/videos";
|
||||||
// 初始化应用目录
|
// 初始化应用目录
|
||||||
File baseFolder = new File(BASE_FOLDER); // 数据库文件夹路径
|
File baseFolder = new File(BASE_FOLDER); // 数据库文件夹路径
|
||||||
if (!baseFolder.exists()) {
|
if (!baseFolder.exists()) {
|
||||||
@ -165,7 +166,8 @@ public class Constant {
|
|||||||
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
|
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
|
||||||
public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重
|
public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重
|
||||||
public static TencentMap.OnMarkerClickListener markerClickListener = null;
|
public static TencentMap.OnMarkerClickListener markerClickListener = null;
|
||||||
public static final String NAVIN_FO = "11.15";//版本日期
|
public static final String NAVIN_FO = "11.16";//版本日期
|
||||||
|
|
||||||
//marker
|
//marker
|
||||||
public static final BitmapDescriptor MARKER_POI_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);
|
public static final BitmapDescriptor MARKER_POI_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);
|
||||||
public static final BitmapDescriptor MARKER_CHARGE_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_show);
|
public static final BitmapDescriptor MARKER_CHARGE_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_show);
|
||||||
|
@ -150,7 +150,7 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
initTaskPrefectureBean(response, aNet);
|
initTaskPrefectureBean(response, aNet);
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
|
@ -101,7 +101,7 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
capacityItemAdapter.setCapItemList(response.getBody().getList());
|
capacityItemAdapter.setCapItemList(response.getBody().getList());
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
|
@ -258,7 +258,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else if (response.getCode()==203){
|
}else if (response.getCode()==230){
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
}else {
|
}else {
|
||||||
Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
|
@ -777,7 +777,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if (getPhoneBean.getCode() == 203) {
|
} else if (getPhoneBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity()!=null){
|
||||||
@ -1323,7 +1323,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (chargingStationBean.getCode() == 203) {
|
} else if (chargingStationBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity()!=null){
|
||||||
@ -1404,7 +1404,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (taskNameBean.getCode() == 203) {
|
} else if (taskNameBean.getCode() == 230) {
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@ -1715,7 +1715,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
|
@ -112,7 +112,7 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (taskPrefectureBean.getCode() == 200){
|
if (taskPrefectureBean.getCode() == 200){
|
||||||
initTaskPrefectureBean(taskPrefectureBean,aNet);
|
initTaskPrefectureBean(taskPrefectureBean,aNet);
|
||||||
}else if (taskPrefectureBean.getCode()==203){
|
}else if (taskPrefectureBean.getCode()==230){
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
}else {
|
}else {
|
||||||
Toast.makeText(getActivity(), taskPrefectureBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), taskPrefectureBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||||
|
@ -48,6 +48,7 @@ import com.navinfo.outdoor.room.PoiEntity;
|
|||||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||||
import com.navinfo.outdoor.util.Geohash;
|
import com.navinfo.outdoor.util.Geohash;
|
||||||
import com.navinfo.outdoor.util.GeometryTools;
|
import com.navinfo.outdoor.util.GeometryTools;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||||
import com.vividsolutions.jts.geom.Geometry;
|
import com.vividsolutions.jts.geom.Geometry;
|
||||||
|
|
||||||
@ -222,7 +223,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
filterBuilder = new StringBuilder();
|
filterBuilder = new StringBuilder();
|
||||||
filterBuilder.append("FilterActivity-onCreate-initData ,");
|
filterBuilder.append(TimestampUtil.time()).append("FilterActivity-onCreate-initData ,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
filterBuilder.append("userId:").append(Constant.USHERED).append(",");
|
filterBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
@ -337,8 +338,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
checkOk.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
checkOk.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
filterBuilder.append("点击了checkBox 按钮 ,");
|
filterBuilder.append(TimestampUtil.time()).append("点击了checkBox 按钮 ,");
|
||||||
filterBuilder.append(" ,");
|
|
||||||
if (Constant.LEVEL == 1 || Constant.LEVEL == 2) {
|
if (Constant.LEVEL == 1 || Constant.LEVEL == 2) {
|
||||||
filterAdapter.setAddFilter(isChecked);
|
filterAdapter.setAddFilter(isChecked);
|
||||||
filterAdapter.notifyDataSetChanged();
|
filterAdapter.notifyDataSetChanged();
|
||||||
@ -352,7 +352,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
filterAdapter.setItemCLick(new FilterAdapter.ItemCLick() {
|
filterAdapter.setItemCLick(new FilterAdapter.ItemCLick() {
|
||||||
@Override
|
@Override
|
||||||
public void item(PoiEntity poiEntity) {
|
public void item(PoiEntity poiEntity) {
|
||||||
filterBuilder.append("点击了item ,");
|
filterBuilder.append(TimestampUtil.time()).append("点击了item ,");
|
||||||
//查看详情
|
//查看详情
|
||||||
Message obtains = Message.obtain();
|
Message obtains = Message.obtain();
|
||||||
obtains.what = Constant.FILTER_LIST_ITEM;
|
obtains.what = Constant.FILTER_LIST_ITEM;
|
||||||
@ -363,7 +363,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
filterAdapter.setItemOnCLick(new FilterAdapter.ItemOnCLick() {
|
filterAdapter.setItemOnCLick(new FilterAdapter.ItemOnCLick() {
|
||||||
@Override
|
@Override
|
||||||
public void item(PoiEntity poiEntity, boolean isChockBox) {
|
public void item(PoiEntity poiEntity, boolean isChockBox) {
|
||||||
filterBuilder.append("点击了item ,");
|
filterBuilder.append(TimestampUtil.time()).append("点击了item ,");
|
||||||
if (isChockBox) {
|
if (isChockBox) {
|
||||||
btnChock.add(poiEntity);
|
btnChock.add(poiEntity);
|
||||||
} else {
|
} else {
|
||||||
@ -381,7 +381,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.btn_draw:
|
case R.id.btn_draw:
|
||||||
filterBuilder.append("点击了批量领取的按钮 ,");
|
filterBuilder.append(TimestampUtil.time()).append("点击了批量领取的按钮 ,");
|
||||||
if (Constant.LEVEL == 1 || Constant.LEVEL == 2) {
|
if (Constant.LEVEL == 1 || Constant.LEVEL == 2) {
|
||||||
if (btnChock == null) {
|
if (btnChock == null) {
|
||||||
return;
|
return;
|
||||||
@ -400,7 +400,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.btn_filter:
|
case R.id.btn_filter:
|
||||||
filterBuilder.append("点击了地图显示的按钮 ,");
|
filterBuilder.append(TimestampUtil.time()).append("点击了地图显示的按钮 ,");
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.TREASURE_FRAGMENT;
|
obtain.what = Constant.TREASURE_FRAGMENT;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
@ -414,7 +414,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
onBackPressed();
|
onBackPressed();
|
||||||
break;
|
break;
|
||||||
case R.id.cl_number:
|
case R.id.cl_number:
|
||||||
filterBuilder.append("点击了任务个数的按钮 ,");
|
filterBuilder.append(TimestampUtil.time()).append("点击了任务个数的按钮 ,");
|
||||||
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"200", "500", "1000"}, new OnMenuItemClickListener() {
|
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"200", "500", "1000"}, new OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(String text, int index) {
|
public void onClick(String text, int index) {
|
||||||
@ -438,7 +438,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case R.id.cl_photograph:
|
case R.id.cl_photograph:
|
||||||
filterBuilder.append("点击了权限类型的按钮 ,");
|
filterBuilder.append(TimestampUtil.time()).append("点击了权限类型的按钮 ,");
|
||||||
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"全部", "普通任务", "专属任务", "挑战任务", "奖励任务"}, new OnMenuItemClickListener() {
|
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"全部", "普通任务", "专属任务", "挑战任务", "奖励任务"}, new OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(String text, int index) {
|
public void onClick(String text, int index) {
|
||||||
@ -476,7 +476,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
6 "面状任务"
|
6 "面状任务"
|
||||||
*/
|
*/
|
||||||
case R.id.cl_exclusive:
|
case R.id.cl_exclusive:
|
||||||
filterBuilder.append("点击了任务类型的按钮 ,");
|
filterBuilder.append(TimestampUtil.time()).append("点击了任务类型的按钮 ,");
|
||||||
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"全部", "POI", "充电站", "POI录像", "道路录像", "其他", "面状任务"}, new OnMenuItemClickListener() {
|
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"全部", "POI", "充电站", "POI录像", "道路录像", "其他", "面状任务"}, new OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(String text, int index) {
|
public void onClick(String text, int index) {
|
||||||
@ -512,7 +512,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case R.id.cl_type://任务状态 0.未领取 1.已领取,2.未保存(保存到本地但未提交成功),3.已保存(保存到本地提交成功),4已上传(结束采集),
|
case R.id.cl_type://任务状态 0.未领取 1.已领取,2.未保存(保存到本地但未提交成功),3.已保存(保存到本地提交成功),4已上传(结束采集),
|
||||||
filterBuilder.append("点击了任务状态的按钮 ,");
|
filterBuilder.append(TimestampUtil.time()).append("点击了任务状态的按钮 ,");
|
||||||
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"全部", "未领取", "已领取","已领取(网络)"/*, "未保存", "已保存"*/}, new OnMenuItemClickListener() {
|
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"全部", "未领取", "已领取","已领取(网络)"/*, "未保存", "已保存"*/}, new OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(String text, int index) {
|
public void onClick(String text, int index) {
|
||||||
@ -573,7 +573,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
Toast.makeText(getContext(), "领取成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "领取成功", Toast.LENGTH_SHORT).show();
|
||||||
}else if (response.getCode()==203){
|
}else if (response.getCode()==230){
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
}else {
|
}else {
|
||||||
Toast.makeText(getContext(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
|
@ -472,7 +472,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@ -570,7 +570,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@ -644,7 +644,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@ -716,7 +716,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@ -771,7 +771,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
poiDao.deletePoiEntity(poiEntity);
|
poiDao.deletePoiEntity(poiEntity);
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@ -909,7 +909,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@ -1045,7 +1045,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@ -295,7 +295,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), "绑定失败!", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "绑定失败!", Toast.LENGTH_SHORT).show();
|
||||||
|
@ -33,6 +33,7 @@ import com.navinfo.outdoor.http.HttpInterface;
|
|||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
import com.navinfo.outdoor.room.PoiDatabase;
|
import com.navinfo.outdoor.room.PoiDatabase;
|
||||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
import com.navinfo.outdoor.util.ToastUtil;
|
import com.navinfo.outdoor.util.ToastUtil;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
@ -170,7 +171,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if (hasSubmitBean.getCode() == 203) {
|
} else if (hasSubmitBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
@ -245,7 +246,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (hasSubmitBean.getCode() == 203) {
|
} else if (hasSubmitBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -322,7 +323,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (hasSubmitBean.getCode() == 203) {
|
} else if (hasSubmitBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -398,7 +399,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (hasSubmitBean.getCode() == 203) {
|
} else if (hasSubmitBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
@ -475,7 +476,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if (hasSubmitBean.getCode() == 203) {
|
} else if (hasSubmitBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
@ -541,7 +542,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
hasSubmitBuilder = new StringBuilder();
|
hasSubmitBuilder = new StringBuilder();
|
||||||
hasSubmitBuilder.append("HasSubmitFragment-onCreate-initData ,");
|
hasSubmitBuilder.append(TimestampUtil.time()).append("HasSubmitFragment-onCreate-initData ,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
hasSubmitBuilder.append("userId:").append(Constant.USHERED).append(",");
|
hasSubmitBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
@ -551,14 +552,14 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.cl_poi:
|
case R.id.cl_poi:
|
||||||
hasSubmitBuilder.append("点击了poi item跳转到poi列表 ,");
|
hasSubmitBuilder.append(TimestampUtil.time()).append("点击了poi item跳转到poi列表 ,");
|
||||||
Intent poiIntent = new Intent(getContext(), FragmentManagement.class);
|
Intent poiIntent = new Intent(getContext(), FragmentManagement.class);
|
||||||
poiIntent.putExtra("tag", 31);
|
poiIntent.putExtra("tag", 31);
|
||||||
poiIntent.putExtra("type", 1);
|
poiIntent.putExtra("type", 1);
|
||||||
startActivity(poiIntent);
|
startActivity(poiIntent);
|
||||||
break;
|
break;
|
||||||
case R.id.cl_road:
|
case R.id.cl_road:
|
||||||
hasSubmitBuilder.append("点击了road item跳转到road列表 ,");
|
hasSubmitBuilder.append(TimestampUtil.time()).append("点击了road item跳转到road列表 ,");
|
||||||
Intent roadIntent = new Intent(getContext(), FragmentManagement.class);
|
Intent roadIntent = new Intent(getContext(), FragmentManagement.class);
|
||||||
roadIntent.putExtra("tag", 31);
|
roadIntent.putExtra("tag", 31);
|
||||||
roadIntent.putExtra("type", 4);
|
roadIntent.putExtra("type", 4);
|
||||||
@ -566,21 +567,21 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.cl_charging:
|
case R.id.cl_charging:
|
||||||
hasSubmitBuilder.append("点击了charging item跳转到charging列表 ,");
|
hasSubmitBuilder.append(TimestampUtil.time()).append("点击了charging item跳转到charging列表 ,");
|
||||||
Intent chargingIntent = new Intent(getContext(), FragmentManagement.class);
|
Intent chargingIntent = new Intent(getContext(), FragmentManagement.class);
|
||||||
chargingIntent.putExtra("tag", 31);
|
chargingIntent.putExtra("tag", 31);
|
||||||
chargingIntent.putExtra("type", 2);
|
chargingIntent.putExtra("type", 2);
|
||||||
startActivity(chargingIntent);
|
startActivity(chargingIntent);
|
||||||
break;
|
break;
|
||||||
case R.id.cl_other:
|
case R.id.cl_other:
|
||||||
hasSubmitBuilder.append("点击了other item跳转到other列表 ,");
|
hasSubmitBuilder.append(TimestampUtil.time()).append("点击了other item跳转到other列表 ,");
|
||||||
Intent otherIntent = new Intent(getContext(), FragmentManagement.class);
|
Intent otherIntent = new Intent(getContext(), FragmentManagement.class);
|
||||||
otherIntent.putExtra("tag", 31);
|
otherIntent.putExtra("tag", 31);
|
||||||
otherIntent.putExtra("type", 5);
|
otherIntent.putExtra("type", 5);
|
||||||
startActivity(otherIntent);
|
startActivity(otherIntent);
|
||||||
break;
|
break;
|
||||||
case R.id.cl_poiVideo:
|
case R.id.cl_poiVideo:
|
||||||
hasSubmitBuilder.append("点击了poiVideo item跳转到poiVideo列表 ,");
|
hasSubmitBuilder.append(TimestampUtil.time()).append("点击了poiVideo item跳转到poiVideo列表 ,");
|
||||||
Intent poiVideoIntent = new Intent(getContext(), FragmentManagement.class);
|
Intent poiVideoIntent = new Intent(getContext(), FragmentManagement.class);
|
||||||
poiVideoIntent.putExtra("tag", 31);
|
poiVideoIntent.putExtra("tag", 31);
|
||||||
poiVideoIntent.putExtra("type", 3);
|
poiVideoIntent.putExtra("type", 3);
|
||||||
@ -592,13 +593,13 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
hasSubmitBuilder.append("onPause ,");
|
hasSubmitBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
hasSubmitBuilder.append("onStop ,");
|
hasSubmitBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -606,7 +607,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
hasSubmitBuilder.append("onDestroy");
|
hasSubmitBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
hasSubmitBuilder.append("\r\n");
|
hasSubmitBuilder.append("\r\n");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), hasSubmitBuilder.toString(), true);
|
FileUtils.writeFile(logFile.getAbsolutePath(), hasSubmitBuilder.toString(), true);
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
|||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
issueProblemAdapter.setExplainList(response.getBody().getList());
|
issueProblemAdapter.setExplainList(response.getBody().getList());
|
||||||
issuePage++;
|
issuePage++;
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
|
@ -116,7 +116,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
|||||||
if (taskPrefectureBean.getCode() == 200) {
|
if (taskPrefectureBean.getCode() == 200) {
|
||||||
messageAdapter.setMessageList(taskPrefectureBean.getBody().getList());
|
messageAdapter.setMessageList(taskPrefectureBean.getBody().getList());
|
||||||
messagePage++;
|
messagePage++;
|
||||||
} else if (taskPrefectureBean.getCode() == 203) {
|
} else if (taskPrefectureBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), taskPrefectureBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), taskPrefectureBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
|
@ -31,6 +31,7 @@ import com.navinfo.outdoor.http.HttpInterface;
|
|||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
import com.navinfo.outdoor.util.DoubleUtil;
|
import com.navinfo.outdoor.util.DoubleUtil;
|
||||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
@ -157,7 +158,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity()!=null){
|
||||||
@ -222,7 +223,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
mainBuilder = new StringBuilder();
|
mainBuilder = new StringBuilder();
|
||||||
mainBuilder.append("MineFragment-onCreate-initData ,");
|
mainBuilder.append(TimestampUtil.time()).append("MineFragment-onCreate-initData ,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
mainBuilder.append("userId:").append(Constant.USHERED).append(",");
|
mainBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
@ -233,7 +234,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.image_heard:
|
case R.id.image_heard:
|
||||||
case R.id.tv_name://跳转到个人信息
|
case R.id.tv_name://跳转到个人信息
|
||||||
mainBuilder.append("点击了头像和名字 跳转到个人信息 ,");
|
mainBuilder.append(TimestampUtil.time()).append("点击了头像和名字 跳转到个人信息 ,");
|
||||||
Intent intentUser = new Intent(getActivity(), UserActivity.class);
|
Intent intentUser = new Intent(getActivity(), UserActivity.class);
|
||||||
intentUser.putExtra("tag", 16);
|
intentUser.putExtra("tag", 16);
|
||||||
startActivity(intentUser);
|
startActivity(intentUser);
|
||||||
@ -256,7 +257,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
||||||
break;
|
break;
|
||||||
case R.id.btn_withdraw://提现页面
|
case R.id.btn_withdraw://提现页面
|
||||||
mainBuilder.append("点击了item 跳转到提现页面 ,");
|
mainBuilder.append(TimestampUtil.time()).append("点击了item 跳转到提现页面 ,");
|
||||||
Intent intentWithdraw = new Intent(getActivity(), FragmentManagement.class);
|
Intent intentWithdraw = new Intent(getActivity(), FragmentManagement.class);
|
||||||
intentWithdraw.putExtra("tag", 15);
|
intentWithdraw.putExtra("tag", 15);
|
||||||
startActivity(intentWithdraw);
|
startActivity(intentWithdraw);
|
||||||
@ -271,19 +272,19 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
intentSet.putExtra("tag", 22);
|
intentSet.putExtra("tag", 22);
|
||||||
startActivity(intentSet);*/
|
startActivity(intentSet);*/
|
||||||
case R.id.rl_contact://联系我们
|
case R.id.rl_contact://联系我们
|
||||||
mainBuilder.append("点击了item 跳转到联系我们 ,");
|
mainBuilder.append(TimestampUtil.time()).append("点击了item 跳转到联系我们 ,");
|
||||||
Intent intentContact = new Intent(getActivity(), FragmentManagement.class);
|
Intent intentContact = new Intent(getActivity(), FragmentManagement.class);
|
||||||
intentContact.putExtra("tag", 21);
|
intentContact.putExtra("tag", 21);
|
||||||
startActivity(intentContact);
|
startActivity(intentContact);
|
||||||
break;
|
break;
|
||||||
case R.id.rl_about://关于
|
case R.id.rl_about://关于
|
||||||
mainBuilder.append("点击了item 跳转到关于页面 ,");
|
mainBuilder.append(TimestampUtil.time()).append("点击了item 跳转到关于页面 ,");
|
||||||
Intent intentAbout = new Intent(getActivity(), FragmentManagement.class);
|
Intent intentAbout = new Intent(getActivity(), FragmentManagement.class);
|
||||||
intentAbout.putExtra("tag", 23);
|
intentAbout.putExtra("tag", 23);
|
||||||
startActivity(intentAbout);
|
startActivity(intentAbout);
|
||||||
break;
|
break;
|
||||||
case R.id.btn_quit://退出登录
|
case R.id.btn_quit://退出登录
|
||||||
mainBuilder.append("点击了退出登录的按钮 ,");
|
mainBuilder.append(TimestampUtil.time()).append("点击了退出登录的按钮 ,");
|
||||||
Intent intent = new Intent(getContext(), LoginActivity.class);
|
Intent intent = new Intent(getContext(), LoginActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
|
@ -710,7 +710,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (poiSaveBean.getCode() == 203) {
|
} else if (poiSaveBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
@ -736,7 +736,8 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
public void run() {
|
public void run() {
|
||||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});}
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@ -889,7 +890,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
|
@ -49,6 +49,7 @@ import com.navinfo.outdoor.base.BaseDrawerFragment;
|
|||||||
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||||
import com.navinfo.outdoor.util.PreserveUtils;
|
import com.navinfo.outdoor.util.PreserveUtils;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
import com.navinfo.outdoor.util.UploadUtils;
|
import com.navinfo.outdoor.util.UploadUtils;
|
||||||
import com.navinfo.outdoor.bean.GetPhoneBean;
|
import com.navinfo.outdoor.bean.GetPhoneBean;
|
||||||
import com.navinfo.outdoor.bean.Info;
|
import com.navinfo.outdoor.bean.Info;
|
||||||
@ -229,7 +230,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
checkBoxLife.setOnClickListener(new View.OnClickListener() {
|
checkBoxLife.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
poiBuilder.append("点击了点位编辑,");
|
poiBuilder.append(TimestampUtil.time()).append("点击了点位编辑,");
|
||||||
if (checkBoxLife.isChecked()) {
|
if (checkBoxLife.isChecked()) {
|
||||||
moveLatlng(latLng, new TencentMap.CancelableCallback() {
|
moveLatlng(latLng, new TencentMap.CancelableCallback() {
|
||||||
@Override
|
@Override
|
||||||
@ -613,7 +614,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if (getPhoneBean.getCode() == 203) {
|
} else if (getPhoneBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity()!=null){
|
||||||
@ -706,7 +707,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
poiBuilder = new StringBuilder();
|
poiBuilder = new StringBuilder();
|
||||||
poiBuilder.append("PoiActivity-onCreate-initData ,");
|
poiBuilder.append(TimestampUtil.time()).append("PoiActivity-onCreate-initData ,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
poiBuilder.append("userId:").append(Constant.USHERED).append(",");
|
poiBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
@ -725,11 +726,11 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.btn_save_local:
|
case R.id.btn_save_local:
|
||||||
poiBuilder.append("点击了保存本地的按钮,");
|
poiBuilder.append(TimestampUtil.time()).append("点击了保存本地的按钮,");
|
||||||
initPoiSaveLocal(false);
|
initPoiSaveLocal(false);
|
||||||
break;
|
break;
|
||||||
case R.id.btn_uploading:
|
case R.id.btn_uploading:
|
||||||
poiBuilder.append("点击了上传的按钮,");
|
poiBuilder.append(TimestampUtil.time()).append("点击了上传的按钮,");
|
||||||
if (poiPicList != null) {
|
if (poiPicList != null) {
|
||||||
poiPicList.clear();
|
poiPicList.clear();
|
||||||
}
|
}
|
||||||
@ -783,40 +784,40 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.tv_poi_examine:
|
case R.id.tv_poi_examine:
|
||||||
poiBuilder.append("点击了查重的按钮,");
|
poiBuilder.append(TimestampUtil.time()).append("点击了查重的按钮,");
|
||||||
findingDuplicateByWork();
|
findingDuplicateByWork();
|
||||||
break;
|
break;
|
||||||
case R.id.rl_panorama:
|
case R.id.rl_panorama:
|
||||||
findingDuplicateByWork();
|
findingDuplicateByWork();
|
||||||
poiBuilder.append("点击了全景图的进行拍照,");
|
poiBuilder.append(TimestampUtil.time()).append("点击了全景图的进行拍照,");
|
||||||
Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class);
|
Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class);
|
||||||
File filePanorama = PhotoUtils.showPhotoFile("a", latLng);
|
File filePanorama = PhotoUtils.showPhotoFile("a", latLng);
|
||||||
intentPanorama.putExtra(Constant.INTENT_PHOTO_PATH, filePanorama.getPath());
|
intentPanorama.putExtra(Constant.INTENT_PHOTO_PATH, filePanorama.getPath());
|
||||||
startActivityForResult(intentPanorama, 101);
|
startActivityForResult(intentPanorama, 101);
|
||||||
break;
|
break;
|
||||||
case R.id.rl_name:
|
case R.id.rl_name:
|
||||||
poiBuilder.append("点击了名称的进行拍照,");
|
poiBuilder.append(TimestampUtil.time()).append("点击了名称的进行拍照,");
|
||||||
Intent intentName = new Intent(getActivity(), PhotographActivity.class);
|
Intent intentName = new Intent(getActivity(), PhotographActivity.class);
|
||||||
File fileName = PhotoUtils.showPhotoFile("b", latLng);
|
File fileName = PhotoUtils.showPhotoFile("b", latLng);
|
||||||
intentName.putExtra(Constant.INTENT_PHOTO_PATH, fileName.getPath());
|
intentName.putExtra(Constant.INTENT_PHOTO_PATH, fileName.getPath());
|
||||||
startActivityForResult(intentName, 102);
|
startActivityForResult(intentName, 102);
|
||||||
break;
|
break;
|
||||||
case R.id.rl_internal_photos:
|
case R.id.rl_internal_photos:
|
||||||
poiBuilder.append("点击了内部照片的进行拍照,");
|
poiBuilder.append(TimestampUtil.time()).append("点击了内部照片的进行拍照,");
|
||||||
Intent intentInternal = new Intent(getActivity(), PhotographActivity.class);
|
Intent intentInternal = new Intent(getActivity(), PhotographActivity.class);
|
||||||
File fileInternal = PhotoUtils.showPhotoFile("c", latLng);
|
File fileInternal = PhotoUtils.showPhotoFile("c", latLng);
|
||||||
intentInternal.putExtra(Constant.INTENT_PHOTO_PATH, fileInternal.getPath());
|
intentInternal.putExtra(Constant.INTENT_PHOTO_PATH, fileInternal.getPath());
|
||||||
startActivityForResult(intentInternal, 103);
|
startActivityForResult(intentInternal, 103);
|
||||||
break;
|
break;
|
||||||
case R.id.rl_card:
|
case R.id.rl_card:
|
||||||
poiBuilder.append("点击了名片的进行拍照,");
|
poiBuilder.append(TimestampUtil.time()).append("点击了名片的进行拍照,");
|
||||||
Intent intentCard = new Intent(getActivity(), PhotographActivity.class);
|
Intent intentCard = new Intent(getActivity(), PhotographActivity.class);
|
||||||
File fileCard = PhotoUtils.showPhotoFile("d", latLng);
|
File fileCard = PhotoUtils.showPhotoFile("d", latLng);
|
||||||
intentCard.putExtra(Constant.INTENT_PHOTO_PATH, fileCard.getPath());
|
intentCard.putExtra(Constant.INTENT_PHOTO_PATH, fileCard.getPath());
|
||||||
startActivityForResult(intentCard, 104);
|
startActivityForResult(intentCard, 104);
|
||||||
break;
|
break;
|
||||||
case R.id.rl_else:
|
case R.id.rl_else:
|
||||||
poiBuilder.append("点击了其他的进行拍照,");
|
poiBuilder.append(TimestampUtil.time()).append("点击了其他的进行拍照,");
|
||||||
Intent intentElse = new Intent(getActivity(), PhotographActivity.class);
|
Intent intentElse = new Intent(getActivity(), PhotographActivity.class);
|
||||||
File fileElse = PhotoUtils.showPhotoFile("e", latLng);
|
File fileElse = PhotoUtils.showPhotoFile("e", latLng);
|
||||||
intentElse.putExtra(Constant.INTENT_PHOTO_PATH, fileElse.getPath());
|
intentElse.putExtra(Constant.INTENT_PHOTO_PATH, fileElse.getPath());
|
||||||
@ -861,7 +862,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
} else if (taskNameBean.getCode() == 203) {
|
} else if (taskNameBean.getCode() == 230) {
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@ -1066,7 +1067,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (poiSaveBean.getCode() == 203) {
|
} else if (poiSaveBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity()!=null){
|
||||||
@ -1300,7 +1301,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity()!=null){
|
||||||
|
@ -132,7 +132,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
if (hasSubmitBean.getBody() != null) {
|
if (hasSubmitBean.getBody() != null) {
|
||||||
initHasSubmitBean(hasSubmitBean, aBoolean);
|
initHasSubmitBean(hasSubmitBean, aBoolean);
|
||||||
}
|
}
|
||||||
} else if (hasSubmitBean.getCode() == 203) {
|
} else if (hasSubmitBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), hasSubmitBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
|
@ -344,6 +344,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
if (memo != null && !memo.equals("")) {
|
if (memo != null && !memo.equals("")) {
|
||||||
etDesc.setText(memo);
|
etDesc.setText(memo);
|
||||||
}
|
}
|
||||||
|
showPoiEntity.setType(3);
|
||||||
String photoList = showPoiEntity.getPhoto();
|
String photoList = showPoiEntity.getPhoto();
|
||||||
if (!StringUtils.isEmpty(photoList)) {
|
if (!StringUtils.isEmpty(photoList)) {
|
||||||
boolean isImageLoad = false;
|
boolean isImageLoad = false;
|
||||||
@ -679,7 +680,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (poiVideoBean.getCode() == 203) {
|
} else if (poiVideoBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity()!=null){
|
||||||
@ -720,7 +721,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -835,7 +835,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
|
@ -42,6 +42,7 @@ import com.navinfo.outdoor.api.Constant;
|
|||||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||||
import com.navinfo.outdoor.util.PreserveUtils;
|
import com.navinfo.outdoor.util.PreserveUtils;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
import com.navinfo.outdoor.util.UploadUtils;
|
import com.navinfo.outdoor.util.UploadUtils;
|
||||||
import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
||||||
import com.navinfo.outdoor.bean.RoadSaveBean;
|
import com.navinfo.outdoor.bean.RoadSaveBean;
|
||||||
@ -267,7 +268,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
roadBuilder = new StringBuilder();
|
roadBuilder = new StringBuilder();
|
||||||
roadBuilder.append("RoadActivity-onCreate-initData ,");
|
roadBuilder.append(TimestampUtil.time()).append("RoadActivity-onCreate-initData ,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
roadBuilder.append("userId:").append(Constant.USHERED).append(",");
|
roadBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
@ -282,6 +283,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
if (name != null && !name.equals("")) {
|
if (name != null && !name.equals("")) {
|
||||||
etRoadName.setText(name);
|
etRoadName.setText(name);
|
||||||
}
|
}
|
||||||
|
showPoiEntity.setType(4);
|
||||||
String geoWkt = showPoiEntity.getGeoWkt();
|
String geoWkt = showPoiEntity.getGeoWkt();
|
||||||
if (geoWkt != null) {
|
if (geoWkt != null) {
|
||||||
String geo = Geohash.getInstance().decode(geoWkt);
|
String geo = Geohash.getInstance().decode(geoWkt);
|
||||||
@ -426,11 +428,11 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.btn_road_save:
|
case R.id.btn_road_save:
|
||||||
roadBuilder.append("点击了保存本地的按钮 ,");
|
roadBuilder.append(TimestampUtil.time()).append("点击了保存本地的按钮 ,");
|
||||||
initPoiSaveLocal(false);
|
initPoiSaveLocal(false);
|
||||||
break;
|
break;
|
||||||
case R.id.fm_road_picture:
|
case R.id.fm_road_picture:
|
||||||
roadBuilder.append("点击了图片查看列表 ,");
|
roadBuilder.append(TimestampUtil.time()).append("点击了图片查看列表 ,");
|
||||||
if (fmRoadPic.getTag() == null) {
|
if (fmRoadPic.getTag() == null) {
|
||||||
Toast.makeText(getContext(), "还没有拍摄", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "还没有拍摄", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
@ -441,7 +443,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
startActivity(photoAlbumIntent);
|
startActivity(photoAlbumIntent);
|
||||||
break;
|
break;
|
||||||
case R.id.tv_pictures:
|
case R.id.tv_pictures:
|
||||||
roadBuilder.append("点击了自动拍照的按钮 ,");
|
roadBuilder.append(TimestampUtil.time()).append("点击了自动拍照的按钮 ,");
|
||||||
double latitude = Constant.currentLocation.getLatitude();
|
double latitude = Constant.currentLocation.getLatitude();
|
||||||
double longitude = Constant.currentLocation.getLongitude();
|
double longitude = Constant.currentLocation.getLongitude();
|
||||||
LatLng startLatLng = new LatLng(latitude, longitude); //用户当前位置
|
LatLng startLatLng = new LatLng(latitude, longitude); //用户当前位置
|
||||||
@ -467,7 +469,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
startActivityForResult(intent, 0x101);
|
startActivityForResult(intent, 0x101);
|
||||||
break;
|
break;
|
||||||
case R.id.road_upload:
|
case R.id.road_upload:
|
||||||
roadBuilder.append("点击了上传的按钮 ,");
|
roadBuilder.append(TimestampUtil.time()).append("点击了上传的按钮 ,");
|
||||||
if (Constant.isPresent) {
|
if (Constant.isPresent) {
|
||||||
if (fmRoadPic.getTag() != null) {
|
if (fmRoadPic.getTag() != null) {
|
||||||
List<File> videoFileList = (List<File>) fmRoadPic.getTag();
|
List<File> videoFileList = (List<File>) fmRoadPic.getTag();
|
||||||
@ -668,7 +670,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
}
|
}
|
||||||
});}
|
});}
|
||||||
}
|
}
|
||||||
} else if (roadSaveBean.getCode() == 203) {
|
} else if (roadSaveBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity()!=null){
|
||||||
@ -757,13 +759,13 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
roadBuilder.append("onPause ,");
|
roadBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
roadBuilder.append("onStop ,");
|
roadBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -774,7 +776,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
if (markerRoad != null) {
|
if (markerRoad != null) {
|
||||||
markerRoad.remove();
|
markerRoad.remove();
|
||||||
}
|
}
|
||||||
roadBuilder.append("onDestroy");
|
roadBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
roadBuilder.append("\r\n");
|
roadBuilder.append("\r\n");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), roadBuilder.toString(), true);
|
FileUtils.writeFile(logFile.getAbsolutePath(), roadBuilder.toString(), true);
|
||||||
}
|
}
|
||||||
@ -817,7 +819,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity()!=null){
|
||||||
|
@ -347,7 +347,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
staySubmitAdapter.setAllCheckedDelete();
|
staySubmitAdapter.setAllCheckedDelete();
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
|
@ -156,7 +156,7 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
initTaskPrefectureBean(response, aNet);
|
initTaskPrefectureBean(response, aNet);
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
|
@ -155,7 +155,7 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
initTaskPrefectureBean(response, aBoolean);
|
initTaskPrefectureBean(response, aBoolean);
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
|
@ -29,6 +29,7 @@ import com.navinfo.outdoor.http.OkGoBuilder;
|
|||||||
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
||||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
@ -90,7 +91,7 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
taskPrefectureAdapter.setClickItem(new TaskPrefectureAdapter.clickItem() {
|
taskPrefectureAdapter.setClickItem(new TaskPrefectureAdapter.clickItem() {
|
||||||
@Override
|
@Override
|
||||||
public void item(int id) {
|
public void item(int id) {
|
||||||
taskPrefectureBuilder.append("点击了item ,");
|
taskPrefectureBuilder.append(TimestampUtil.time()).append("点击了item ,");
|
||||||
HashMap<String, String> paramMap = new HashMap<>();
|
HashMap<String, String> paramMap = new HashMap<>();
|
||||||
paramMap.put("id", id + "");
|
paramMap.put("id", id + "");
|
||||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||||
@ -121,9 +122,9 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
taskPrefectureBuilder = new StringBuilder();
|
taskPrefectureBuilder = new StringBuilder();
|
||||||
taskPrefectureBuilder.append("TaskPrefectureFragment-onCreate-initData ,");
|
taskPrefectureBuilder.append(TimestampUtil.time()).append("TaskPrefectureFragment-onCreate-initData ,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
taskPrefectureBuilder.append("userId:").append(Constant.USHERED).append(",");
|
taskPrefectureBuilder.append(TimestampUtil.time()).append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -185,7 +186,7 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
taskPage++;
|
taskPage++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (taskPrefectureBean.getCode() == 203) {
|
} else if (taskPrefectureBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), taskPrefectureBean.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), taskPrefectureBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
@ -197,26 +198,26 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v.getId() == R.id.iv_find_task) {
|
if (v.getId() == R.id.iv_find_task) {
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
taskPrefectureBuilder.append("点击了返回的按钮 ,");
|
taskPrefectureBuilder.append(TimestampUtil.time()).append("点击了返回的按钮 ,");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
taskPrefectureBuilder.append("onPause ,");
|
taskPrefectureBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
taskPrefectureBuilder.append("onStop ,");
|
taskPrefectureBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
taskPrefectureBuilder.append("onDestroy");
|
taskPrefectureBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
taskPrefectureBuilder.append("\r\n");
|
taskPrefectureBuilder.append("\r\n");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), taskPrefectureBuilder.toString(), true);
|
FileUtils.writeFile(logFile.getAbsolutePath(), taskPrefectureBuilder.toString(), true);
|
||||||
}
|
}
|
||||||
|
@ -430,7 +430,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
sharedEdit.putInt("type", messageType);
|
sharedEdit.putInt("type", messageType);
|
||||||
sharedEdit.putString("dataTime", format);
|
sharedEdit.putString("dataTime", format);
|
||||||
sharedEdit.commit();
|
sharedEdit.commit();
|
||||||
} else if (messageNoticeBean.getCode() == 203) {
|
} else if (messageNoticeBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity()!=null){
|
||||||
@ -509,7 +509,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
Constant.TelLength = telLength;
|
Constant.TelLength = telLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (getPhoneBean.getCode() == 203) {
|
} else if (getPhoneBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity()!=null){
|
||||||
@ -612,7 +612,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity()!=null){
|
||||||
@ -908,7 +908,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
obtain.what = Constant.JOB_SEARCH_WORD;
|
obtain.what = Constant.JOB_SEARCH_WORD;
|
||||||
obtain.obj = response;
|
obtain.obj = response;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity()!=null){
|
||||||
|
@ -73,6 +73,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
private ImageView useCamera;
|
private ImageView useCamera;
|
||||||
private File logFile;
|
private File logFile;
|
||||||
private StringBuilder userAttestationBuilder;
|
private StringBuilder userAttestationBuilder;
|
||||||
|
private SharedPreferences.Editor sharedPreEditor;
|
||||||
|
|
||||||
public static UserAttestationFragment newInstance(Bundle bundle) {
|
public static UserAttestationFragment newInstance(Bundle bundle) {
|
||||||
UserAttestationFragment fragment = new UserAttestationFragment();
|
UserAttestationFragment fragment = new UserAttestationFragment();
|
||||||
@ -115,6 +116,8 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
|
SharedPreferences sharedPreferences = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.DATA_FILE, Context.MODE_PRIVATE);
|
||||||
|
sharedPreEditor = sharedPreferences.edit();
|
||||||
ImageView ivAttestation = findViewById(R.id.iv_attestation);
|
ImageView ivAttestation = findViewById(R.id.iv_attestation);
|
||||||
ivAttestation.setOnClickListener(this);
|
ivAttestation.setOnClickListener(this);
|
||||||
ivAttestation1 = findViewById(R.id.iv_attestation1);
|
ivAttestation1 = findViewById(R.id.iv_attestation1);
|
||||||
@ -173,6 +176,24 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
btnAttestation.setEnabled(false);
|
btnAttestation.setEnabled(false);
|
||||||
useCamera.setEnabled(false);
|
useCamera.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
String tv1 = sharedPreferences.getString("tvCard1", null);
|
||||||
|
if (tv1!=null){
|
||||||
|
File tvFile = new File(tv1);
|
||||||
|
String andGetPath = PhotoUtils.showPhotoAndGetPath(tvFile, ivAttestation1);
|
||||||
|
tvCard1.setTag(andGetPath);
|
||||||
|
}
|
||||||
|
String tv2 = sharedPreferences.getString("tvCard2", null);
|
||||||
|
if (tv2!=null){
|
||||||
|
File tvFile = new File(tv2);
|
||||||
|
String andGetPath = PhotoUtils.showPhotoAndGetPath(tvFile, ivAttestation2);
|
||||||
|
tvCard1.setTag(andGetPath);
|
||||||
|
}
|
||||||
|
String tv3 = sharedPreferences.getString("tvCard3", null);
|
||||||
|
if (tv3!=null){
|
||||||
|
File tvFile = new File(tv3);
|
||||||
|
String andGetPath = PhotoUtils.showPhotoAndGetPath(tvFile, ivAttestation3);
|
||||||
|
tvCard1.setTag(andGetPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -311,7 +332,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), "提交失败!", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "提交失败!", Toast.LENGTH_SHORT).show();
|
||||||
@ -343,7 +364,14 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
assert file != null;
|
assert file != null;
|
||||||
File videoFile = new File(file);
|
File videoFile = new File(file);
|
||||||
if (videoFile.exists()) {
|
if (videoFile.exists()) {
|
||||||
|
if (tvCard1.getTag() != null) {
|
||||||
|
File fileElse = new File((String) tvCard1.getTag());
|
||||||
|
fileElse.delete();
|
||||||
|
tvCard1.setTag(null);
|
||||||
|
}
|
||||||
String andGetPath = PhotoUtils.showPhotoAndGetPath(videoFile, ivAttestation1);
|
String andGetPath = PhotoUtils.showPhotoAndGetPath(videoFile, ivAttestation1);
|
||||||
|
sharedPreEditor.putString("tvCard1",videoFile.getAbsolutePath());
|
||||||
|
sharedPreEditor.apply();
|
||||||
tvCard1.setTag(andGetPath);
|
tvCard1.setTag(andGetPath);
|
||||||
}
|
}
|
||||||
ivHera1.setVisibility(View.GONE);
|
ivHera1.setVisibility(View.GONE);
|
||||||
@ -354,8 +382,15 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
assert file != null;
|
assert file != null;
|
||||||
File videoFile = new File(file);
|
File videoFile = new File(file);
|
||||||
if (videoFile.exists()) {
|
if (videoFile.exists()) {
|
||||||
|
if (tvCard2.getTag() != null) {
|
||||||
|
File fileElse = new File((String) tvCard2.getTag());
|
||||||
|
fileElse.delete();
|
||||||
|
tvCard2.setTag(null);
|
||||||
|
}
|
||||||
String andGetPath = PhotoUtils.showPhotoAndGetPath(videoFile, ivAttestation2);
|
String andGetPath = PhotoUtils.showPhotoAndGetPath(videoFile, ivAttestation2);
|
||||||
tvCard2.setTag(andGetPath);
|
tvCard2.setTag(andGetPath);
|
||||||
|
sharedPreEditor.putString("tvCard2",videoFile.getAbsolutePath());
|
||||||
|
sharedPreEditor.apply();
|
||||||
}
|
}
|
||||||
ivHera2.setVisibility(View.GONE);
|
ivHera2.setVisibility(View.GONE);
|
||||||
tvCard2.setVisibility(View.GONE);
|
tvCard2.setVisibility(View.GONE);
|
||||||
@ -365,8 +400,15 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
assert file != null;
|
assert file != null;
|
||||||
File videoFile = new File(file);
|
File videoFile = new File(file);
|
||||||
if (videoFile.exists()) {
|
if (videoFile.exists()) {
|
||||||
|
if (tvCard3.getTag() != null) {
|
||||||
|
File fileElse = new File((String) tvCard3.getTag());
|
||||||
|
fileElse.delete();
|
||||||
|
tvCard3.setTag(null);
|
||||||
|
}
|
||||||
String andGetPath = PhotoUtils.showPhotoAndGetPath(videoFile, ivAttestation3);
|
String andGetPath = PhotoUtils.showPhotoAndGetPath(videoFile, ivAttestation3);
|
||||||
tvCard3.setTag(andGetPath);
|
tvCard3.setTag(andGetPath);
|
||||||
|
sharedPreEditor.putString("tvCard3",videoFile.getAbsolutePath());
|
||||||
|
sharedPreEditor.apply();
|
||||||
}
|
}
|
||||||
ivHera3.setVisibility(View.GONE);
|
ivHera3.setVisibility(View.GONE);
|
||||||
tvCard3.setVisibility(View.GONE);
|
tvCard3.setVisibility(View.GONE);
|
||||||
|
@ -172,7 +172,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getContext(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
@ -276,7 +276,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
withdrawBuilder.append("提现了失败 ,");
|
withdrawBuilder.append("提现了失败 ,");
|
||||||
|
@ -104,7 +104,7 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
|||||||
if (withdrawalBean.getCode() == 200) {
|
if (withdrawalBean.getCode() == 200) {
|
||||||
withdrawalAdapter.setDataBeans(withdrawalBean.getBody().getList());
|
withdrawalAdapter.setDataBeans(withdrawalBean.getBody().getList());
|
||||||
withPage++;
|
withPage++;
|
||||||
} else if (withdrawalBean.getCode() == 203) {
|
} else if (withdrawalBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), withdrawalBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), withdrawalBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.navinfo.outdoor.http;
|
package com.navinfo.outdoor.http;
|
||||||
|
|
||||||
public class HttpInterface {
|
public class HttpInterface {
|
||||||
public static final String IP= "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
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 IP= "http://dtxbmaps.navinfo.com/dtxb_test/m4";//测试接口
|
||||||
public static final String USER_PATH ="/user/";//我的
|
public static final String USER_PATH ="/user/";//我的
|
||||||
public static final String MSG_LIST_PATH ="/msgList/";//发现
|
public static final String MSG_LIST_PATH ="/msgList/";//发现
|
||||||
public static final String USER_LOGIN_PATH ="/userlogin/";//登录
|
public static final String USER_LOGIN_PATH ="/userlogin/";//登录
|
||||||
|
@ -36,12 +36,18 @@ public abstract class PoiDatabase extends RoomDatabase {
|
|||||||
}
|
}
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
public static void destroy(){
|
||||||
|
instance=null;
|
||||||
|
}
|
||||||
private static PoiDatabase create(final Context context) {
|
private static PoiDatabase create(final Context context) {
|
||||||
File dbFolder = new File(Constant.POI_DAO+""); // 数据库文件夹路径
|
if (Constant.POI_DAO==null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
File dbFolder = new File(Constant.POI_DAO); // 数据库文件夹路径
|
||||||
if (!dbFolder.exists()) {
|
if (!dbFolder.exists()) {
|
||||||
SdkFolderCreate.mkdirs(dbFolder.getAbsolutePath());
|
SdkFolderCreate.mkdirs(dbFolder.getAbsolutePath());
|
||||||
}
|
}
|
||||||
return Room.databaseBuilder(context, PoiDatabase.class, Constant.POI_DAO+DB_NAME)
|
return Room.databaseBuilder(context, PoiDatabase.class, Constant.POI_DAO+"/"+DB_NAME)
|
||||||
.addMigrations(migration_1_2)
|
.addMigrations(migration_1_2)
|
||||||
//.fallbackToDestructiveMigration()//数据库更新时删除数据重新创建 改动特别大的时候在用
|
//.fallbackToDestructiveMigration()//数据库更新时删除数据重新创建 改动特别大的时候在用
|
||||||
.build();
|
.build();
|
||||||
|
@ -196,11 +196,11 @@ public class AWMp4ParserHelper {
|
|||||||
* */
|
* */
|
||||||
public File obtainMp4FilePath(String uuid, Object tag) {
|
public File obtainMp4FilePath(String uuid, Object tag) {
|
||||||
if (tag == null) {
|
if (tag == null) {
|
||||||
return new File(Constant.PICTURE_FOLDER+"/"+uuid+"-0.mp4");
|
return new File(Constant.PICTURE_FOLDER,uuid+"-0.mp4");
|
||||||
}
|
}
|
||||||
List<File> fileList = (List<File>) tag;
|
List<File> fileList = (List<File>) tag;
|
||||||
if (fileList == null || fileList.isEmpty()) {
|
if (fileList == null || fileList.isEmpty()) {
|
||||||
return new File(Constant.PICTURE_FOLDER+"/"+uuid+"-0.mp4");
|
return new File(Constant.PICTURE_FOLDER,uuid+"-0.mp4");
|
||||||
}
|
}
|
||||||
int maxIndex = 0;
|
int maxIndex = 0;
|
||||||
for (int i = 0; i < fileList.size(); i++) {
|
for (int i = 0; i < fileList.size(); i++) {
|
||||||
@ -215,7 +215,7 @@ public class AWMp4ParserHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new File(Constant.PICTURE_FOLDER+"/"+uuid+"-"+(maxIndex+1)+".mp4");
|
return new File(Constant.PICTURE_FOLDER,uuid+"-"+(maxIndex+1)+".mp4");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -75,7 +75,6 @@ public class FlushTokenUtil {
|
|||||||
if (body.getUserId() != null && !body.getUserId().equals("")) {
|
if (body.getUserId() != null && !body.getUserId().equals("")) {
|
||||||
Constant.initRootFolder(body.getUserId());
|
Constant.initRootFolder(body.getUserId());
|
||||||
HttpInterface.initHttpInter(body.getUserId());
|
HttpInterface.initHttpInter(body.getUserId());
|
||||||
}
|
|
||||||
navInfoEditor.putString("access_token", body.getAccess_token());
|
navInfoEditor.putString("access_token", body.getAccess_token());
|
||||||
Constant.ACCESS_TOKEN = body.getAccess_token();
|
Constant.ACCESS_TOKEN = body.getAccess_token();
|
||||||
navInfoEditor.putString("refresh_token", body.getRefresh_token());
|
navInfoEditor.putString("refresh_token", body.getRefresh_token());
|
||||||
@ -88,6 +87,10 @@ public class FlushTokenUtil {
|
|||||||
} else {
|
} else {
|
||||||
initGetUserInfo(activity);//获取用户信息
|
initGetUserInfo(activity);//获取用户信息
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
Toast.makeText(activity, "获取用户id 失败", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(activity, response.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(activity, response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ public class PhotoPathUtil {
|
|||||||
if (angle==0){
|
if (angle==0){
|
||||||
angle=90;
|
angle=90;
|
||||||
}
|
}
|
||||||
File file = new File(Constant.PICTURE_FOLDER+d+time+"_p"+chord+"_a"+angle+".jpg");
|
File file = new File(Constant.PICTURE_FOLDER,d+time+"_p"+chord+"_a"+angle+".jpg");
|
||||||
/*打开文件输出流*/
|
/*打开文件输出流*/
|
||||||
fileOutputStream = new FileOutputStream(file);
|
fileOutputStream = new FileOutputStream(file);
|
||||||
// 生成图片文件
|
// 生成图片文件
|
||||||
|
@ -81,7 +81,7 @@ public class PreserveUtils {
|
|||||||
obtain1.obj = "道路:" + poiEntity.getName() + " 保存失败";
|
obtain1.obj = "道路:" + poiEntity.getName() + " 保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
@ -141,7 +141,7 @@ public class PreserveUtils {
|
|||||||
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存失败";
|
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
@ -203,7 +203,7 @@ public class PreserveUtils {
|
|||||||
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存失败";
|
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
@ -264,7 +264,7 @@ public class PreserveUtils {
|
|||||||
obtain1.obj = "其他:" + poiEntity.getName() + " 保存失败";
|
obtain1.obj = "其他:" + poiEntity.getName() + " 保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
} else if (response.getCode() == 203) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
@ -326,7 +326,7 @@ public class PreserveUtils {
|
|||||||
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存失败";
|
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
} else if (chargingStationBean.getCode() == 203) {
|
} else if (chargingStationBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
package com.navinfo.outdoor.util;
|
package com.navinfo.outdoor.util;
|
||||||
|
|
||||||
|
import java.text.DateFormat;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class TimestampUtil {
|
public class TimestampUtil {
|
||||||
@ -28,4 +30,11 @@ public class TimestampUtil {
|
|||||||
res = simpleDateFormat.format(date);
|
res = simpleDateFormat.format(date);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String time(){
|
||||||
|
DateFormat formatter = new SimpleDateFormat("yyyyMMdd HHmmss");
|
||||||
|
Calendar calendars = Calendar.getInstance();
|
||||||
|
calendars.setTimeInMillis(System.currentTimeMillis());
|
||||||
|
return formatter.format(calendars.getTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ public class UploadUtils {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}else if (response.getCode()==203){
|
}else if (response.getCode()==230){
|
||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
@ -128,7 +128,7 @@ public class UploadUtils {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}else if (response.getCode()==203){
|
}else if (response.getCode()==230){
|
||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
@ -191,7 +191,7 @@ public class UploadUtils {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}else if (response.getCode()==203){
|
}else if (response.getCode()==230){
|
||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
@ -248,7 +248,7 @@ public class UploadUtils {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}else if (response.getCode()==203){
|
}else if (response.getCode()==230){
|
||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
@ -306,7 +306,7 @@ public class UploadUtils {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}else if (response.getCode()==203){
|
}else if (response.getCode()==230){
|
||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user