| | |
| | | import android.app.Activity |
| | | import android.app.Application |
| | | import android.content.Context |
| | | import android.content.IntentFilter |
| | | import android.os.Bundle |
| | | import android.os.Handler |
| | | import android.os.Looper |
| | |
| | | LogUtils.OpenLog(true) |
| | | CrashReport.initCrashReport(applicationContext, "666d35fada", false) |
| | | initSocket() |
| | | registerBusinessBroadcastReceiver() |
| | | } |
| | | |
| | | private fun initSocket() { |
| | |
| | | activities.add(activity) |
| | | } |
| | | |
| | | |
| | | //注册业务广播 |
| | | private fun registerBusinessBroadcastReceiver() { |
| | | registerReceiver(MainBroadCastReceiver(), IntentFilter().apply { |
| | | addAction("wisdom.intent.action.driverInfo")//司机信息 |
| | | addAction("wisdom.intent.action.topLight")//顶灯 |
| | | }) |
| | | registerReceiver(MoneyBroadCastReceiver(), IntentFilter().apply { |
| | | addAction("wisdom.intent.action.ledLight")//空重车状态 |
| | | addAction("wisdom.intent.action.priceDevice")//计价器 |
| | | addAction("android.net.conn.CONNECTIVITY_CHANGE") |
| | | addAction("android.net.conn.CONNECTIVITY_SUCCESS") |
| | | addAction("android.net.conn.CONNECTIVITY_FAILURE") |
| | | }) |
| | | } |
| | | } |