Commit 72c0aa40 by 霍志良

feat:组件升级

parent 426d3ddf
......@@ -14,7 +14,7 @@ ext {
"m-dynamic" : "0.0.7.74",
"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-course" : "0.0.43.39",
......@@ -103,7 +103,7 @@ ext {
"m-dynamic" : "0.0.7.74",
"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-course" : "0.0.43.39",
//-------------- 业务模块 API 层 --------------
......@@ -122,11 +122,11 @@ ext {
//mdt组件
"ydl-tuicore" : "0.0.23",
//第一步
"ydl-platform" : "0.0.41.22",
"ydl-platform" : "0.0.41.32",
//第二步 若干
"ydl-webview" : "0.0.38.80",
"ydl-media" : "0.0.21.45",
"ydl-webview" : "0.0.38.92",
"ydl-media" : "0.0.21.52",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.30.12",
"ydl-flutter-base": "0.0.14.38",
......
......@@ -81,6 +81,14 @@ class MeditationWindowService : Service() {
override fun onCreate() {
super.onCreate()
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() {
......@@ -309,19 +317,13 @@ class MeditationWindowService : Service() {
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){
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)
startForegroundService(intent)
}else{
startService(intent)
}
}
// 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)
// }
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