Skip to content

Commit 318de09

Browse files
author
Hevin
committed
Merge branch 'dev'
2 parents e837879 + 423d42c commit 318de09

File tree

2 files changed

+34
-11
lines changed

2 files changed

+34
-11
lines changed

Doc/CommonAPI.md

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
22

33
以下除事件监听之外的方法都基于 `JPushBinding` 对象进行调用。
44

5+
- [初始化与调试](#初始化与调试)
6+
- [Init(string gameObject)](#initstring-gameobject)
7+
- [SetDebug(bool enable)](#setdebugbool-enable)
8+
- [GetRegistrationId()](#getregistrationid)
9+
- [标签与别名](#标签与别名)
10+
- [SetTags(int sequence, List<string> tags)](#settagsint-sequence-liststring-tags)
11+
- [AddTags(int sequence, List<string> tags)](#addtagsint-sequence-liststring-tags)
12+
- [DeleteTags(int sequence, List<string> tags)](#deletetagsint-sequence-liststring-tags)
13+
- [CleanTags(int sequence)](#cleantagsint-sequence)
14+
- [GetAllTags(int sequence)](#getalltagsint-sequence)
15+
- [CheckTagBindState(int sequence, string tag)](#checktagbindstateint-sequence-string-tag)
16+
- [SetAlias(int sequence, string alias)](#setaliasint-sequence-string-alias)
17+
- [DeleteAlias(int sequence)](#deletealiasint-sequence)
18+
- [GetAlias(int sequence)](#getaliasint-sequence)
19+
- [事件监听](#事件监听)
20+
- [OnReceiveNotification(string notification)](#onreceivenotificationstring-notification)
21+
- [OnReceiveMessage(string msg)](#onreceivemessagestring-msg)
22+
- [OnOpenNotification(string notification)](#onopennotificationstring-notification)
23+
- [OnJPushTagOperateResult(result)](#onjpushtagoperateresultresult)
24+
- [OnJPushAliasOperateResult(result)](#onjpushaliasoperateresultresult)
25+
526
## 初始化与调试
627

728
### Init(string gameObject)
@@ -131,7 +152,7 @@
131152

132153
Android 的通知内容格式为:
133154

134-
```json
155+
```text
135156
{
136157
"title": "通知标题",
137158
"content": "通知内容",
@@ -143,7 +164,7 @@ Android 的通知内容格式为:
143164

144165
iOS 的通知内容格式为:
145166

146-
```json
167+
```text
147168
{
148169
"aps":{
149170
"alert":"通知内容",
@@ -168,7 +189,7 @@ iOS 的通知内容格式为:
168189

169190
Android 的通知内容格式为:
170191

171-
```json
192+
```text
172193
{
173194
"message": "自定义消息内容",
174195
"extras": { // 自定义键值对
@@ -180,12 +201,12 @@ Android 的通知内容格式为:
180201

181202
iOS 的自定义消息内容格式为:
182203

183-
```json
204+
```text
184205
{
185-
"content":"自定义消息内容"
206+
"content": "自定义消息内容",
186207
"extras": { // 自定义键值对
187-
"key1":"value1",
188-
"key2":"value2"
208+
"key1": "value1",
209+
"key2": "value2"
189210
}
190211
}
191212
```
@@ -200,7 +221,7 @@ iOS 的自定义消息内容格式为:
200221

201222
Android 的通知内容格式为:
202223

203-
```json
224+
```text
204225
{
205226
"message": "自定义消息内容",
206227
"extras": { // 自定义键值对
@@ -212,7 +233,7 @@ Android 的通知内容格式为:
212233

213234
iOS 的通知内容格式为:
214235

215-
```json
236+
```text
216237
{
217238
"aps":{
218239
"alert":"通知内容",
@@ -235,7 +256,7 @@ JPush 的标签相关操作回调。
235256

236257
- result: Json 格式字符串。格式为:
237258

238-
```json
259+
```text
239260
{
240261
"sequence": 1, // 调用标签或别名方法时传入的。
241262
"code": 0, // 结果码。0:成功;其他:失败(详细说明可参见官网文档)。
@@ -252,7 +273,7 @@ JPush 的别名相关操作回调。
252273

253274
- result: Json 格式字符串。格式为:
254275

255-
```json
276+
```text
256277
{
257278
"sequence": 1, // 调用标签或别名方法时传入的。
258279
"code": 0, // 结果码。0:成功;其他:失败(详细说明可参见官网文档)。

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@
138138

139139
## API 说明
140140

141+
Android 与 iOS [通用 API](/Doc/CommonAPI.md)
142+
141143
### Android
142144

143145
在 Plugins\Android\src 目录下是一些 Java 文件,可以将其引入到 Android 工程中对其进行扩展,重新生成 Jar 包替换掉工程中 Assets\Plugins\Android 目录下的 JPush_Bridge.jar 文件。

0 commit comments

Comments
 (0)