diff --git a/README.md b/README.md index 66aeac2..8396752 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/doc/iOS_API.md b/doc/iOS_API.md index 973acef..ebf20f5 100644 --- a/doc/iOS_API.md +++ b/doc/iOS_API.md @@ -18,7 +18,7 @@ API 目录: - [会话操作](#conversation) - [群组操作](#group) - [跨应用接口](#cross-app-method) - + ## User @@ -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, @@ -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 发送群聊图片消息 #### 接口定义 @@ -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 删除单聊会话。除了删除会话本身,还会删除该会话下所有的聊天消息。 #### 接口定义 @@ -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 删除群聊会话 #### 接口定义 @@ -155,12 +155,12 @@ API 目录: 获取全部单聊、群里会话信息 #### 接口定义 window.JMessage.getAllConversation(successCallback, errorCallback); - + ### API - clearSingleUnreadCount 清除单聊会话未读数 #### 接口定义 window.JMessage.clearSingleUnreadCount(username, successCallback, errorCallback); - + ### API - clearGroupUnreadCount 清除群聊会话未读数 #### 接口定义 @@ -173,7 +173,7 @@ API 目录: 创建群组 #### 接口定义 window.JMessage.createGroupIniOS(name, desc, memebersArray, successCallback, errorCallback); - + ### API - updateGroupInfo 修改群组信息 #### 接口定义 @@ -181,22 +181,22 @@ API 目录: #### 参数说明 - 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 添加群组成员 #### 接口定义 @@ -206,7 +206,7 @@ API 目录: 删除群组成员 #### 接口定义 window.JMessage.removeMembers(groupId, memberArray, successCallback, errorCallback); - + ### API - exitGroup 退出群组(当前用户) #### 接口定义 @@ -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 清除跨应用单聊会话未读数 #### 接口定义 diff --git a/package.json b/package.json index 45b6c73..e604cc5 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/plugin.xml b/plugin.xml index 1abd73a..d7c5feb 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="2.1.6"> JMessage PhoneGap Plugin 集成极光 IM 和推送功能 @@ -225,31 +225,30 @@ - - + + - - - - - - - + + + + + - - + + + - - - - - - - + + + + + + + diff --git a/src/android/JMessagePlugin.java b/src/android/JMessagePlugin.java index f093ceb..4da3110 100644 --- a/src/android/JMessagePlugin.java +++ b/src/android/JMessagePlugin.java @@ -48,7 +48,9 @@ import cn.jpush.im.android.api.callback.GetGroupIDListCallback; import cn.jpush.im.android.api.callback.GetGroupInfoCallback; import cn.jpush.im.android.api.callback.GetGroupMembersCallback; +import cn.jpush.im.android.api.callback.GetNoDisurbListCallback; import cn.jpush.im.android.api.callback.GetUserInfoCallback; +import cn.jpush.im.android.api.callback.IntegerCallback; import cn.jpush.im.android.api.content.EventNotificationContent; import cn.jpush.im.android.api.content.ImageContent; import cn.jpush.im.android.api.content.MessageContent; @@ -70,13 +72,10 @@ public class JMessagePlugin extends CordovaPlugin { private static String TAG = "JMessagePlugin"; private static JMessagePlugin instance; + private ExecutorService threadPool = Executors.newFixedThreadPool(1); private Gson mGson = new Gson(); private Activity mCordovaActivity; - private Message mCurrentMsg; // 当前消息。 - private static Message mBufMsg; // 缓存的消息。 - private static boolean shouldCacheMsg = false; - private int[] mMsgIds; public JMessagePlugin() { instance = this; @@ -104,10 +103,9 @@ public void onEvent(MessageEvent event) { avatarPath = avatarFile.getAbsolutePath(); } msgJson.getJSONObject("fromUser").put("avatarPath", avatarPath); - String fromName = TextUtils.isEmpty(fromUser.getNickname()) ? fromUser.getUserName() - : fromUser.getNickname(); - msgJson.put("fromName", fromName); - msgJson.put("fromID", fromUser.getUserName()); + msgJson.put("fromName", fromUser.getUserName()); + msgJson.put("fromNickname", fromUser.getNickname()); + msgJson.put("fromID", fromUser.getUserID()); UserInfo myInfo = JMessageClient.getMyInfo(); String myInfoJson = mGson.toJson(myInfo); @@ -122,18 +120,15 @@ public void onEvent(MessageEvent event) { msgJson.put("targetInfo", myInfoJsonObj); - String targetName = ""; if (msg.getTargetType().equals(ConversationType.single)) { - targetName = TextUtils.isEmpty(myInfo.getNickname()) - ? myInfo.getUserName() : myInfo.getNickname(); - msgJson.put("targetID", myInfo.getUserName()); - + msgJson.put("targetName", myInfo.getUserName()); + msgJson.put("targetNickname", myInfo.getNickname()); + msgJson.put("targetID", myInfo.getUserID()); } else if (msg.getTargetType().equals(ConversationType.group)) { GroupInfo targetInfo = (GroupInfo) msg.getTargetInfo(); - targetName = TextUtils.isEmpty(targetInfo.getGroupName()) - ? targetInfo.getGroupName() : (targetInfo.getGroupID() + ""); + msgJson.put("targetID", targetInfo.getGroupID()); + msgJson.put("targetName", targetInfo.getGroupName()); } - msgJson.put("targetName", targetName); switch (msg.getContentType()) { case text: @@ -179,7 +174,6 @@ public void onEvent(MessageEvent event) { break; default: } - Log.i(TAG, "onReceiveMessage: " + msgJson.toString()); fireEvent("onReceiveMessage", msgJson.toString()); } catch (JSONException e) { e.printStackTrace(); @@ -205,9 +199,7 @@ public void onEvent(LoginStateChangeEvent event) { // 触发通知栏点击事件。 public void onEvent(NotificationClickEvent event) { Message msg = event.getMessage(); - if (shouldCacheMsg) { - mBufMsg = msg; - } + String json = mGson.toJson(msg); fireEvent("onOpenMessage", json); @@ -261,14 +253,9 @@ public void run() { return true; } - public void onPause(boolean multitasking) { - shouldCacheMsg = true; - } - @Override public void onResume(boolean multitasking) { super.onResume(multitasking); - shouldCacheMsg = false; } public void onDestroy() { @@ -806,8 +793,7 @@ public void sendSingleVoiceMessage(JSONArray data, final CallbackContext callbac Conversation conversation = JMessageClient.getSingleConversation( userName, appKey); if (conversation == null) { - conversation = Conversation.createSingleConversation(userName, - appKey); + conversation = Conversation.createSingleConversation(userName, appKey); } if (conversation == null) { callback.error("无法创建对话"); @@ -1425,7 +1411,7 @@ public void getConversationList(JSONArray data, CallbackContext callback) { JSONObject conJson; for (Conversation con : conversationList) { conJson = new JSONObject(mGson.toJson(con)); - if (conJson.isNull("latestMessage")) { + if (conJson.isNull("latestMessage") && con.getLatestMessage() != null) { Message latestMsg = con.getLatestMessage(); JSONObject msgJson = new JSONObject(mGson.toJson(latestMsg)); conJson.put("latestMessage", msgJson); @@ -1537,12 +1523,17 @@ public void deleteSingleConversation(JSONArray data, CallbackContext callback) { try { String username = data.getString(0); String appKey = data.isNull(1) ? "" : data.getString(1); + boolean result; if (TextUtils.isEmpty(appKey)) { - JMessageClient.deleteSingleConversation(username); + result = JMessageClient.deleteSingleConversation(username); } else { - JMessageClient.deleteSingleConversation(username, appKey); + result = JMessageClient.deleteSingleConversation(username, appKey); + } + if (result) { + callback.success(); + } else { + callback.error("Delete fail."); } - callback.success(); } catch (JSONException e) { e.printStackTrace(); callback.error("Parameter error."); @@ -1552,8 +1543,12 @@ public void deleteSingleConversation(JSONArray data, CallbackContext callback) { public void deleteGroupConversation(JSONArray data, CallbackContext callback) { try { long groupId = data.getLong(0); - JMessageClient.deleteGroupConversation(groupId); - callback.success(); + boolean result = JMessageClient.deleteGroupConversation(groupId); + if (result) { + callback.success(); + } else { + callback.error("Delete fail."); + } } catch (JSONException e) { e.printStackTrace(); callback.error("Parameter error."); @@ -1938,11 +1933,9 @@ private JSONObject getJSonFormMessage(Message msg) { jsonItem.put("target_id", targetUser.getUserName()); jsonItem.put("target_name", targetUser.getNickname()); jsonItem.put("from_id", fromUser.getUserName()); - //jsonItem.put("from_name", fromUser.getNickname()); - jsonItem.put("from_name", msg.getFromName()); + jsonItem.put("from_name", msg.getFromUser().getUserName()); jsonItem.put("create_time", msg.getCreateTime()); jsonItem.put("msg_type", msgType); - //jsonItem.put("text", contentText); JSONObject contentBody = new JSONObject(); contentBody.put("text", contentText); @@ -2059,6 +2052,180 @@ public void requestPermission(JSONArray data, CallbackContext callback) { } } + // 免打扰 API + + /** + * 设置是否对目标用户免打扰。 + * + * @param data: data.getString(0): 目标用户的 username。 + * data.getInt(1): isNoDisturb, 0 - 解除免打扰,1 - 免打扰。 + */ + public void setUserNoDisturb(JSONArray data, final CallbackContext callback) { + try { + String username = data.getString(0); + final int isNoDisturb = data.getInt(1); + + JMessageClient.getUserInfo(username, new GetUserInfoCallback() { + @Override + public void gotResult(int status, String desc, UserInfo userInfo) { + if (status == 0) { + userInfo.setNoDisturb(isNoDisturb, new BasicCallback() { + @Override + public void gotResult(int status, String desc) { + if (status == 0) { + callback.success(); + } else { + callback.error(status); + } + } + }); + } else { + Log.i(TAG, status + ": " + desc); + callback.error(status); // 返回错误码。 + } + } + }); + } catch (JSONException e) { + e.printStackTrace(); + callback.error(e.toString()); + } + } + + /** + * 设置群组免打扰。 + */ + public void setGroupNoDisturb(JSONArray data, final CallbackContext callback) { + try { + long groupId = data.getLong(0); + final int isNoDisturb = data.getInt(1); + + JMessageClient.getGroupInfo(groupId, new GetGroupInfoCallback() { + @Override + public void gotResult(int status, String desc, GroupInfo groupInfo) { + if (status == 0) { + groupInfo.setNoDisturb(isNoDisturb, new BasicCallback() { + @Override + public void gotResult(int status, String desc) { + if (status == 0) { + callback.success(); + } else { + callback.error(status); + } + } + }); + } else { + callback.error(status); + } + } + }); + } catch (JSONException e) { + e.printStackTrace(); + } + } + + /** + * 获取指定用户的免打扰状态。 + */ + public void getUserNoDisturb(JSONArray data, final CallbackContext callback) { + try { + String username = data.getString(0); + + JMessageClient.getUserInfo(username, new GetUserInfoCallback() { + @Override + public void gotResult(int status, String desc, UserInfo userInfo) { + if (status == 0) { + callback.success(userInfo.getNoDisturb()); + } else { + callback.error(status); + } + } + }); + } catch (JSONException e) { + e.printStackTrace(); + } + } + + /** + * 获取指定群组的免打扰状态。 + */ + public void getGroupNoDisturb(JSONArray data, final CallbackContext callback) { + try { + long groupId = data.getLong(0); + + JMessageClient.getGroupInfo(groupId, new GetGroupInfoCallback() { + @Override + public void gotResult(int status, String desc, GroupInfo groupInfo) { + if (status == 0) { + callback.success(groupInfo.getNoDisturb()); + } else { + callback.error(status); + } + } + }); + } catch (JSONException e) { + e.printStackTrace(); + } + } + + // 获取免打扰列表。 + public void getNoDisturbList(JSONArray data, final CallbackContext callback) { + JMessageClient.getNoDisturblist(new GetNoDisurbListCallback() { + @Override + public void gotResult(int status, String desc, List userList, + List groupList) { + if (status == 0) { + JSONObject json = new JSONObject(); + try { + json.put("userList", mGson.toJson(userList)); + json.put("groupList", mGson.toJson(groupList)); + callback.success(json); + } catch (JSONException e) { + e.printStackTrace(); + } + } else { + callback.error(status); + } + } + }); + } + + /** + * 设置全局免打扰。0:正常状态,1:免打扰状态。 + */ + public void setNoDisturbGlobal(JSONArray data, final CallbackContext callback) { + try { + int isNoDisturbGlobal = data.getInt(0); + JMessageClient.setNoDisturbGlobal(isNoDisturbGlobal, new BasicCallback() { + @Override + public void gotResult(int status, String desc) { + if (status == 0) { + callback.success(); + } else { + callback.error(status); + } + } + }); + } catch (JSONException e) { + e.printStackTrace(); + } + } + + /** + * 获取当前的全局免打扰状态。 + */ + public void getNoDisturbGlobal(JSONArray data, final CallbackContext callback) { + JMessageClient.getNoDisturbGlobal(new IntegerCallback() { + @Override + public void gotResult(int status, String desc, Integer integer) { + if (status == 0) { + callback.success(integer); + } else { + callback.error(status); + } + } + }); + } + /** * @param type 会话类型,'single' or 'group'。 * @param value 会话的唯一标识,如果类型为 'single' 则为 username; diff --git a/src/android/jmessage-android-1.3.1.jar b/src/android/jmessage-android-1.3.1.jar deleted file mode 100644 index 3938679..0000000 Binary files a/src/android/jmessage-android-1.3.1.jar and /dev/null differ diff --git a/src/android/jpush_notification_icon.png b/src/android/jpush_notification_icon.png deleted file mode 100644 index bbb2340..0000000 Binary files a/src/android/jpush_notification_icon.png and /dev/null differ diff --git a/src/android/arm64-v8a/libjpush216.so b/src/android/libs/arm64-v8a/libjpush220.so similarity index 99% rename from src/android/arm64-v8a/libjpush216.so rename to src/android/libs/arm64-v8a/libjpush220.so index 3e5dc18..671f52d 100644 Binary files a/src/android/arm64-v8a/libjpush216.so and b/src/android/libs/arm64-v8a/libjpush220.so differ diff --git a/src/android/armeabi-v7a/libjpush216.so b/src/android/libs/armeabi-v7a/libjpush220.so similarity index 99% rename from src/android/armeabi-v7a/libjpush216.so rename to src/android/libs/armeabi-v7a/libjpush220.so index 7415e6a..b7e43a8 100644 Binary files a/src/android/armeabi-v7a/libjpush216.so and b/src/android/libs/armeabi-v7a/libjpush220.so differ diff --git a/src/android/armeabi/libjpush216.so b/src/android/libs/armeabi/libjpush220.so similarity index 99% rename from src/android/armeabi/libjpush216.so rename to src/android/libs/armeabi/libjpush220.so index b8b13da..ebcaa16 100644 Binary files a/src/android/armeabi/libjpush216.so and b/src/android/libs/armeabi/libjpush220.so differ diff --git a/src/android/gson-2.3.1.jar b/src/android/libs/gson-2.3.1.jar similarity index 100% rename from src/android/gson-2.3.1.jar rename to src/android/libs/gson-2.3.1.jar diff --git a/src/android/libs/jmessage-android-1.4.2.jar b/src/android/libs/jmessage-android-1.4.2.jar new file mode 100644 index 0000000..34aee96 Binary files /dev/null and b/src/android/libs/jmessage-android-1.4.2.jar differ diff --git a/src/android/mips/libjpush216.so b/src/android/libs/mips/libjpush220.so similarity index 99% rename from src/android/mips/libjpush216.so rename to src/android/libs/mips/libjpush220.so index 221669b..90c13ed 100644 Binary files a/src/android/mips/libjpush216.so and b/src/android/libs/mips/libjpush220.so differ diff --git a/src/android/mips64/libjpush216.so b/src/android/libs/mips64/libjpush220.so similarity index 99% rename from src/android/mips64/libjpush216.so rename to src/android/libs/mips64/libjpush220.so index b4b9d48..fb001ed 100644 Binary files a/src/android/mips64/libjpush216.so and b/src/android/libs/mips64/libjpush220.so differ diff --git a/src/android/x86/libjpush216.so b/src/android/libs/x86/libjpush220.so similarity index 99% rename from src/android/x86/libjpush216.so rename to src/android/libs/x86/libjpush220.so index 76cfe01..d805da5 100644 Binary files a/src/android/x86/libjpush216.so and b/src/android/libs/x86/libjpush220.so differ diff --git a/src/android/x86_64/libjpush216.so b/src/android/libs/x86_64/libjpush220.so similarity index 99% rename from src/android/x86_64/libjpush216.so rename to src/android/libs/x86_64/libjpush220.so index 707861a..6b2fe14 100644 Binary files a/src/android/x86_64/libjpush216.so and b/src/android/libs/x86_64/libjpush220.so differ diff --git a/src/android/ic_richpush_actionbar_back.png b/src/android/res/drawable-hdpi/jpush_ic_richpush_actionbar_back.png similarity index 100% rename from src/android/ic_richpush_actionbar_back.png rename to src/android/res/drawable-hdpi/jpush_ic_richpush_actionbar_back.png diff --git a/src/android/ic_richpush_actionbar_divider.png b/src/android/res/drawable-hdpi/jpush_ic_richpush_actionbar_divider.png similarity index 100% rename from src/android/ic_richpush_actionbar_divider.png rename to src/android/res/drawable-hdpi/jpush_ic_richpush_actionbar_divider.png diff --git a/src/android/richpush_btn_selector.xml b/src/android/res/drawable-hdpi/jpush_richpush_btn_selector.xml similarity index 82% rename from src/android/richpush_btn_selector.xml rename to src/android/res/drawable-hdpi/jpush_richpush_btn_selector.xml index 4750de9..c6dd002 100644 --- a/src/android/richpush_btn_selector.xml +++ b/src/android/res/drawable-hdpi/jpush_richpush_btn_selector.xml @@ -5,7 +5,7 @@ android:state_focused="true" android:state_enabled="true" android:state_pressed="false" - android:drawable="@drawable/ic_richpush_actionbar_back" /> + android:drawable="@drawable/jpush_ic_richpush_actionbar_back" /> - + \ No newline at end of file diff --git a/src/android/res/drawable-hdpi/jpush_richpush_progressbar.xml b/src/android/res/drawable-hdpi/jpush_richpush_progressbar.xml new file mode 100644 index 0000000..a1d9b8f --- /dev/null +++ b/src/android/res/drawable-hdpi/jpush_richpush_progressbar.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/android/jpush_popwin_layout.xml b/src/android/res/layout/jpush_popwin_layout.xml similarity index 100% rename from src/android/jpush_popwin_layout.xml rename to src/android/res/layout/jpush_popwin_layout.xml diff --git a/src/android/jpush_webview_layout.xml b/src/android/res/layout/jpush_webview_layout.xml similarity index 78% rename from src/android/jpush_webview_layout.xml rename to src/android/res/layout/jpush_webview_layout.xml index 19faa43..bebdd61 100644 --- a/src/android/jpush_webview_layout.xml +++ b/src/android/res/layout/jpush_webview_layout.xml @@ -18,7 +18,7 @@ android:layout_centerVertical="true" android:layout_marginLeft="9dp" android:layout_marginRight="10dp" - android:background="@drawable/richpush_btn_selector" /> + android:background="@drawable/jpush_richpush_btn_selector" /> + android:src="@drawable/jpush_ic_richpush_actionbar_divider" /> +