Commit 96033667 by 霍志良

Merge branch 'fix/zl_fixbug' into 'release'

MeditationWindowService修改、组件升级

See merge request app_android_lib/YDL-Component!130
parents 4981bbee 72c0aa40
......@@ -5,21 +5,16 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-user" : "0.0.62.36",
"m-home" : "0.0.23.89",
"m-confide" : "0.0.50.15",
"m-confide" : "0.0.50.16",
"m-consultant" : "0.0.60.27",
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.26",
"m-home" : "0.0.23.79",
"m-im" : "0.0.21.51",
"m-dynamic" : "0.0.7.74",
"m-article" : "0.0.0.10",
"m-muse" : "0.0.28.73",
"m-muse" : "0.0.28.75",
"m-tests" : "0.0.24.18",
"m-course" : "0.0.43.39",
......@@ -49,7 +44,7 @@ ext {
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.30.11",
"ydl-flutter-base": "0.0.14.38",
......@@ -99,25 +94,16 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-user" : "0.0.62.36",
"m-home" : "0.0.23.89",
"m-confide" : "0.0.50.15",
"m-confide" : "0.0.50.16",
"m-consultant" : "0.0.60.27",
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.26",
"m-home" : "0.0.23.79",
"m-im" : "0.0.21.51",
"m-dynamic" : "0.0.7.74",
"m-article" : "0.0.0.8",
"m-muse" : "0.0.28.73",
"m-muse" : "0.0.28.75",
"m-tests" : "0.0.24.18",
"m-course" : "0.0.43.39",
//-------------- 业务模块 API 层 --------------
......@@ -136,19 +122,13 @@ ext {
//mdt组件
"ydl-tuicore" : "0.0.23",
//第一步
"ydl-platform" : "0.0.41.32",
//第二步 若干
"ydl-webview" : "0.0.38.92",
"ydl-media" : "0.0.21.52",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.30.11",
"m-audioim" : "0.0.49.30.12",
"ydl-flutter-base": "0.0.14.38",
//以下 几乎不会动
......
......@@ -14,6 +14,7 @@
android:layout_marginRight="@dimen/platform_dp_15"
android:background="@drawable/audioim_border_white_kefu"
android:gravity="center_vertical"
android:visibility="gone"
android:orientation="horizontal">
<ImageView
......
......@@ -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