Panagiotis Triantafyllou

fixes

...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
2 2
3 ext { 3 ext {
4 PUBLISH_GROUP_ID = 'ly.warp' 4 PUBLISH_GROUP_ID = 'ly.warp'
5 - PUBLISH_VERSION = '4.5.4-cosbeta19' 5 + PUBLISH_VERSION = '4.5.4-cosbeta20'
6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk' 6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
7 } 7 }
8 8
......
...@@ -110,13 +110,17 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene ...@@ -110,13 +110,17 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
110 110
111 try { 111 try {
112 String key = WarpJSONParser.getJSONFromString(dataItem.getCampaign().getExtraFields()).keys().next(); 112 String key = WarpJSONParser.getJSONFromString(dataItem.getCampaign().getExtraFields()).keys().next();
113 - if (!TextUtils.isEmpty(key) && key.equals("loyaltyCampaignId")) { 113 + if (!TextUtils.isEmpty(key) && key.equals("ccms_offer")) {
114 - String value = WarpJSONParser.getJSONFromString(dataItem.getCampaign().getExtraFields()).optString("loyaltyCampaignId"); 114 + String value = WarpJSONParser.getJSONFromString(dataItem.getCampaign().getExtraFields()).optString(key);
115 - for (LoyaltyContextualOfferModel ccms : WarplyManagerHelper.getCCMSLoyaltyCampaigns()) { 115 + if (!TextUtils.isEmpty(value) && value.equals("true")) {
116 - if (ccms.getLoyaltyCampaignId().equals(value)) { 116 + for (LoyaltyContextualOfferModel ccms : WarplyManagerHelper.getCCMSLoyaltyCampaigns()) {
117 - startActivity(WarpViewActivity.createIntentFromURL(this, WarplyManagerHelper.constructCcmsUrl(dataItem.getCampaign(), ccms))); 117 + if (ccms.getLoyaltyCampaignId().equals(dataItem.getCampaign().getSessionUUID())) {
118 - return; 118 + startActivity(WarpViewActivity.createIntentFromURL(this, WarplyManagerHelper.constructCcmsUrl(dataItem.getCampaign(), ccms)));
119 + return;
120 + }
119 } 121 }
122 + } else {
123 + startActivity(WarpViewActivity.createIntentFromURL(this, WarplyManagerHelper.constructCampaignUrl(dataItem.getCampaign())));
120 } 124 }
121 } 125 }
122 startActivity(WarpViewActivity.createIntentFromURL(this, WarplyManagerHelper.constructCampaignUrl(dataItem.getCampaign()))); 126 startActivity(WarpViewActivity.createIntentFromURL(this, WarplyManagerHelper.constructCampaignUrl(dataItem.getCampaign())));
......
...@@ -26,6 +26,14 @@ public class LoyaltyContextualOfferModel { ...@@ -26,6 +26,14 @@ public class LoyaltyContextualOfferModel {
26 private String postpayProduct; 26 private String postpayProduct;
27 private String notificationMessage; 27 private String notificationMessage;
28 private String loyaltyCampaignId; 28 private String loyaltyCampaignId;
29 + private String businessService;
30 + private String UACIOfferTrackingCode;
31 + private String offerCode1;
32 + private String score;
33 + private String zone;
34 + private String wave;
35 + private String validity;
36 + private String offerAudienceLevel;
29 37
30 38
31 public LoyaltyContextualOfferModel() { 39 public LoyaltyContextualOfferModel() {
...@@ -48,6 +56,14 @@ public class LoyaltyContextualOfferModel { ...@@ -48,6 +56,14 @@ public class LoyaltyContextualOfferModel {
48 this.postpayProduct = ""; 56 this.postpayProduct = "";
49 this.notificationMessage = ""; 57 this.notificationMessage = "";
50 this.loyaltyCampaignId = ""; 58 this.loyaltyCampaignId = "";
59 + this.businessService = "";
60 + this.UACIOfferTrackingCode = "";
61 + this.offerCode1 = "";
62 + this.score = "";
63 + this.zone = "";
64 + this.wave = "";
65 + this.validity = "";
66 + this.offerAudienceLevel = "";
51 } 67 }
52 68
53 public String getSessionId() { 69 public String getSessionId() {
...@@ -201,4 +217,68 @@ public class LoyaltyContextualOfferModel { ...@@ -201,4 +217,68 @@ public class LoyaltyContextualOfferModel {
201 public void setLoyaltyCampaignId(String loyaltyCampaignId) { 217 public void setLoyaltyCampaignId(String loyaltyCampaignId) {
202 this.loyaltyCampaignId = loyaltyCampaignId; 218 this.loyaltyCampaignId = loyaltyCampaignId;
203 } 219 }
220 +
221 + public String getBusinessService() {
222 + return businessService;
223 + }
224 +
225 + public void setBusinessService(String businessService) {
226 + this.businessService = businessService;
227 + }
228 +
229 + public String getUACIOfferTrackingCode() {
230 + return UACIOfferTrackingCode;
231 + }
232 +
233 + public void setUACIOfferTrackingCode(String UACIOfferTrackingCode) {
234 + this.UACIOfferTrackingCode = UACIOfferTrackingCode;
235 + }
236 +
237 + public String getOfferCode1() {
238 + return offerCode1;
239 + }
240 +
241 + public void setOfferCode1(String offerCode1) {
242 + this.offerCode1 = offerCode1;
243 + }
244 +
245 + public String getScore() {
246 + return score;
247 + }
248 +
249 + public void setScore(String score) {
250 + this.score = score;
251 + }
252 +
253 + public String getZone() {
254 + return zone;
255 + }
256 +
257 + public void setZone(String zone) {
258 + this.zone = zone;
259 + }
260 +
261 + public String getWave() {
262 + return wave;
263 + }
264 +
265 + public void setWave(String wave) {
266 + this.wave = wave;
267 + }
268 +
269 + public String getValidity() {
270 + return validity;
271 + }
272 +
273 + public void setValidity(String validity) {
274 + this.validity = validity;
275 + }
276 +
277 + public String getOfferAudienceLevel() {
278 + return offerAudienceLevel;
279 + }
280 +
281 + public void setOfferAudienceLevel(String offerAudienceLevel) {
282 + this.offerAudienceLevel = offerAudienceLevel;
283 + }
204 } 284 }
......