唐浩
2020-08-15 20aaa2104d4a6c914ade6346d9da94ae1bd5737e
commit 8.15
2个文件已修改
8 ■■■■ 已修改文件
app/build.gradle 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/okgoincar/base/MyApplication.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/build.gradle
@@ -25,8 +25,8 @@
        applicationId "com.okgoincar"
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 17
        versionName "17"
        versionCode 18
        versionName "18"
        multiDexEnabled true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        ndk {
app/src/main/java/com/okgoincar/base/MyApplication.kt
@@ -75,7 +75,7 @@
    private fun initSocket() {
        Handler(Looper.getMainLooper()).post {
            toast("websocket初始化")
//            toast("websocket初始化")
        }
        NettyClient.getInstance().init(this, Api.SOCKET_SERVER, Api.SOCKET_PORT, true)
        NettyClient.getInstance()
@@ -87,7 +87,7 @@
                    val json = JSONObject(message)
                    val method = json.optString("method")
                    Handler(Looper.getMainLooper()).post {
                        toast("收到websocket=$method")
//                        toast("收到websocket=$method")
                    }
                    val data = json.optString("data")
                    val code = json.optInt("code", -1)