Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
B
Browser White
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
Browser White
Commits
8e8a159f
Commit
8e8a159f
authored
Sep 05, 2024
by
leichao.gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
默认样式
parent
f0f68226
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
NotificationUiUtil.kt
...main/java/com/base/browserwhite/fcm/NotificationUiUtil.kt
+10
-9
No files found.
app/src/main/java/com/base/browserwhite/fcm/NotificationUiUtil.kt
View file @
8e8a159f
...
@@ -247,17 +247,18 @@ object NotificationUiUtil {
...
@@ -247,17 +247,18 @@ object NotificationUiUtil {
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
S
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
S
)
{
small
=
smallRemoteViews
small
=
smallRemoteViews
}
}
builder
.
setContent
(
small
)
// 设置小视图
builder
.
setCustomHeadsUpContentView
(
small
)
builder
.
setCustomContentView
(
smallRemoteViews
)
builder
.
setCustomContentView
(
small
)
// 设置悬浮通知视图(Android 12 及以上)
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
S
)
{
builder
.
setCustomHeadsUpContentView
(
bigRemoteViews
)
}
// 设置大视图
builder
.
setCustomBigContentView
(
bigRemoteViews
)
builder
.
setCustomBigContentView
(
bigRemoteViews
)
// Show the notification
// if (AppPreferences.getInstance().getString("actionS", "1").toInt() == 1) {
// notificationManager.notify(intent.getIntExtra("actionId", actionId), builder.build())
// } else {
// notificationManager.notify(actionId, builder.build())
// }
notificationManager
.
notify
(
actionId
,
builder
.
build
())
notificationManager
.
notify
(
actionId
,
builder
.
build
())
AppPreferences
.
getInstance
().
put
(
"last_notification_time"
,
System
.
currentTimeMillis
())
AppPreferences
.
getInstance
().
put
(
"last_notification_time"
,
System
.
currentTimeMillis
())
if
(
actionId
==
ID_JUNK_CLEANER
)
{
if
(
actionId
==
ID_JUNK_CLEANER
)
{
...
...
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