Panagiotis Triantafyllou

new campaign keys

......@@ -3,7 +3,7 @@
# The app uuid the warply sdk need to connect to the engage server
# dev f83dfde1145e4c2da69793abb2f579af
# prod 0086a2088301440792091b9f814c2267
Uuid=0086a2088301440792091b9f814c2267
Uuid=f83dfde1145e4c2da69793abb2f579af
# If we need to see logs in Logcat
Debug=true
......@@ -11,7 +11,7 @@ Debug=true
# Production or Development environment of the engage server
# Production: https://engage.warp.ly
# Development: https://engage-stage.warp.ly
BaseURL=https://engage.warp.ly
BaseURL=https://engage-stage.warp.ly
# For Verify Ticket request
VerifyURL=/partners/cosmote/verify
......
......@@ -36,7 +36,7 @@ public class SplashActivity extends BaseActivity {
public void onWarplyReady() {
if (!WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) {
WarplyManager.getCosmoteUser(new WarplyCosmoteUserRequest()
.setGuid("6010490808"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990, prod 6005892749, live 3000184910
.setGuid("7000000831"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990, prod 6005892749, live 3000184910
mLoginReceiver);
} else {
startNextActivity();
......
......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4.6rc45'
PUBLISH_VERSION = '4.5.4.6rc46'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -67,6 +67,8 @@ public class NewCampaignsHook implements CallbackReceiver<JSONObject> {
camp.setSorting(newCamp.getSorting());
camp.setNew(newCamp.getIsNew());
camp.setType(newCamp.getCampaignType());
camp.setBannerImage(newCamp.getBannerImage());
camp.setBannerTitle(newCamp.getBannerTitle());
try {
camp.setExtraFields(newCamp.getExtraFields().toString());
} catch (NullPointerException e) {
......
......@@ -70,6 +70,8 @@ public class Campaign implements Parcelable, Serializable {
private static final String ACTIONS = "actions";
private static final String BUS_ID = "busId";
private static final String CAMPAIGN_TYPE_SETTINGS = "campaign_type_settings";
private static final String BANNER_IMAGE = "Banner_img";
private static final String BANNER_TITLE = "Banner_title";
/* Member variables of the Campaign object */
......@@ -97,6 +99,8 @@ public class Campaign implements Parcelable, Serializable {
private String busId;
private ArrayList<CampaignAction> actions = new ArrayList<>();
private String campaignTypeSettings;
private String bannerImage;
private String bannerTitle;
/**
* Basic constructor used to create an object from a String, representing a
......@@ -134,6 +138,8 @@ public class Campaign implements Parcelable, Serializable {
this.busId = "";
this.actions = new ArrayList<>();
this.campaignTypeSettings = "";
this.bannerImage = "";
this.bannerTitle = "";
}
/**
......@@ -590,6 +596,22 @@ public class Campaign implements Parcelable, Serializable {
this.campaignTypeSettings = campaignTypeSettings;
}
public String getBannerImage() {
return this.bannerImage;
}
public String getBannerTitle() {
return this.bannerTitle;
}
public void setBannerImage(String bannerImage) {
this.bannerImage = bannerImage;
}
public void setBannerTitle(String bannerTitle) {
this.bannerTitle = bannerTitle;
}
@Override
public int describeContents() {
return 0;
......
......@@ -66,6 +66,8 @@ public class NewCampaign implements Parcelable, Serializable {
private static final String SETTINGS = "settings";
private static final String AUDIENCE = "audience";
private static final String IS_NEW = "is_new";
private static final String BANNER_IMAGE = "Banner_img";
private static final String BANNER_TITLE = "Banner_title";
/* Member variables of the Campaign object */
private final String campaignType;
......@@ -89,6 +91,8 @@ public class NewCampaign implements Parcelable, Serializable {
private final String communicationName;
private final String communicationCategory;
private boolean isNew = false;
private String bannerImage = "";
private String bannerTitle = "";
/**
* Basic constructor used to create an object from a String, representing a
......@@ -128,7 +132,14 @@ public class NewCampaign implements Parcelable, Serializable {
this.communicationName = json.optString(COMMUNICATION_NAME);
this.communicationCategory = json.optString(COMMUNICATION_CATEGORY);
this.isNew = json.optBoolean(IS_NEW);
if (this.extraFields != null) {
if (this.extraFields.has(BANNER_IMAGE)) {
this.bannerImage = this.extraFields.optString(BANNER_IMAGE);
}
if (this.extraFields.has(BANNER_TITLE)) {
this.bannerTitle = this.extraFields.optString(BANNER_TITLE);
}
}
}
public NewCampaign(Parcel source) {
......@@ -153,6 +164,8 @@ public class NewCampaign implements Parcelable, Serializable {
this.communicationCategory = source.readString();
this.category = source.readString();
this.campaignType = source.readString();
this.bannerImage = source.readString();
this.bannerTitle = source.readString();
}
@Override
......@@ -178,6 +191,8 @@ public class NewCampaign implements Parcelable, Serializable {
dest.writeString(this.category);
dest.writeString(this.campaignType);
dest.writeString(this.communicationUUID);
dest.writeString(this.bannerImage);
dest.writeString(this.bannerTitle);
}
/**
......@@ -355,6 +370,14 @@ public class NewCampaign implements Parcelable, Serializable {
return workflowSettings;
}
public String getBannerImage() {
return bannerImage;
}
public String getBannerTitle() {
return bannerTitle;
}
@Override
public int describeContents() {
return 0;
......