开始直播功能开发

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2022-02-24 18:42:25 +08:00
parent b9347a2fb5
commit 26b1982c51
6 changed files with 94 additions and 11 deletions

View File

@@ -0,0 +1,53 @@
package com.mogo.eagle.core.function.carcorder.service
import android.content.Intent
import android.os.IBinder
import android.util.Log
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.serenegiant.usb.common.BaseService
/**
* 行车记录仪服务
* @author donghongyu
*/
class LivePushService : BaseService() {
private val DEBUG = true
val TAG = LivePushService::class.java.name
override fun onCreate() {
super.onCreate()
if (DEBUG) {
Logger.d(TAG, "onCreate……")
}
}
override fun onDestroy() {
super.onDestroy()
if (DEBUG) Log.d(TAG, "onDestroy:")
}
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
return super.onStartCommand(intent, flags, startId)
}
override fun onBind(intent: Intent): IBinder? {
return null
}
override fun onRebind(intent: Intent) {
if (DEBUG) Log.d(TAG, "onRebind:$intent")
}
override fun onUnbind(intent: Intent): Boolean {
if (DEBUG) Log.d(TAG, "onUnbind:$intent")
if (DEBUG) Log.d(TAG, "onUnbind:finished")
return true
}
}