GTThirdNotification.php
2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?php
class GTThirdNotification extends GTApiRequest
{
const CLICK_TYPE_INTENT = "intent";
const CLICK_TYPE_URL = "url";
const CLICK_TYPE_PAYLOAD = "payload";
const CLICK_TYPE_STAERAPP = "startapp";
const CLICK_TYPE_NONE = "none";
/**
* 第三方厂商通知标题,长度 ≤ 50
*/
private $title;
/**
* 第三方厂商通知内容,长度 ≤ 256
*/
private $body;
/**
* @see com.gt.sdk.dto.CommonEnum.ClickTypeEnum
* 点击通知后续动作,
* 目前支持5种后续动作,
* intent:打开应用内特定页面,
* url:打开网页地址,
* payload:启动应用加自定义消息内容,
* startapp:打开应用首页,
* none:纯通知,无后续动作
*/
private $clickType;
/**
* 点击通知打开应用特定页面,长度 ≤ 2048;
* 示例:intent:#Intent;component=你的包名/你要打开的 activity 全路径;S.parm1=value1;S.parm2=value2;end
*/
private $intent;
/**
* 点击通知打开链接,长度 ≤ 1024
*/
private $url;
/**
* 点击通知加自定义消息,长度 ≤ 3072
*/
private $payload;
/**
* 消息覆盖使用,两条消息的notify_id相同,新的消息会覆盖老的消息
*/
private $notifyId;
public function getTitle()
{
return $this->title;
}
public function setTitle($title)
{
$this->title = $title;
$this->apiParam["title"] = $title;
}
public function getBody()
{
return $this->body;
}
public function setBody($body)
{
$this->body = $body;
$this->apiParam["body"] = $body;
}
public function getClickType()
{
return $this->clickType;
}
public function setClickType($clickType)
{
$this->clickType = $clickType;
$this->apiParam["click_type"] = $clickType;
}
public function getIntent()
{
return $this->intent;
}
public function setIntent($intent)
{
$this->intent = $intent;
$this->apiParam["intent"] = $intent;
}
public function getUrl()
{
return $this->url;
}
public function setUrl($url)
{
$this->url = $url;
$this->apiParam["url"] = $url;
}
public function getPayload()
{
return $this->payload;
}
public function setPayload($payload)
{
$this->payload = $payload;
$this->apiParam["payload"] = $payload;
}
public function getNotifyId()
{
return $this->notifyId;
}
public function setNotifyId($notifyId)
{
$this->notifyId = $notifyId;
$this->apiParam["notify_id"] = $notifyId;
}
}