Skip to content

Commit

Permalink
Merge pull request #162 from Kommunicate-io/v2.1.1
Browse files Browse the repository at this point in the history
Release version v2.1.1
  • Loading branch information
archit2602 authored Nov 2, 2020
2 parents 9851b35 + 3d348ff commit e6313d8
Show file tree
Hide file tree
Showing 26 changed files with 671 additions and 565 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ allprojects {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
api project(':kommunicateui')
//implementation 'io.kommunicate.sdk:kommunicateui:2.1.0'
//implementation 'io.kommunicate.sdk:kommunicateui:2.1.1'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.multidex:multidex:2.0.1'
testImplementation 'junit:junit:4.12'
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/assets/applozic-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@
"enableAwayMessage": true,
"awayMessageTextColor": "#A9A4A4",
"hideGroupSubtitle": false,
"toolbarTitleColor": "#ffffff",
"toolbarSubtitleColor": "#ffffff",
"enableFaqOption": [
true,
false
Expand Down
6 changes: 3 additions & 3 deletions kommunicate/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "2.1.0"
versionName "2.1.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

}
Expand All @@ -23,7 +23,7 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
api 'com.applozic.communication.message:mobicomkit:5.90'
api 'com.applozic.communication.message:mobicomkit:5.92'
//api project(':mobicomkit')
}

Expand All @@ -40,7 +40,7 @@ dependencies {
// module. The artifact name needs to match the name of the library.
artifact = 'kommunicate'
libraryDescription = 'Kommunicate android chat SDK for cutomer support'
libraryVersion = '2.1.0'
libraryVersion = '2.1.1'
developerId = 'kommunicate'
developerName = 'Kommunicate'
developerEmail = '[email protected]'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public static class KmResponse extends JsonMarker {
private String userName;
private String agentId;
private String agentName;
private boolean collectFeedback;
private KmChatWidget chatWidget;

public String getUserName() {
Expand All @@ -62,6 +63,14 @@ public void setAgentName(String agentName) {
this.agentName = agentName;
}

public boolean isCollectFeedback() {
return collectFeedback;
}

public void setCollectFeedback(boolean collectFeedback) {
this.collectFeedback = collectFeedback;
}

public KmChatWidget getChatWidget() {
return chatWidget;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,6 @@ public String getConversationFeedback(String conversationId) {

Utils.printLog(context, TAG, "Get feedback response: " + response);

return httpRequestUtils.getResponse(urlBuilder.toString(), "application/json", "application/json");
return response;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class KmAppSettingPreferences {
private static final String KM_THEME_PREFERENCES = "KM_THEME_PREFERENCES";
private static final String KM_THEME_PRIMARY_COLOR = "KM_THEME_PRIMARY_COLOR";
private static final String KM_THEME_SECONDARY_COLOR = "KM_THEME_SECONDARY_COLOR";
private static final String KM_COLLECT_FEEDBACK = "KM_COLLECT_FEEDBACK";

private KmAppSettingPreferences() {
preferences = ApplozicService.getAppContext().getSharedPreferences(KM_THEME_PREFERENCES, Context.MODE_PRIVATE);
Expand All @@ -40,9 +41,15 @@ public void setCallback(KmCallback callback) {
}

public void setAppSetting(KmAppSettingModel appSetting) {
if (appSetting != null && appSetting.getChatWidget() != null) {
setPrimaryColor(appSetting.getChatWidget().getPrimaryColor());
setSecondaryColor(appSetting.getChatWidget().getSecondaryColor());
clearInstance();
if (appSetting != null) {
if (appSetting.getChatWidget() != null) {
setPrimaryColor(appSetting.getChatWidget().getPrimaryColor());
setSecondaryColor(appSetting.getChatWidget().getSecondaryColor());
}
if (appSetting.getResponse() != null) {
setCollectFeedback(appSetting.getResponse().isCollectFeedback());
}
}
}

Expand All @@ -64,6 +71,15 @@ public String getSecondaryColor() {
return preferences.getString(KM_THEME_SECONDARY_COLOR, null);
}

public boolean isCollectFeedback() {
return preferences.getBoolean(KM_COLLECT_FEEDBACK, false);
}

public KmAppSettingPreferences setCollectFeedback(boolean collectFeedback) {
preferences.edit().putBoolean(KM_COLLECT_FEEDBACK, collectFeedback).commit();
return this;
}

public static void fetchAppSettingAsync(final Context context) {
new KmAppSettingTask(context, Applozic.getInstance(context).getApplicationKey(), new KmCallback() {
@Override
Expand Down
5 changes: 3 additions & 2 deletions kommunicateui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "2.1.0"
versionName "2.1.1"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
Expand All @@ -27,6 +27,7 @@ dependencies {
api 'com.google.android.gms:play-services-location:17.0.0'
api 'de.hdodenhof:circleimageview:2.2.0'
api 'com.google.android.material:material:1.0.0'
implementation 'com.google.android:flexbox:2.0.1'
api 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
api 'com.github.bumptech.glide:glide:4.9.0'
api 'androidx.cardview:cardview:1.0.0'
Expand All @@ -48,7 +49,7 @@ dependencies {
artifact = 'kommunicateui'
libraryDescription = 'Kommunicate android chat SDK for cutomer support'
libraryVersion = '2.1.0'
libraryVersion = '2.1.1'
developerId = 'kommunicate'
developerName = 'Kommunicate'
developerEmail = '[email protected]'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* Created by sunil on 10/10/16.
*/
public class AlCustomizationSettings extends JsonMarker {
public static final int DEFAULT_MESSAGE_CHAR_LIMIT = 2000;

private String customMessageBackgroundColor = "#e6e5ec";
private String sentMessageBackgroundColor = "";
Expand All @@ -20,6 +21,8 @@ public class AlCustomizationSettings extends JsonMarker {
private String editTextBackgroundColorOrDrawable;
private String editTextLayoutBackgroundColorOrDrawable;
private String channelCustomMessageBgColor = "#cccccc";
private String toolbarTitleColor = "#ffffff";
private String toolbarSubtitleColor = "#ffffff";

private String sentContactMessageTextColor = "#5fba7d";
private String receivedContactMessageTextColor = "#646262";
Expand Down Expand Up @@ -89,6 +92,7 @@ public class AlCustomizationSettings extends JsonMarker {
private int totalRegisteredUserToFetch = 100;
private int maxAttachmentAllowed = 5;
private int maxAttachmentSizeAllowed = 30;
private int messageCharacterLimit = DEFAULT_MESSAGE_CHAR_LIMIT;
private int totalOnlineUsers = 0;
private String themeColorPrimary;
private String themeColorPrimaryDark;
Expand Down Expand Up @@ -531,6 +535,10 @@ public void setMessageTemplate(MobicomMessageTemplate messageTemplate) {
this.messageTemplate = messageTemplate;
}

public int getMessageCharacterLimit() {
return messageCharacterLimit;
}

public MobicomMessageTemplate getMessageTemplate() {
return messageTemplate;
}
Expand Down Expand Up @@ -639,6 +647,22 @@ public String getRestrictedWordRegex() {
return restrictedWordRegex;
}

public String getToolbarTitleColor() {
return toolbarTitleColor;
}

public void setToolbarTitleColor(String toolbarTitleColor) {
this.toolbarTitleColor = toolbarTitleColor;
}

public String getToolbarSubtitleColor() {
return toolbarSubtitleColor;
}

public void setToolbarSubtitleColor(String toolbarSubtitleColor) {
this.toolbarSubtitleColor = toolbarSubtitleColor;
}

@Override
public String toString() {
return "AlCustomizationSettings{" +
Expand Down Expand Up @@ -695,6 +719,9 @@ public String toString() {
", maxAttachmentAllowed=" + maxAttachmentAllowed +
", maxAttachmentSizeAllowed=" + maxAttachmentSizeAllowed +
", totalOnlineUsers=" + totalOnlineUsers +
", messageCharacterLimit" + messageCharacterLimit +
", toolbarTitleColor=" + toolbarTitleColor +
", toolbarSubtitleColor=" + toolbarSubtitleColor +
'}';
}
}

This file was deleted.

Loading

0 comments on commit e6313d8

Please sign in to comment.