Showing
4 changed files
with
22 additions
and
2 deletions
... | @@ -36,7 +36,7 @@ public class SplashActivity extends BaseActivity { | ... | @@ -36,7 +36,7 @@ public class SplashActivity extends BaseActivity { |
36 | public void onWarplyReady() { | 36 | public void onWarplyReady() { |
37 | if (!WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) { | 37 | if (!WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) { |
38 | WarplyManager.getCosmoteUser(new WarplyCosmoteUserRequest() | 38 | WarplyManager.getCosmoteUser(new WarplyCosmoteUserRequest() |
39 | - .setGuid("6012049139"), //6012049321, 6012049322, 6012049323 | 39 | + .setGuid("7000001025"), //6012049321, 6012049322, 6012049323 |
40 | mLoginReceiver); | 40 | mLoginReceiver); |
41 | } else { | 41 | } else { |
42 | startNextActivity(); | 42 | startNextActivity(); | ... | ... |
... | @@ -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-cosbeta57' | 5 | + PUBLISH_VERSION = '4.5.4-cosbeta58' |
6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' |
7 | } | 7 | } |
8 | 8 | ... | ... |
... | @@ -94,6 +94,7 @@ public class WarplyManagerHelper { | ... | @@ -94,6 +94,7 @@ public class WarplyManagerHelper { |
94 | private static CustomerStateModel mCustomerStateModel = new CustomerStateModel(); | 94 | private static CustomerStateModel mCustomerStateModel = new CustomerStateModel(); |
95 | private static CampaignList mCampaignList = new CampaignList(); | 95 | private static CampaignList mCampaignList = new CampaignList(); |
96 | private static CampaignList mCampaignListAll = new CampaignList(); | 96 | private static CampaignList mCampaignListAll = new CampaignList(); |
97 | + private static CampaignList mCarouselList = new CampaignList(); | ||
97 | private static ArrayList<ActiveDFYCouponModel> mDfyCoupons = new ArrayList(); | 98 | private static ArrayList<ActiveDFYCouponModel> mDfyCoupons = new ArrayList(); |
98 | private static ArrayList<LoyaltyGiftsForYouPackage> mSeasonalList = new ArrayList<>(); | 99 | private static ArrayList<LoyaltyGiftsForYouPackage> mSeasonalList = new ArrayList<>(); |
99 | private static ArrayList<LoyaltyContextualOfferModel> mCCMSList = new ArrayList<>(); | 100 | private static ArrayList<LoyaltyContextualOfferModel> mCCMSList = new ArrayList<>(); |
... | @@ -957,6 +958,15 @@ public class WarplyManagerHelper { | ... | @@ -957,6 +958,15 @@ public class WarplyManagerHelper { |
957 | } | 958 | } |
958 | } | 959 | } |
959 | 960 | ||
961 | + public static void setCarouselList(CampaignList carouselList) { | ||
962 | + mCarouselList.clear(); | ||
963 | + mCarouselList.addAll(carouselList); | ||
964 | + } | ||
965 | + | ||
966 | + public static CampaignList getCarouselList() { | ||
967 | + return mCarouselList; | ||
968 | + } | ||
969 | + | ||
960 | public static CampaignList getCampaignList() { | 970 | public static CampaignList getCampaignList() { |
961 | return mCampaignList; | 971 | return mCampaignList; |
962 | } | 972 | } | ... | ... |
... | @@ -1399,7 +1399,16 @@ public class WarplyManager { | ... | @@ -1399,7 +1399,16 @@ public class WarplyManager { |
1399 | Collections.sort(mNewCampaignList, (obj1, obj2) -> Integer.compare(obj1.getSorting(), obj2.getSorting())); | 1399 | Collections.sort(mNewCampaignList, (obj1, obj2) -> Integer.compare(obj1.getSorting(), obj2.getSorting())); |
1400 | CampaignList campaignLoyaltyList = new CampaignList(); | 1400 | CampaignList campaignLoyaltyList = new CampaignList(); |
1401 | campaignLoyaltyList.clear(); | 1401 | campaignLoyaltyList.clear(); |
1402 | + CampaignList campaignCarouselList = new CampaignList(); | ||
1403 | + campaignCarouselList.clear(); | ||
1402 | for (Campaign camp : mNewCampaignList) { | 1404 | for (Campaign camp : mNewCampaignList) { |
1405 | + JSONObject campMetadata = WarpJSONParser.getJSONFromString(camp.getExtraFields()); | ||
1406 | + if (campMetadata != null) { | ||
1407 | + if (campMetadata.has("carousel")) { | ||
1408 | + campaignCarouselList.add(camp); | ||
1409 | + } | ||
1410 | + } | ||
1411 | + | ||
1403 | if (camp.getOfferCategory().equals("questionnaire")) { | 1412 | if (camp.getOfferCategory().equals("questionnaire")) { |
1404 | if (WarplyManagerHelper.getConsumerInternal() != null) { | 1413 | if (WarplyManagerHelper.getConsumerInternal() != null) { |
1405 | JSONObject profMetadata = WarpJSONParser.getJSONFromString(WarplyManagerHelper.getConsumerInternal().getProfileMetadata()); | 1414 | JSONObject profMetadata = WarpJSONParser.getJSONFromString(WarplyManagerHelper.getConsumerInternal().getProfileMetadata()); |
... | @@ -1454,6 +1463,7 @@ public class WarplyManager { | ... | @@ -1454,6 +1463,7 @@ public class WarplyManager { |
1454 | } | 1463 | } |
1455 | } | 1464 | } |
1456 | WarplyManagerHelper.setCampaignList(mNewCampaignList); | 1465 | WarplyManagerHelper.setCampaignList(mNewCampaignList); |
1466 | + WarplyManagerHelper.setCarouselList(campaignCarouselList); | ||
1457 | 1467 | ||
1458 | // ArrayList<LoyaltyContextualOfferModel> list = new ArrayList<>(); | 1468 | // ArrayList<LoyaltyContextualOfferModel> list = new ArrayList<>(); |
1459 | // JSONArray jArray = null; | 1469 | // JSONArray jArray = null; | ... | ... |
-
Please register or login to post a comment