Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
location share 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
location share white
Commits
68fa5605
Commit
68fa5605
authored
Dec 12, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
14e13d80
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
NotificationUiUtil.kt
...ava/com/base/locationsharewhite/fcm/NotificationUiUtil.kt
+1
-1
AlarmUtils.kt
.../java/com/base/locationsharewhite/fcm/alarm/AlarmUtils.kt
+4
-2
MyApplication.kt
.../java/com/base/locationsharewhite/helper/MyApplication.kt
+3
-1
No files found.
app/src/main/java/com/base/locationsharewhite/fcm/NotificationUiUtil.kt
View file @
68fa5605
...
...
@@ -122,7 +122,7 @@ object NotificationUiUtil {
var
hoverActionId
=
""
private
var
isUnLimit
:
Boolean
=
if
(
BuildConfig
.
DEBUG
)
tru
e
else
false
private
var
isUnLimit
:
Boolean
=
if
(
BuildConfig
.
DEBUG
)
fals
e
else
false
@SuppressLint
(
"RemoteViewLayout"
)
fun
sendNotificationIfCan
(
context
:
Context
,
where
:
String
=
""
,
id
:
String
?
=
null
)
{
...
...
app/src/main/java/com/base/locationsharewhite/fcm/alarm/AlarmUtils.kt
View file @
68fa5605
...
...
@@ -12,7 +12,7 @@ import java.util.Calendar
object
AlarmUtils
{
fun
startAlarm
(
context
:
Context
)
{
fun
startAlarm
(
context
:
Context
,
hour
:
Int
)
{
context
.
startJob
()
//闹钟定时任务
val
alarmManager
=
context
.
getSystemService
(
JobService
.
ALARM_SERVICE
)
as
AlarmManager
...
...
@@ -24,7 +24,9 @@ object AlarmUtils {
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
6
)
calendar
.
set
(
Calendar
.
MINUTE
,
0
)
calendar
.
set
(
Calendar
.
SECOND
,
0
)
var
delay
=
30
*
60
*
1000L
val
oneHour
=
60
*
60
*
1000L
var
delay
=
oneHour
*
hour
if
(
BuildConfig
.
DEBUG
)
{
delay
=
1
*
60
*
1000L
}
...
...
app/src/main/java/com/base/locationsharewhite/helper/MyApplication.kt
View file @
68fa5605
...
...
@@ -114,7 +114,9 @@ class MyApplication : Application() {
BatteryStatusReceiver
.
registerBatteryStatusReceiver
(
this
)
startJob
()
startAlarm
(
appContext
)
startAlarm
(
appContext
,
24
)
startAlarm
(
appContext
,
48
)
startAlarm
(
appContext
,
72
)
}
...
...
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