Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
A
appzxhy
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
appzxhy
Commits
453a163e
Commit
453a163e
authored
Jan 08, 2025
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...前台不推送限制
parent
9d19c889
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
PopupConfigBean.kt
...main/java/com/base/appzxhy/bean/config/PopupConfigBean.kt
+1
-0
MyNotificationManager.kt
...om/base/appzxhy/fcm/notification/MyNotificationManager.kt
+7
-1
No files found.
app/src/main/java/com/base/appzxhy/bean/config/PopupConfigBean.kt
View file @
453a163e
...
@@ -2,6 +2,7 @@ package com.base.appzxhy.bean.config
...
@@ -2,6 +2,7 @@ package com.base.appzxhy.bean.config
class
PopupConfigBean
(
class
PopupConfigBean
(
var
popupForegroundCanPush
:
Boolean
=
false
,
var
popupStatus
:
Boolean
=
true
,
var
popupStatus
:
Boolean
=
true
,
var
popupCount
:
Int
=
24
,
var
popupCount
:
Int
=
24
,
var
popupStart
:
Int
=
0
,
var
popupStart
:
Int
=
0
,
...
...
app/src/main/java/com/base/appzxhy/fcm/notification/MyNotificationManager.kt
View file @
453a163e
...
@@ -2,6 +2,7 @@ package com.base.appzxhy.fcm.notification
...
@@ -2,6 +2,7 @@ package com.base.appzxhy.fcm.notification
import
android.content.Context
import
android.content.Context
import
com.base.appzxhy.BuildConfig
import
com.base.appzxhy.BuildConfig
import
com.base.appzxhy.MyApplication
import
com.base.appzxhy.bean.NotificationSendBean
import
com.base.appzxhy.bean.NotificationSendBean
import
com.base.appzxhy.bean.NotificationSendBean.Companion.ACTION_ID_SCAN
import
com.base.appzxhy.bean.NotificationSendBean.Companion.ACTION_ID_SCAN
import
com.base.appzxhy.bean.NotificationSendBean.Companion.POPUP_WHERE_TIMER
import
com.base.appzxhy.bean.NotificationSendBean.Companion.POPUP_WHERE_TIMER
...
@@ -65,10 +66,15 @@ object MyNotificationManager {
...
@@ -65,10 +66,15 @@ object MyNotificationManager {
EventUtils
.
event
(
"Notification_Popup_Start"
,
"where=${bean.where}"
)
EventUtils
.
event
(
"Notification_Popup_Start"
,
"where=${bean.where}"
)
if
(!
isUnLimit
)
{
if
(!
isUnLimit
)
{
//应用在前台不推
if
(
MyApplication
.
PAUSED_VALUE
==
1
&&
!
popupConfigBean
.
popupForegroundCanPush
)
{
LogEx
.
logDebug
(
TAG
,
"app Foreground"
)
continue
}
//总的限制条件
//总的限制条件
if
(!
canSendNotification
(
bean
.
context
))
continue
if
(!
canSendNotification
(
bean
.
context
))
continue
//
当
条推送是否可以推送
//
其他
条推送是否可以推送
if
(!
bean
.
canSend
.
invoke
())
continue
if
(!
bean
.
canSend
.
invoke
())
continue
}
}
...
...
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