Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
72c0aa40
Commit
72c0aa40
authored
Jun 02, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:组件升级
parent
426d3ddf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
18 deletions
+20
-18
config.gradle
config.gradle
+5
-5
MeditationWindowService.kt
m-muse/src/main/java/com/yidianling/muse/service/MeditationWindowService.kt
+15
-13
No files found.
config.gradle
View file @
72c0aa40
...
...
@@ -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.
2
2"
,
"ydl-platform"
:
"0.0.41.
3
2"
,
//第二步 若干
"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"
,
...
...
m-muse/src/main/java/com/yidianling/muse/service/MeditationWindowService.kt
View file @
72c0aa40
...
...
@@ -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
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment