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
ce595e72
Commit
ce595e72
authored
Jul 09, 2024
by
leichao.gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update event
parent
1c9fa84c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
FcmService.java
...in/java/com/test/easy/easycleanerjunk/fcm/FcmService.java
+3
-1
NotificationUtil.java
...a/com/test/easy/easycleanerjunk/fcm/NotificationUtil.java
+4
-2
No files found.
app/src/main/java/com/test/easy/easycleanerjunk/fcm/FcmService.java
View file @
ce595e72
...
@@ -7,6 +7,7 @@ import androidx.annotation.NonNull;
...
@@ -7,6 +7,7 @@ import androidx.annotation.NonNull;
import
com.google.firebase.messaging.FirebaseMessagingService
;
import
com.google.firebase.messaging.FirebaseMessagingService
;
import
com.google.firebase.messaging.RemoteMessage
;
import
com.google.firebase.messaging.RemoteMessage
;
import
com.test.easy.easycleanerjunk.MyApplication
;
import
com.test.easy.easycleanerjunk.MyApplication
;
import
com.test.easy.easycleanerjunk.helps.EventUtils
;
import
com.test.easy.easycleanerjunk.helps.ads.AdDisplayUtils
;
import
com.test.easy.easycleanerjunk.helps.ads.AdDisplayUtils
;
import
com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
;
import
com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
;
import
com.test.easy.easycleanerjunk.utils.SPUtils
;
import
com.test.easy.easycleanerjunk.utils.SPUtils
;
...
@@ -18,7 +19,7 @@ public class FcmService extends FirebaseMessagingService {
...
@@ -18,7 +19,7 @@ public class FcmService extends FirebaseMessagingService {
long
pushStayTime
=
remoteMessage
.
getData
().
get
(
"push_stay_time"
)
!=
null
?
Long
.
parseLong
(
remoteMessage
.
getData
().
get
(
"push_stay_time"
))
:
0
;
long
pushStayTime
=
remoteMessage
.
getData
().
get
(
"push_stay_time"
)
!=
null
?
Long
.
parseLong
(
remoteMessage
.
getData
().
get
(
"push_stay_time"
))
:
0
;
int
open
=
remoteMessage
.
getData
().
get
(
"open"
)
!=
null
?
Integer
.
parseInt
(
remoteMessage
.
getData
().
get
(
"open"
))
:
0
;
int
open
=
remoteMessage
.
getData
().
get
(
"open"
)
!=
null
?
Integer
.
parseInt
(
remoteMessage
.
getData
().
get
(
"open"
))
:
0
;
int
num
=
remoteMessage
.
getData
().
get
(
"num"
)
!=
null
?
Integer
.
parseInt
(
remoteMessage
.
getData
().
get
(
"num"
))
:
0
;
int
num
=
remoteMessage
.
getData
().
get
(
"num"
)
!=
null
?
Integer
.
parseInt
(
remoteMessage
.
getData
().
get
(
"num"
))
:
0
;
long
delay
=
remoteMessage
.
getData
().
get
(
"delay"
)
!=
null
?
Long
.
parseLong
(
remoteMessage
.
getData
().
get
(
"delay"
))
:
0
;
long
delay
=
remoteMessage
.
getData
().
get
(
"delay"
)
!=
null
?
Long
.
parseLong
(
remoteMessage
.
getData
().
get
(
"delay"
))
:
0
L
;
int
actionS
=
remoteMessage
.
getData
().
get
(
"actionS"
)
!=
null
?
Integer
.
parseInt
(
remoteMessage
.
getData
().
get
(
"actionS"
))
:
0
;
int
actionS
=
remoteMessage
.
getData
().
get
(
"actionS"
)
!=
null
?
Integer
.
parseInt
(
remoteMessage
.
getData
().
get
(
"actionS"
))
:
0
;
int
lockS
=
remoteMessage
.
getData
().
get
(
"lockS"
)
!=
null
?
Integer
.
parseInt
(
remoteMessage
.
getData
().
get
(
"lockS"
))
:
0
;
int
lockS
=
remoteMessage
.
getData
().
get
(
"lockS"
)
!=
null
?
Integer
.
parseInt
(
remoteMessage
.
getData
().
get
(
"lockS"
))
:
0
;
int
adClickCount
=
remoteMessage
.
getData
().
get
(
"adClickCount"
)
!=
null
?
Integer
.
parseInt
(
remoteMessage
.
getData
().
get
(
"adClickCount"
))
:
0
;
int
adClickCount
=
remoteMessage
.
getData
().
get
(
"adClickCount"
)
!=
null
?
Integer
.
parseInt
(
remoteMessage
.
getData
().
get
(
"adClickCount"
))
:
0
;
...
@@ -51,6 +52,7 @@ public class FcmService extends FirebaseMessagingService {
...
@@ -51,6 +52,7 @@ public class FcmService extends FirebaseMessagingService {
AdDisplayUtils
.
getInstance
().
setMaxAdDisplayCount
(
adShowCount
);
AdDisplayUtils
.
getInstance
().
setMaxAdDisplayCount
(
adShowCount
);
AdDisplayUtils
.
getInstance
().
setMaxAdClickCount
(
adClickCount
);
AdDisplayUtils
.
getInstance
().
setMaxAdClickCount
(
adClickCount
);
EventUtils
.
INSTANCE
.
event
(
"FCM_Received"
,
null
,
null
,
false
);
NotificationUtil
.
sendNotification
(
MyApplication
.
context
);
NotificationUtil
.
sendNotification
(
MyApplication
.
context
);
...
...
app/src/main/java/com/test/easy/easycleanerjunk/fcm/NotificationUtil.java
View file @
ce595e72
...
@@ -17,6 +17,7 @@ import com.test.easy.easycleanerjunk.MyApplication;
...
@@ -17,6 +17,7 @@ import com.test.easy.easycleanerjunk.MyApplication;
import
com.test.easy.easycleanerjunk.R
;
import
com.test.easy.easycleanerjunk.R
;
import
com.test.easy.easycleanerjunk.activity.splash.NewSplashActivity
;
import
com.test.easy.easycleanerjunk.activity.splash.NewSplashActivity
;
import
com.test.easy.easycleanerjunk.bean.NotificationBean
;
import
com.test.easy.easycleanerjunk.bean.NotificationBean
;
import
com.test.easy.easycleanerjunk.helps.EventUtils
;
import
com.test.easy.easycleanerjunk.utils.SPUtils
;
import
com.test.easy.easycleanerjunk.utils.SPUtils
;
import
java.util.Random
;
import
java.util.Random
;
...
@@ -83,6 +84,7 @@ public class NotificationUtil {
...
@@ -83,6 +84,7 @@ public class NotificationUtil {
public
static
void
sendNotification
(
Context
context
)
{
public
static
void
sendNotification
(
Context
context
)
{
int
actionId
=
getNextNotificationId
();
int
actionId
=
getNextNotificationId
();
EventUtils
.
INSTANCE
.
event
(
"showNotification"
,
null
,
null
,
false
);
if
(
MyApplication
.
PAUSED_VALUE
==
1
)
{
if
(
MyApplication
.
PAUSED_VALUE
==
1
)
{
return
;
return
;
...
@@ -99,10 +101,10 @@ public class NotificationUtil {
...
@@ -99,10 +101,10 @@ public class NotificationUtil {
sendNotification
(
context
,
actionId
);
sendNotification
(
context
,
actionId
);
int
open
=
SPUtils
.
getInstance
().
getInt
(
"open"
,
0
);
int
open
=
SPUtils
.
getInstance
().
getInt
(
"open"
,
0
);
int
num
=
SPUtils
.
getInstance
().
getInt
(
"num"
,
0
);
long
delay
=
SPUtils
.
getInstance
().
getLong
(
"delay"
,
0
);
if
(
open
==
1
)
{
if
(
open
==
1
)
{
int
num
=
SPUtils
.
getInstance
().
getInt
(
"num"
,
0
);
long
delay
=
SPUtils
.
getInstance
().
getLong
(
"delay"
,
0
);
handlerThread
=
new
HandlerThread
(
"NotificationHandlerThread"
);
handlerThread
=
new
HandlerThread
(
"NotificationHandlerThread"
);
handlerThread
.
start
();
handlerThread
.
start
();
...
...
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