Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
Easy Cleaner Junk
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
Easy Cleaner Junk
Commits
ba7e992f
Commit
ba7e992f
authored
Oct 09, 2024
by
guest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改服务的bug
parent
25a29882
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+1
-1
PermanentNotificationService.kt
...y/easycleanerjunk/service/PermanentNotificationService.kt
+1
-1
No files found.
app/src/main/AndroidManifest.xml
View file @
ba7e992f
...
@@ -214,7 +214,7 @@
...
@@ -214,7 +214,7 @@
android:value=
"@string/facebook_app_id"
/>
android:value=
"@string/facebook_app_id"
/>
<service
<service
android:name=
".service.PermanentNotificationService"
android:name=
".service.PermanentNotificationService"
android:
permission=
"android.permission.FOREGROUND_SERVICE
"
/>
android:
foregroundServiceType=
"dataSync
"
/>
</application>
</application>
</manifest>
</manifest>
\ No newline at end of file
app/src/main/java/com/test/easy/easycleanerjunk/service/PermanentNotificationService.kt
View file @
ba7e992f
...
@@ -130,7 +130,7 @@ class PermanentNotificationService : Service() {
...
@@ -130,7 +130,7 @@ class PermanentNotificationService : Service() {
builder
.
setSmallIcon
(
R
.
drawable
.
easycleanjunk_noticeicon
)
//设置状态栏内的小图标
builder
.
setSmallIcon
(
R
.
drawable
.
easycleanjunk_noticeicon
)
//设置状态栏内的小图标
builder
.
setVisibility
(
NotificationCompat
.
VISIBILITY_PRIVATE
)
//设置通知公开可见
builder
.
setVisibility
(
NotificationCompat
.
VISIBILITY_PRIVATE
)
//设置通知公开可见
builder
.
setAutoCancel
(
false
)
builder
.
setAutoCancel
(
false
)
builder
.
setPriority
(
NotificationCompat
.
PRIORITY_MAX
)
//优先级为:重要通知
builder
.
priority
=
NotificationCompat
.
PRIORITY_MAX
//优先级为:重要通知
builder
.
setWhen
(
System
.
currentTimeMillis
())
builder
.
setWhen
(
System
.
currentTimeMillis
())
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
)
{
...
...
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