Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
lhw5123 committed Nov 4, 2016
2 parents eacfaae + eb5776a commit ba3f4fc
Show file tree
Hide file tree
Showing 26 changed files with 365 additions and 114 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# JMessage PhoneGap / Cordova Plugin

[![release](https://img.shields.io/badge/release-2.1.0-blue.svg)](https://github.com/jpush/jmessage-phonegap-plugin/releases)
[![release](https://img.shields.io/badge/release-2.1.6-blue.svg)](https://github.com/jpush/jmessage-phonegap-plugin/releases)
[![platforms](https://img.shields.io/badge/platforms-iOS%7CAndroid-lightgrey.svg)](https://github.com/jpush/jmessage-phonegap-plugin)
[![QQ Group](https://img.shields.io/badge/QQ%20Group-413602425-red.svg)](https://github.com/jpush/jmessage-phonegap-plugin)
[![weibo](https://img.shields.io/badge/weibo-JPush-blue.svg)](http://weibo.com/jpush?refer_flag=1001030101_&is_all=1)
Expand Down
98 changes: 49 additions & 49 deletions doc/iOS_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ API 目录:
- [会话操作](#conversation)
- [群组操作](#group)
- [跨应用接口](#cross-app-method)


## User

Expand All @@ -31,51 +31,51 @@ API 目录:
用户登录
#### 接口定义
window.JMessage.login(username, password, successCallback, errorCallback);

### API - logout
当前用户退出登录
#### 接口定义
window.JMessage.logout(successCallback, errorCallback);

### API - getMyInfo
获取我的信息(当前登录用户)
#### 接口定义
window.JMessage.getMyInfo(successCallback, errorCallback);

### API - getUserInfo
获取某用户的信息
#### 接口定义
window.JMessage.getUserInfo(username,successCallback, errorCallback);

### API - getUserInfoArray
获取用户详情(批量接口)
#### 接口定义
window.JMessage.getUserInfoArray(usernameArray, successCallback, errorCallback);

### API - updateMyPassword
更新密码(当前登录用户)
#### 接口定义
window.JMessage.getMyInfo(oldPwd, newPwd, errorCallback);
window.JMessage.updateMyPassword(oldPwd, newPwd, errorCallback);

### API - updateMyInfo
获取我的信息(当前登录用户)
#### 接口定义
window.JMessage.getMyInfo(field, value, successCallback, errorCallback);
window.JMessage.updateMyInfo(field, value, successCallback, errorCallback);
#### 参数说明
- field:数字、或纯数字字符串

/// 用户信息字段: 用户名
kJMSGUserFieldsNickname = 0,
/// 用户信息字段: 生日
kJMSGUserFieldsBirthday = 1,
/// 用户信息字段: 签名
kJMSGUserFieldsSignature = 2,
/// 用户信息字段: 性别
kJMSGUserFieldsGender = 3,
/// 用户信息字段: 区域
kJMSGUserFieldsRegion = 4,
/// 用户信息字段: 头像 (内部定义的 media_id)
kJMSGUserFieldsAvatar = 5,
/// 用户信息字段: 用户名
kJMSGUserFieldsNickname = 0,
/// 用户信息字段: 生日
kJMSGUserFieldsBirthday = 1,
/// 用户信息字段: 签名
kJMSGUserFieldsSignature = 2,
/// 用户信息字段: 性别
kJMSGUserFieldsGender = 3,
/// 用户信息字段: 区域
kJMSGUserFieldsRegion = 4,
/// 用户信息字段: 头像 (内部定义的 media_id)
kJMSGUserFieldsAvatar = 5,



Expand All @@ -85,27 +85,27 @@ API 目录:
发送单聊文本消息
#### 接口定义
window.JMessage.sendSingleTextMessage(username, text, appKey, successCallback, errorCallback);

### API - sendSingleVoiceMessage
发送单聊语音消息
#### 接口定义
window.JMessage.sendSingleTextMessage(username, text, appKey, successCallback, errorCallback);
window.JMessage.sendSingleVoiceMessage(username, text, appKey, successCallback, errorCallback);

### API - sendSingleImageMessage
发送单聊图片消息
#### 接口定义
window.JMessage.getMyInfosendSingleImageMessage(username, imageUrl, appKey, successCallback, errorCallback);
window.JMessage.sendSingleImageMessage(username, imageUrl, appKey, successCallback, errorCallback);

### API - sendGroupTextMessage
发送群聊文本消息
#### 接口定义
window.JMessage.sendGroupTextMessage(groupId, text, successCallback, errorCallback);

### API - sendGroupVoiceMessage
发送群聊语音消息
#### 接口定义
window.JMessage.sendGroupVoiceMessage (username, fileUrl, successCallback, errorCallback);
window.JMessage.sendGroupVoiceMessage (groupId, fileUrl, successCallback, errorCallback);

### API - sendGroupImageMessage
发送群聊图片消息
#### 接口定义
Expand All @@ -122,15 +122,15 @@ API 目录:
- offset:开始的位置,null 表示从最初开始
- limit:获取的数量,null 表示不限
- 例:
- offset = nil, limit = nil,表示获取全部。相当于 allMessages
- offset = nil, limit = 100,表示从最新开始取 100 条记录
- offset = 100, limit = nil,表示从最新第 100 条开始,获取余下所有记录
- offset = nil, limit = nil,表示获取全部。相当于 allMessages
- offset = nil, limit = 100,表示从最新开始取 100 条记录
- offset = 100, limit = nil,表示从最新第 100 条开始,获取余下所有记录

### API - getAllSingleConversation
获取全部单聊会话信息
#### 接口定义
window.JMessage.getAllSingleConversation(successCallback, errorCallback);

### API - deleteSingleConversation
删除单聊会话。除了删除会话本身,还会删除该会话下所有的聊天消息。
#### 接口定义
Expand All @@ -139,13 +139,13 @@ API 目录:
### API - getGroupConversationHistoryMessage
获取多条群聊消息(同步接口)。参数同 [获取多条单聊消息](#api---getsingleconversationhistorymessage)
#### 接口定义
window.JMessage.getGroupConversationHistoryMessage(username, from, limit, successCallback, errorCallback);
window.JMessage.getGroupConversationHistoryMessage(groupId, from, limit, successCallback, errorCallback);

### API - getAllGroupConversation
获取全部群聊会话信息
#### 接口定义
window.JMessage.getAllGroupConversation(successCallback, errorCallback);

### API - deleteGroupConversation
删除群聊会话
#### 接口定义
Expand All @@ -155,12 +155,12 @@ API 目录:
获取全部单聊、群里会话信息
#### 接口定义
window.JMessage.getAllConversation(successCallback, errorCallback);

### API - clearSingleUnreadCount
清除单聊会话未读数
#### 接口定义
window.JMessage.clearSingleUnreadCount(username, successCallback, errorCallback);

### API - clearGroupUnreadCount
清除群聊会话未读数
#### 接口定义
Expand All @@ -173,30 +173,30 @@ API 目录:
创建群组
#### 接口定义
window.JMessage.createGroupIniOS(name, desc, memebersArray, successCallback, errorCallback);

### API - updateGroupInfo
修改群组信息
#### 接口定义
window.JMessage.updateGroupInfo(groupId, name, desc, successCallback, errorCallback);
#### 参数说明
- name:新名称
- desc:新描述

### API - getGroupInfo
获取群组详情(不包含群组成员)
#### 接口定义
window.JMessage.getGroupInfo(groupId, successCallback, errorCallback);

### API - myGroupArray
获取我的群组列表
#### 接口定义
window.JMessage.myGroupArray(successCallback, errorCallback);

### API - memberArray
获取当前群组成员列表
#### 接口定义
window.JMessage.memberArray(groupId, successCallback, errorCallback);

### API - addMembers
添加群组成员
#### 接口定义
Expand All @@ -206,7 +206,7 @@ API 目录:
删除群组成员
#### 接口定义
window.JMessage.removeMembers(groupId, memberArray, successCallback, errorCallback);

### API - exitGroup
退出群组(当前用户)
#### 接口定义
Expand All @@ -219,27 +219,27 @@ API 目录:
发送跨应用单聊文本消息
#### 接口定义
window.JMessage.cross_sendSingleTextMessage = function (username, appKey, text, successCallback, errorCallback);

### API - cross_sendSingleVoiceMessage
发送跨应用单聊语音消息
#### 接口定义
window.JMessage.cross_sendSingleVoiceMessage = function (username, appKey, fileUrl, successCallback, errorCallback);

### API - cross_sendSingleImageMessage
发送跨应用单聊图片消息
#### 接口定义
window.JMessage.cross_sendSingleImageMessage = function (username, appKey, imageUrl, successCallback, errorCallback);

### API - cross_getSingleConversationHistoryMessage
获取跨应用单聊历史消息(多条)。参数同 [获取多条单聊消息](#api---getsingleconversationhistorymessage)
#### 接口定义
window.JMessage.cross_getSingleConversationHistoryMessage = function (username, appKey, from, limit, successCallback, errorCallback);

### API - cross_deleteSingleConversation
删除跨应用单聊会话
#### 接口定义
window.JMessage.cross_deleteSingleConversation = function (username, appKey, successCallback, errorCallback);

### API - cross_clearSingleUnreadCount
清除跨应用单聊会话未读数
#### 接口定义
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jmessage-phonegap-plugin",
"version": "2.1.6",
"version": "2.1.8",
"description": "JMessage Cordova Plugin.",
"cordova": {
"id": "jmessage-phonegap-plugin",
Expand Down
37 changes: 18 additions & 19 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="jmessage-phonegap-plugin"
version="2.1.4">
version="2.1.6">

<name>JMessage PhoneGap Plugin</name>
<description>集成极光 IM 和推送功能</description>
Expand Down Expand Up @@ -225,31 +225,30 @@
<meta-data android:name="JPUSH_CHANNEL" android:value="developer-default"/>
</config-file>

<source-file src="src/android/gson-2.3.1.jar" target-dir="libs"/>
<source-file src="src/android/jmessage-android-1.3.1.jar" target-dir="libs"/>
<source-file src="src/android/libs/gson-2.3.1.jar" target-dir="libs"/>
<source-file src="src/android/libs/jmessage-android-1.4.2.jar" target-dir="libs"/>

<source-file src="src/android/armeabi/libjpush216.so" target-dir="libs/armeabi"/>
<source-file src="src/android/armeabi-v7a/libjpush216.so" target-dir="libs/armeabi-v7a"/>
<source-file src="src/android/arm64-v8a/libjpush216.so" target-dir="libs/arm64-v8a"/>
<source-file src="src/android/x86_64/libjpush216.so" target-dir="libs/x86_64"/>
<source-file src="src/android/x86/libjpush216.so" target-dir="libs/x86"/>
<source-file src="src/android/mips64/libjpush216.so" target-dir="libs/mips64"/>
<source-file src="src/android/mips/libjpush216.so" target-dir="libs/mips"/>
<source-file src="src/android/libs/armeabi/libjpush220.so" target-dir="libs/armeabi"/>
<source-file src="src/android/libs/armeabi-v7a/libjpush220.so" target-dir="libs/armeabi-v7a"/>
<source-file src="src/android/libs/arm64-v8a/libjpush220.so" target-dir="libs/arm64-v8a"/>
<source-file src="src/android/libs/x86_64/libjpush220.so" target-dir="libs/x86_64"/>
<source-file src="src/android/libs/x86/libjpush220.so" target-dir="libs/x86"/>

<source-file src="src/android/JMessagePlugin.java" target-dir="src/cn/jmessage/phonegap"/>
<source-file src="src/android/JPushPlugin.java" target-dir="src/cn/jmessage/phonegap"/>
<source-file src="src/android/MyReceiver.java" target-dir="src/cn/jmessage/phonegap"/>

<source-file src="src/android/test_notification_layout.xml" target-dir="res/layout"/>
<source-file src="src/android/jpush_notification_icon.png" target-dir="res/drawable"/>
<source-file src="src/android/res/layout/test_notification_layout.xml" target-dir="res/layout"/>
<source-file src="src/android/res/layout/jpush_popwin_layout.xml" target-dir="res/layout"/>
<source-file src="src/android/res/layout/jpush_webview_layout.xml" target-dir="res/layout"/>

<!-- Rich Push resources -->
<source-file src="src/android/ic_richpush_actionbar_back.png" target-dir="res/drawable" />
<source-file src="src/android/ic_richpush_actionbar_divider.png" target-dir="res/drawable" />
<source-file src="src/android/richpush_btn_selector.xml" target-dir="res/drawable" />
<source-file src="src/android/jpush_popwin_layout.xml" target-dir="res/layout" />
<source-file src="src/android/jpush_webview_layout.xml" target-dir="res/layout" />
<source-file src="src/android/jpush_style.xml" target-dir="res/values" />
<source-file src="src/android/res/drawable-hdpi/jpush_ic_richpush_actionbar_back.png" target-dir="res/drawable-hdpi"/>
<source-file src="src/android/res/drawable-hdpi/jpush_ic_richpush_actionbar_divider.png" target-dir="res/drawable-hdpi"/>

<source-file src="src/android/res/drawable-hdpi/jpush_richpush_btn_selector.xml" target-dir="res/drawable"/>
<source-file src="src/android/res/drawable-hdpi/jpush_richpush_progressbar.xml" target-dir="res/drawable"/>

<source-file src="src/android/res/values/jpush_style.xml" target-dir="res/values"/>
</platform>

</plugin>
Loading

0 comments on commit ba3f4fc

Please sign in to comment.