fix(xiaomi): 增加 payload 传递和 extra.notify_effect=1 确保点击打开应用
- 推送请求携带 payload,SDK 点击通知后可从中解析 URL - 固定设置 extra.notify_effect=1 确保 HyperOS 点击通知时打开应用 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
这个提交包含在:
父节点
ac2f83668e
当前提交
dedd5a61a0
@ -71,7 +71,11 @@ public class XiaomiPushProvider implements PushProvider {
|
|||||||
.append("&title=").append(URLEncoder.encode(title, StandardCharsets.UTF_8))
|
.append("&title=").append(URLEncoder.encode(title, StandardCharsets.UTF_8))
|
||||||
.append("&description=").append(URLEncoder.encode(body, StandardCharsets.UTF_8))
|
.append("&description=").append(URLEncoder.encode(body, StandardCharsets.UTF_8))
|
||||||
.append("&restricted_package_name=").append(URLEncoder.encode(packageName, StandardCharsets.UTF_8))
|
.append("&restricted_package_name=").append(URLEncoder.encode(packageName, StandardCharsets.UTF_8))
|
||||||
.append("&extra.notify_foreground=1");
|
.append("&extra.notify_foreground=1")
|
||||||
|
.append("&extra.notify_effect=1");
|
||||||
|
if (payload != null && !payload.isBlank()) {
|
||||||
|
form.append("&payload=").append(URLEncoder.encode(payload, StandardCharsets.UTF_8));
|
||||||
|
}
|
||||||
Integer notifyType = options != null ? options.notifyType() : null;
|
Integer notifyType = options != null ? options.notifyType() : null;
|
||||||
form.append("¬ify_type=").append(notifyType == null ? 1 : Math.max(notifyType, 0));
|
form.append("¬ify_type=").append(notifyType == null ? 1 : Math.max(notifyType, 0));
|
||||||
if (!channelId.isBlank()) {
|
if (!channelId.isBlank()) {
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户