Commit 72c0aa40 by 霍志良

feat:组件升级

parent 426d3ddf
...@@ -14,7 +14,7 @@ ext { ...@@ -14,7 +14,7 @@ ext {
"m-dynamic" : "0.0.7.74", "m-dynamic" : "0.0.7.74",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
"m-muse" : "0.0.28.28", "m-muse" : "0.0.28.75",
"m-tests" : "0.0.24.18", "m-tests" : "0.0.24.18",
"m-course" : "0.0.43.39", "m-course" : "0.0.43.39",
...@@ -103,7 +103,7 @@ ext { ...@@ -103,7 +103,7 @@ ext {
"m-dynamic" : "0.0.7.74", "m-dynamic" : "0.0.7.74",
"m-article" : "0.0.0.8", "m-article" : "0.0.0.8",
"m-muse" : "0.0.28.28", "m-muse" : "0.0.28.75",
"m-tests" : "0.0.24.18", "m-tests" : "0.0.24.18",
"m-course" : "0.0.43.39", "m-course" : "0.0.43.39",
//-------------- 业务模块 API 层 -------------- //-------------- 业务模块 API 层 --------------
...@@ -122,11 +122,11 @@ ext { ...@@ -122,11 +122,11 @@ ext {
//mdt组件 //mdt组件
"ydl-tuicore" : "0.0.23", "ydl-tuicore" : "0.0.23",
//第一步 //第一步
"ydl-platform" : "0.0.41.22", "ydl-platform" : "0.0.41.32",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.80", "ydl-webview" : "0.0.38.92",
"ydl-media" : "0.0.21.45", "ydl-media" : "0.0.21.52",
"ydl-pay" : "0.0.18.19", "ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.30.12", "m-audioim" : "0.0.49.30.12",
"ydl-flutter-base": "0.0.14.38", "ydl-flutter-base": "0.0.14.38",
......
...@@ -81,6 +81,14 @@ class MeditationWindowService : Service() { ...@@ -81,6 +81,14 @@ class MeditationWindowService : Service() {
override fun onCreate() { override fun onCreate() {
super.onCreate() super.onCreate()
EventBus.getDefault().register(this) EventBus.getDefault().register(this)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val manager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
val channel = NotificationChannel("壹点灵", "play", NotificationManager.IMPORTANCE_HIGH)
manager.createNotificationChannel(channel)
val notification = NotificationCompat.Builder(this, "壹点灵").build()
startForeground(1, notification)
}
} }
private fun showWindow() { private fun showWindow() {
...@@ -309,19 +317,13 @@ class MeditationWindowService : Service() { ...@@ -309,19 +317,13 @@ class MeditationWindowService : Service() {
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) { // if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (Build.VERSION.SDK_INT>=Build.VERSION_CODES.O){ // val manager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
val manager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager // val channel = NotificationChannel("壹点灵", "play", NotificationManager.IMPORTANCE_HIGH)
val channel = NotificationChannel("壹点灵","play",NotificationManager.IMPORTANCE_HIGH) // manager.createNotificationChannel(channel)
manager.createNotificationChannel(channel) // val notification = NotificationCompat.Builder(this, "壹点灵").build()
val notification = NotificationCompat.Builder(this,"壹点灵").build() // startForeground(1, notification)
startForeground(1,notification) // }
startForegroundService(intent)
}else{
startService(intent)
}
}
return super.onStartCommand(intent, flags, startId) return super.onStartCommand(intent, flags, startId)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment