liugl
2021-01-14 40f9ac00ec5e4d6363450d1c8e0b0937cc0b1de4
app/src/main/java/com/okgoincar/base/MyApplication.kt
@@ -29,6 +29,7 @@
import com.okgoincar.netUtls.getUserId
import com.okgoincar.slab.MySlabBaseActivity
import com.okgoincar.utils.Cache.CacheKey
import com.tencent.bugly.crashreport.CrashReport
import org.jetbrains.anko.toast
import org.json.JSONObject
import java.security.SecureRandom
@@ -69,14 +70,14 @@
//        PlatformConfig.setWeixin("wx65d2c03f04352f90", "7a3a57f9ba78c1f400b75298eec4c7c0")
//        PlatformConfig.setQQZone("101877032", "eab94b262bf9789eec770cde42a6e71e") //qq互联
//        LogUtils.OpenLog(true)
        CrashReport.initCrashReport(applicationContext, "666d35fada", false)
        initUpPoint()
        initSocket()
    }
    private fun initSocket() {
        Handler(Looper.getMainLooper()).post {
            toast("websocket初始化")
//            toast("websocket初始化")
        }
        NettyClient.getInstance().init(this, Api.SOCKET_SERVER, Api.SOCKET_PORT, true)
        NettyClient.getInstance()
@@ -262,9 +263,9 @@
            bean.data = dataBean
            NettyClient.getInstance()
                .sendMessage(Gson().toJson(bean))
//            Handler(Looper.getMainLooper()).post {
            Handler(Looper.getMainLooper()).post {
//                toast("发送location --> $dataBean")
//            }
            }
            sysErr(dataBean.toString())
        }
    }