唐浩
2020-07-20 6521ab0f203b66b589e9990f090f04c16ea36320
app/src/main/java/com/okgoincar/slab/MySlabBaseActivity.java
@@ -28,6 +28,7 @@
import com.okgoincar.R;
import com.okgoincar.base.BaseEvent;
import com.okgoincar.base.MyApplication;
import com.okgoincar.slab.util.DialogUtil;
import com.github.zackratos.ultimatebar.UltimateBar;
import com.google.gson.Gson;
@@ -96,18 +97,18 @@
    Handler heartHandler;
    private void settest() {
//        tv_test.setVisibility(VISIBLE);
//        if (!MyApplication.Companion.getLocation().getAoiName().isEmpty()){
//            tv_test.setText(
//                    "定位位置:lat="+MyApplication.Companion.getLocation().getLatitude()+"  lng="+MyApplication.Companion.getLocation().getLongitude()
//                            + "  心跳数量()="+MyApplication.Companion.getTestHeartNunm()+"  收到的websocket数量="+MyApplication.Companion.getTestReceiveNum()
//                    +"  方向角="+MyApplication.Companion.getLocation().getBearing()+"  海拔"+MyApplication.Companion.getLocation().getAltitude()
//            );
//        }
//        if (heartHandler == null) {
//            heartHandler = new Handler(getMainLooper());
//        }
//        heartHandler.postDelayed(this::settest,1000);
        tv_test.setVisibility(VISIBLE);
        if (!MyApplication.Companion.getLocation().getAoiName().isEmpty()){
            tv_test.setText(
                    "定位位置:lat="+MyApplication.Companion.getLocation().getLatitude()+"  lng="+MyApplication.Companion.getLocation().getLongitude()
                            + "  心跳数量()="+MyApplication.Companion.getTestHeartNunm()+"  收到的websocket数量="+MyApplication.Companion.getTestReceiveNum()
                    +"  方向角="+MyApplication.Companion.getLocation().getBearing()+"  海拔"+MyApplication.Companion.getLocation().getAltitude()
            );
        }
        if (heartHandler == null) {
            heartHandler = new Handler(getMainLooper());
        }
        heartHandler.postDelayed(this::settest,2000);
    }
@@ -155,6 +156,24 @@
        startActivity(intent);
    }
    /***
     * type 1:普通单 2:该派单
     * @param orderId
     * @param orderType
     * @param time
     * @param type
     */
    public void showOrder(String orderId, String orderType,int time,int type) {
//        Bundle bundle = creatBundleString("orderId", orderId);
//        bundle.putString("orderType", orderType);
        Intent intent = new Intent(this,SlabGetOrderFragment.class);
        intent.putExtra("orderId",orderId);
        intent.putExtra("orderType",orderType);
        intent.putExtra("time",time);
        intent.putExtra("type",type);
        startActivity(intent);
    }
    @Override