Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
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
杨凯
YDL-Component-Medical
Commits
07b299e2
Commit
07b299e2
authored
May 10, 2022
by
万齐军
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/qj/im_apns' into 'd/v4.3.92'
feature: im加apns See merge request app_android_lib/YDL-Component!5
parents
a5d2d185
9c0764fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
InputPanel.java
m-im/src/main/java/com/yidianling/uikit/business/session/module/input/InputPanel.java
+18
-2
No files found.
m-im/src/main/java/com/yidianling/uikit/business/session/module/input/InputPanel.java
View file @
07b299e2
...
...
@@ -31,6 +31,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONException
;
import
com.alibaba.fastjson.JSONObject
;
import
com.blankj.utilcode.util.SPUtils
;
...
...
@@ -73,6 +74,8 @@ import com.yidianling.uikit.custom.widget.SafeHelpRemindDialog;
import
com.yidianling.user.api.service.IUserService
;
import
java.io.File
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -649,12 +652,25 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
fillHwPayload
(
payload
,
NimUIKit
.
getAccount
(),
container
.
sessionType
.
getValue
());
fillOppoPayload
(
payload
,
NimUIKit
.
getAccount
(),
container
.
sessionType
.
getValue
());
fillVivoPayload
(
payload
,
NimUIKit
.
getAccount
(),
container
.
sessionType
.
getValue
());
payload
.
put
(
"sessionId"
,
NimUIKit
.
getAccount
());
payload
.
put
(
"sessionType"
,
container
.
sessionType
.
getValue
());
fillApnsPayload
(
payload
,
NimUIKit
.
getAccount
(),
container
.
sessionType
.
getValue
());
msg
.
setPushPayload
(
payload
);
return
msg
;
}
private
void
fillApnsPayload
(
Map
<
String
,
Object
>
pushPayload
,
String
sessionId
,
int
sessionType
)
{
try
{
Map
<
String
,
Object
>
apns
=
new
HashMap
<>();
apns
.
put
(
"toUid"
,
sessionId
);
apns
.
put
(
"sessionType"
,
sessionType
);
apns
.
put
(
"chatType"
,
1
);
String
json
=
JSON
.
toJSONString
(
apns
);
String
encode
=
URLEncoder
.
encode
(
json
,
"UTF-8"
);
String
finalUrl
=
"ydl-user://chat/private?params="
+
encode
;
pushPayload
.
put
(
"route_ios"
,
finalUrl
);
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
}
private
void
fillHwPayload
(
Map
<
String
,
Object
>
pushPayload
,
String
sessionId
,
int
sessionType
)
{
//华为
Intent
hwIntent
=
new
Intent
(
Intent
.
ACTION_VIEW
);
...
...
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