Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Simple-Sms
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangchengbo
Simple-Sms
Commits
92fb59f3
Commit
92fb59f3
authored
Sep 02, 2025
by
zhangchengbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:优化通知栏消息推送执行时序
parent
870f58e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
SmsReceiver.kt
...src/main/kotlin/com/secspace/sms/receivers/SmsReceiver.kt
+6
-6
No files found.
app/src/main/kotlin/com/secspace/sms/receivers/SmsReceiver.kt
View file @
92fb59f3
...
@@ -69,23 +69,23 @@ class SmsReceiver : BroadcastReceiver() {
...
@@ -69,23 +69,23 @@ class SmsReceiver : BroadcastReceiver() {
}
}
if
(
address
.
isNotEmpty
())
{
if
(
address
.
isNotEmpty
())
{
findConversationWithPhoneNumber
(
context
,
address
,
body
,
threadId
)
{
findConversationWithPhoneNumber
(
context
,
address
,
body
,
threadId
)
{
phoneNumberResult
->
if
(
context
.
baseConfig
.
blockUnknownNumbers
)
{
if
(
context
.
baseConfig
.
blockUnknownNumbers
)
{
val
simpleContactsHelper
=
SimpleContactsHelper
(
context
)
val
simpleContactsHelper
=
SimpleContactsHelper
(
context
)
simpleContactsHelper
.
exists
(
address
,
privateCursor
)
{
exists
->
simpleContactsHelper
.
exists
(
address
,
privateCursor
)
{
exists
->
if
(
exists
)
{
if
(
exists
)
{
handleMessage
(
context
,
address
,
subject
,
body
,
date
,
read
,
threadId
,
type
,
subscriptionId
,
status
,
i
t
)
{
handleMessage
(
context
,
address
,
subject
,
body
,
date
,
read
,
threadId
,
type
,
subscriptionId
,
status
,
phoneNumberResul
t
)
{
badgeTotalNumber
(
context
)
badgeTotalNumber
(
context
)
sendNotification
(
phoneNumberResult
,
body
)
}
}
}
}
}
}
}
else
{
}
else
{
handleMessage
(
context
,
address
,
subject
,
body
,
date
,
read
,
threadId
,
type
,
subscriptionId
,
status
,
i
t
)
{
handleMessage
(
context
,
address
,
subject
,
body
,
date
,
read
,
threadId
,
type
,
subscriptionId
,
status
,
phoneNumberResul
t
)
{
badgeTotalNumber
(
context
)
badgeTotalNumber
(
context
)
sendNotification
(
phoneNumberResult
,
body
)
}
}
}
}
// android.util.Log.d(TAG, "onReceive: 短信手机号 = $it 短信内容 = $body")
sendNotification
(
it
,
body
)
}
}
}
}
}
}
...
@@ -234,7 +234,7 @@ class SmsReceiver : BroadcastReceiver() {
...
@@ -234,7 +234,7 @@ class SmsReceiver : BroadcastReceiver() {
subscriptionId
subscriptionId
)
)
}*/
}*/
// Log.d(TAG, "----SmsReceiver----handleMessage message:${GsonUtil.parseBeanToJson(message)}
")
Log
.
d
(
TAG
,
"----SmsReceiver----handleMessage 消息插入成功
"
)
context
.
messagesDB
.
insertOrUpdate
(
message
)
context
.
messagesDB
.
insertOrUpdate
(
message
)
if
(
context
.
config
.
isArchiveAvailable
)
{
if
(
context
.
config
.
isArchiveAvailable
)
{
context
.
updateConversationArchivedStatus
(
threadId
,
false
)
context
.
updateConversationArchivedStatus
(
threadId
,
false
)
...
...
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