修改拍照
This commit is contained in:
parent
b2f1b21b09
commit
04c2ecf8e3
@ -36,6 +36,7 @@ import com.kongzue.dialog.util.DialogSettings;
|
|||||||
import com.kongzue.dialog.v3.MessageDialog;
|
import com.kongzue.dialog.v3.MessageDialog;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
|
import com.navinfo.outdoor.api.UserApplication;
|
||||||
import com.navinfo.outdoor.base.BaseActivity;
|
import com.navinfo.outdoor.base.BaseActivity;
|
||||||
import com.navinfo.outdoor.room.PoiEntity;
|
import com.navinfo.outdoor.room.PoiEntity;
|
||||||
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||||
@ -104,7 +105,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
private boolean isOration = true;
|
private boolean isOration = true;
|
||||||
private boolean isTerminus = false;
|
private boolean isTerminus = false;
|
||||||
private boolean isBack = true;
|
private boolean isBack = true;
|
||||||
private boolean isGPS = false;
|
|
||||||
private int type = 0;
|
private int type = 0;
|
||||||
private int radioPicture = 0;
|
private int radioPicture = 0;
|
||||||
private int videoIndex = -1;
|
private int videoIndex = -1;
|
||||||
@ -306,77 +306,42 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
File file = new File(finalVideoPath);
|
File file = new File(finalVideoPath);
|
||||||
initMarkerPaper();
|
initMarkerPaper();
|
||||||
result.toFile(file, new FileCallback() {
|
Runnable runnable = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void onFileReady(@Nullable File file) {
|
public void run() {
|
||||||
/*if (file.exists()) {
|
result.toFile(file, new FileCallback() {
|
||||||
initMarker();
|
@Override
|
||||||
videoIndex = Integer.parseInt(file.getName().replace(".jpg", ""));
|
public void onFileReady(@Nullable File file) {
|
||||||
finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".jpg";
|
if (file!=null&&file.exists()){
|
||||||
runOnUiThread(new Runnable() {
|
WebPNative webPNative = new WebPNative();
|
||||||
@SuppressLint("SetTextI18n")
|
Bitmap bitmap = BitmapFactory.decodeFile(file.getAbsolutePath());
|
||||||
@Override
|
webPNative.encodeRGBA(bitmap, file.getPath(), 90);
|
||||||
public void run() {
|
runOnUiThread(new Runnable() {
|
||||||
tvTitle.setText("保存成功:" + (videoIndex + 1));
|
@SuppressLint("SetTextI18n")
|
||||||
}
|
@Override
|
||||||
});
|
public void run() {
|
||||||
}
|
if (file.exists()) {
|
||||||
if (radioPicture == 1) {
|
initMarker();
|
||||||
Message message = new Message();
|
videoIndex = Integer.parseInt(file.getName().replace(".webp", ""));
|
||||||
message.what = 0x103;
|
finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".webp";
|
||||||
handler.sendMessage(message);
|
tvTitle.setText("保存成功:" + (videoIndex + 1));
|
||||||
}*/
|
}
|
||||||
if (file.exists() && file != null) {
|
if (radioPicture == 1) {
|
||||||
WebPNative webPNative = new WebPNative();
|
Message message = new Message();
|
||||||
new Thread(new Runnable() {
|
message.what = 0x103;
|
||||||
@Override
|
handler.sendMessage(message);
|
||||||
public void run() {
|
|
||||||
try {
|
|
||||||
Bitmap bitmap = BitmapFactory.decodeFile(file.getAbsolutePath());
|
|
||||||
webPNative.encodeRGBA(bitmap, file.getPath(), 90);
|
|
||||||
runOnUiThread(new Runnable() {
|
|
||||||
@SuppressLint("SetTextI18n")
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if (file.exists()) {
|
|
||||||
initMarker();
|
|
||||||
videoIndex = Integer.parseInt(file.getName().replace(".webp", ""));
|
|
||||||
finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".webp";
|
|
||||||
tvTitle.setText("保存成功:" + (videoIndex + 1));
|
|
||||||
}
|
|
||||||
if (radioPicture == 1) {
|
|
||||||
Message message = new Message();
|
|
||||||
message.what = 0x103;
|
|
||||||
handler.sendMessage(message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
if (!bitmap.isRecycled()) {
|
|
||||||
bitmap.recycle();
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
});
|
||||||
Log.d("output:", e.toString());
|
if (!bitmap.isRecycled()) {
|
||||||
|
bitmap.recycle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).start();
|
|
||||||
} else {
|
|
||||||
isBack = false;
|
|
||||||
if (isOration) {
|
|
||||||
stopTimer();
|
|
||||||
}
|
}
|
||||||
if (radioPicture != 1) {
|
});
|
||||||
capturePicture.setText("开始采集");
|
|
||||||
}
|
|
||||||
capturePicture.setChecked(false);
|
|
||||||
runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Toast.makeText(PicturesActivity.this, "源文件不存在", Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
UserApplication.fixedThreadPool.submit(runnable);
|
||||||
} else {
|
} else {
|
||||||
isBack = false;
|
isBack = false;
|
||||||
if (isOration) {
|
if (isOration) {
|
||||||
|
@ -39,19 +39,20 @@ public class CapacityEvaluationAdapter extends RecyclerView.Adapter<CapacityEval
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
holder.tvCapacity.setText(capacityList.get(position).getTitle());
|
TaskPrefectureBean.BodyBean.ListBean listBean = capacityList.get(position);
|
||||||
if (capacityList.get(position).getStatus()!=null){
|
holder.tvCapacity.setText(listBean.getTitle()+"");
|
||||||
holder.tvResults.setText((Integer) capacityList.get(position).getStatus());
|
if (listBean.getStatus()!=null){
|
||||||
|
holder.tvResults.setText(listBean.getStatus()+"");
|
||||||
}else {
|
}else {
|
||||||
holder.tvResults.setText("");
|
holder.tvResults.setText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
Glide.with(context).load(capacityList.get(position).getIconurl()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(holder.ivCapacity);
|
Glide.with(context).load(listBean.getIconurl()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(holder.ivCapacity);
|
||||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (onCapacityClick != null) {
|
if (onCapacityClick != null) {
|
||||||
onCapacityClick.onClick(capacityList.get(position).getId());
|
onCapacityClick.onClick(listBean.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -16,6 +16,8 @@ import com.umeng.commonsdk.UMConfigure;
|
|||||||
import com.umeng.umcrash.UMCrash;
|
import com.umeng.umcrash.UMCrash;
|
||||||
import com.umeng.umcrash.UMCrashCallback;
|
import com.umeng.umcrash.UMCrashCallback;
|
||||||
|
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
@ -24,6 +26,7 @@ import okhttp3.OkHttpClient;
|
|||||||
|
|
||||||
public class UserApplication extends Application {
|
public class UserApplication extends Application {
|
||||||
public static UserApplication userApplication;
|
public static UserApplication userApplication;
|
||||||
|
public static ExecutorService fixedThreadPool;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
@ -46,6 +49,7 @@ public class UserApplication extends Application {
|
|||||||
});
|
});
|
||||||
initOkGo();
|
initOkGo();
|
||||||
TalentLocationUtils.getInstance(this).startLocation(this);
|
TalentLocationUtils.getInstance(this).startLocation(this);
|
||||||
|
fixedThreadPool = Executors.newFixedThreadPool(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static UserApplication getUserApplication() {
|
public static UserApplication getUserApplication() {
|
||||||
|
@ -144,7 +144,10 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(MeasureBean response, int id) {
|
public void onSuccess(MeasureBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
|
String title = response.getBody().getTitle();
|
||||||
|
if (title!=null){
|
||||||
|
tvCapacity.setText(title);
|
||||||
|
}
|
||||||
//单选
|
//单选
|
||||||
if (response.getBody().getMultiChoice() != null) {
|
if (response.getBody().getMultiChoice() != null) {
|
||||||
List<MeasureBean.BodyBean.MultiChoiceBean> multiChoice = response.getBody().getMultiChoice();
|
List<MeasureBean.BodyBean.MultiChoiceBean> multiChoice = response.getBody().getMultiChoice();
|
||||||
@ -164,10 +167,10 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
if (baleen != null) {
|
if (baleen != null) {
|
||||||
if (baleen.size()>0){
|
if (baleen.size()>0){
|
||||||
capacityMeasureAdapter.setMeasureList(baleen);
|
capacityMeasureAdapter.setMeasureList(baleen);
|
||||||
}else {
|
}/*else {
|
||||||
btnSubmit.setVisibility(View.GONE);
|
btnSubmit.setVisibility(View.GONE);
|
||||||
tvCapacity.setVisibility(View.GONE);
|
tvCapacity.setVisibility(View.GONE);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,7 +223,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
}
|
}
|
||||||
initExamSubmit();
|
initExamSubmit();
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), "无数据", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "无数据,无法提交", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -256,6 +259,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", message+"", "确定").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", message+"", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -271,18 +271,6 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
break;
|
break;
|
||||||
case R.id.btn_gather://立即采集
|
case R.id.btn_gather://立即采集
|
||||||
gatherGetBuilder.append(TimestampUtil.time()).append(",").append("点击了立即采集的按钮 ,");
|
gatherGetBuilder.append(TimestampUtil.time()).append(",").append("点击了立即采集的按钮 ,");
|
||||||
//如果是领取的任务或者是新得任务就只能在当前用户位置方圆5000以内才可以使用
|
|
||||||
if (poiEntity.getType() == 3 || poiEntity.getType() == 4) {
|
|
||||||
//判断当前的信号强度
|
|
||||||
int gpsRssi = Constant.currentLocation.getGPSRssi();
|
|
||||||
if (gpsRssi == 0) {//无信号
|
|
||||||
Toast.makeText(getActivity(), "无信号,无法作业", Toast.LENGTH_SHORT).show();
|
|
||||||
return;
|
|
||||||
} else if (gpsRssi == 1) {//信号弱
|
|
||||||
Toast.makeText(getActivity(), "无信号,无法作业", Toast.LENGTH_SHORT).show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (poiEntity.getTaskStatus() < 2) {
|
if (poiEntity.getTaskStatus() < 2) {
|
||||||
double latitude = Constant.currentLocation.getLatitude();
|
double latitude = Constant.currentLocation.getLatitude();
|
||||||
double longitude = Constant.currentLocation.getLongitude();
|
double longitude = Constant.currentLocation.getLongitude();
|
||||||
|
@ -64,7 +64,7 @@ public class PreserveUtils {
|
|||||||
public void run() {
|
public void run() {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "道路:" + poiEntity.getName() + " 保存至服务成功";
|
obtain1.obj = "道路:" + poiEntity.getName() + " 保存本地成功";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -73,7 +73,7 @@ public class PreserveUtils {
|
|||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "道路:" + poiEntity.getName() + " 保存至服务失败";
|
obtain1.obj = "道路:" + poiEntity.getName() + " 保存本地失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
@ -81,7 +81,7 @@ public class PreserveUtils {
|
|||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "道路:" + poiEntity.getName() + "保存至服务失败";
|
obtain1.obj = "道路:" + poiEntity.getName() + "保存本地失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -90,7 +90,7 @@ public class PreserveUtils {
|
|||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "道路:" + poiEntity.getName() + " 保存至服务失败";
|
obtain1.obj = "道路:" + poiEntity.getName() + " 保存本地失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -118,7 +118,7 @@ public class PreserveUtils {
|
|||||||
public void run() {
|
public void run() {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存至服务成功";
|
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存本地成功";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -127,7 +127,7 @@ public class PreserveUtils {
|
|||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存至服务失败";
|
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存本地失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
@ -135,7 +135,7 @@ public class PreserveUtils {
|
|||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "Poi:" + poiEntity.getName() + "保存至服务失败";
|
obtain1.obj = "Poi:" + poiEntity.getName() + "保存本地失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ public class PreserveUtils {
|
|||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存至服务失败";
|
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存本地失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -173,7 +173,7 @@ public class PreserveUtils {
|
|||||||
public void run() {
|
public void run() {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存至服务成功";
|
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存本地成功";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -182,7 +182,7 @@ public class PreserveUtils {
|
|||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存至服务失败";
|
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存本地失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
@ -190,7 +190,7 @@ public class PreserveUtils {
|
|||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "Poi录像:" + poiEntity.getName() + "保存至服务失败";
|
obtain1.obj = "Poi录像:" + poiEntity.getName() + "保存本地失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ public class PreserveUtils {
|
|||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存至服务失败";
|
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存本地失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -228,7 +228,7 @@ public class PreserveUtils {
|
|||||||
public void run() {
|
public void run() {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "其他:" + poiEntity.getName() + " 保存至服务成功";
|
obtain1.obj = "其他:" + poiEntity.getName() + " 保存本地成功";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -237,7 +237,7 @@ public class PreserveUtils {
|
|||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "其他:" + poiEntity.getName() + " 保存至服务失败";
|
obtain1.obj = "其他:" + poiEntity.getName() + " 保存本地失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
@ -245,7 +245,7 @@ public class PreserveUtils {
|
|||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "其他:" + poiEntity.getName() + "保存至服务失败";
|
obtain1.obj = "其他:" + poiEntity.getName() + "保存本地失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ public class PreserveUtils {
|
|||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "其他:" + poiEntity.getName() + " 保存至服务失败";
|
obtain1.obj = "其他:" + poiEntity.getName() + " 保存本地失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -285,7 +285,7 @@ public class PreserveUtils {
|
|||||||
public void run() {
|
public void run() {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存至服务成功";
|
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存本地成功";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -294,7 +294,7 @@ public class PreserveUtils {
|
|||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存至服务失败";
|
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存本地失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
} else if (chargingStationBean.getCode() == 230) {
|
} else if (chargingStationBean.getCode() == 230) {
|
||||||
@ -302,7 +302,7 @@ public class PreserveUtils {
|
|||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存至服务失败";
|
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存本地失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -311,7 +311,7 @@ public class PreserveUtils {
|
|||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_REGISTER;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存至服务失败";
|
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存本地失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
Log.d("TAG", "onError: " + e.getMessage() + "");
|
Log.d("TAG", "onError: " + e.getMessage() + "");
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
android:id="@+id/tv_capacity_measurement"
|
android:id="@+id/tv_capacity_measurement"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="POI任务测试"
|
android:text="任务测试"
|
||||||
android:textColor="@color/colorGray"
|
android:textColor="@color/colorGray"
|
||||||
android:textSize="30sp"
|
android:textSize="30sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user