Panagiotis Triantafyllou

new keys

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4-cosbeta77'
PUBLISH_VERSION = '4.5.4-cosbeta78'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -473,512 +473,8 @@ public enum Warply {
INSTANCE.getInboxInternal(new CallbackReceiver<CampaignList>() {
@Override
public void onSuccess(CampaignList result) {
WarplyManagerHelper.setCampaignList(result);
// ArrayList<LoyaltyContextualOfferModel> list = new ArrayList<>();
// JSONArray jArray = null;
// try {
// jArray = new JSONArray("[\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"5166.e07.fffffffffa10663a.ffffffffda30c76a\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"dataCategory\": \"Data\",\n" +
// " \"dataValue\": \"None\",\n" +
// " \"discount\": \"None\",\n" +
// " \"eligibleAssets\": [\n" +
// " \"306945218770\",\n" +
// " \"306944333488\",\n" +
// " \"306932222490\",\n" +
// " \"306996824010\",\n" +
// " \"306972713201\",\n" +
// " \"306942496252\",\n" +
// " \"306977316716\",\n" +
// " \"306945433100\",\n" +
// " \"306977403986\",\n" +
// " \"306936581495\",\n" +
// " \"306980689662\",\n" +
// " \"306970101490\",\n" +
// " \"306973396329\",\n" +
// " \"306972577064\",\n" +
// " \"306974923219\",\n" +
// " \"306977513761\",\n" +
// " \"306984220987\",\n" +
// " \"306979949205\",\n" +
// " \"306943134127\",\n" +
// " \"306970437794\",\n" +
// " \"306932535319\",\n" +
// " \"306974063133\",\n" +
// " \"306932520323\",\n" +
// " \"306978733823\",\n" +
// " \"306985995420\",\n" +
// " \"306983879555\",\n" +
// " ],\n" +
// " \"id\": \"000003590\",\n" +
// " \"loyaltyCampaignId\": \"NA\",\n" +
// " \"minsValue\": \"None\",\n" +
// " \"noOfRecurrance\": \"None\",\n" +
// " \"notificationMessage\": \"None\",\n" +
// " \"offerAudienceLevel\": \"msisdn\",\n" +
// " \"offerCode1\": \"000003590\",\n" +
// " \"offerName\": \"CCMS loyalty white label\",\n" +
// " \"price\": \"None\",\n" +
// " \"productType\": \"White Label\",\n" +
// " \"provDuration\": \"0.0\",\n" +
// " \"provStepValueMins\": \"None\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"5166.e07.fffffffffa10663a.ffffffffda30c76a\",\n" +
// " \"validity\": \"0\",\n" +
// " \"voiceCategory\": \"None\",\n" +
// " \"wave\": \"1\",\n" +
// " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"51ed.e10.2c006f18.71e96d08\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"dataCategory\": \"Data\",\n" +
// " \"dataValue\": \"233\",\n" +
// " \"discount\": \"None\",\n" +
// " \"eligibleAssets\": [\n" +
// " \"306945218770\",\n" +
// " \"306944333488\",\n" +
// " \"306932222490\",\n" +
// " \"306996824010\",\n" +
// " \"306972713201\",\n" +
// " \"306942496252\",\n" +
// " \"306977316716\",\n" +
// " \"306945433100\",\n" +
// " \"306977403986\",\n" +
// " \"306936581495\",\n" +
// " \"306980689662\",\n" +
// " \"306970101490\",\n" +
// " \"306973396329\",\n" +
// " \"306972577064\",\n" +
// " \"306974923219\",\n" +
// " \"306977513761\",\n" +
// " \"306984220987\",\n" +
// " \"306979949205\",\n" +
// " \"306943134127\",\n" +
// " \"306970437794\",\n" +
// " \"306932535319\",\n" +
// " \"306974063133\",\n" +
// " \"306932520323\",\n" +
// " \"306978733823\",\n" +
// " \"306985995420\",\n" +
// " \"306983879555\",\n" +
// " ],\n" +
// " \"id\": \"000003599\",\n" +
// " \"loyaltyCampaignId\": \"9a92d445956145f6bbc5cd20cef543b9\",\n" + //c5cc5f4f65624f47a580b720233fa60d
// " \"minsValue\": \"None\",\n" +
// " \"noOfRecurrance\": \"None\",\n" +
// " \"notificationMessage\": \"None\",\n" +
// " \"offerAudienceLevel\": \"msisdn\",\n" +
// " \"offerCode1\": \"000003599\",\n" +
// " \"offerName\": \"CCMS loyalty white label with campaignId\",\n" +
// " \"price\": \"None\",\n" +
// " \"productType\": \"White Label\",\n" +
// " \"provDuration\": \"0.0\",\n" +
// " \"provStepValueMins\": \"None\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"51ed.e10.2c006f18.71e96d08\",\n" +
// " \"validity\": \"0\",\n" +
// " \"voiceCategory\": \"None\",\n" +
// " \"wave\": \"1\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test1\",\n" +
// " \"subtitle\": \"Test1\",\n" +
// " \"description\": \"Test1\",\n" +
// " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"516c.e05.ffffffffa943695b.79ff470b\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"businessService\": \"0.0\",\n" +
// " \"eligibleAssets\": [\n" +
// " \"306945218770\",\n" +
// " \"306944333488\",\n" +
// " \"306932222490\",\n" +
// " \"306996824010\",\n" +
// " \"306972713201\",\n" +
// " \"306942496252\",\n" +
// " \"306977316716\",\n" +
// " \"306945433100\",\n" +
// " \"306977403986\",\n" +
// " \"306936581495\",\n" +
// " \"306980689662\",\n" +
// " \"306970101490\",\n" +
// " \"306973396329\",\n" +
// " \"306972577064\",\n" +
// " \"306974923219\",\n" +
// " \"306977513761\",\n" +
// " \"306984220987\",\n" +
// " \"306979949205\",\n" +
// " \"306943134127\",\n" +
// " \"306970437794\",\n" +
// " \"306932535319\",\n" +
// " \"306974063133\",\n" +
// " \"306932520323\",\n" +
// " \"306978733823\",\n" +
// " \"306985995420\",\n" +
// " \"306983879555\",\n" +
// " ],\n" +
// " \"id\": \"000003588\",\n" +
// " \"loyaltyCampaignId\": \"NA\",\n" +
// " \"noOfRecurrance\": \"0\",\n" +
// " \"notificationMessage\": \"None\",\n" +
// " \"offerAudienceLevel\": \"msisdn\",\n" +
// " \"offerCode1\": \"000003588\",\n" +
// " \"offerName\": \"CCMS loyalty postpay addon\",\n" +
// " \"postpayProduct\": \"0.0\",\n" +
// " \"price\": \"None\",\n" +
// " \"productType\": \"MOBILE ADDON\",\n" +
// " \"provDuration\": \"0.0\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"516c.e05.ffffffffa943695b.79ff470b\",\n" +
// " \"validity\": \"0\",\n" +
// " \"wave\": \"1\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test2\",\n" +
// " \"subtitle\": \"Test2\",\n" +
// " \"description\": \"Test2\",\n" +
// " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"5224.e19.30e2f27b.ffffffffeb22b0db\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"dataCategory\": \"Data\",\n" +
// " \"dataValue\": \"None\",\n" +
// " \"discount\": \"None\",\n" +
// " \"eligibleAssets\": [\n" +
// " \"306945218770\",\n" +
// " \"306944333488\",\n" +
// " \"306932222490\",\n" +
// " \"306996824010\",\n" +
// " \"306972713201\",\n" +
// " \"306942496252\",\n" +
// " \"306977316716\",\n" +
// " \"306945433100\",\n" +
// " \"306977403986\",\n" +
// " \"306936581495\",\n" +
// " \"306980689662\",\n" +
// " \"306970101490\",\n" +
// " \"306973396329\",\n" +
// " \"306972577064\",\n" +
// " \"306974923219\",\n" +
// " \"306977513761\",\n" +
// " \"306984220987\",\n" +
// " \"306979949205\",\n" +
// " \"306943134127\",\n" +
// " \"306970437794\",\n" +
// " \"306932535319\",\n" +
// " \"306974063133\",\n" +
// " \"306932520323\",\n" +
// " \"306978733823\",\n" +
// " \"306985995420\",\n" +
// " \"306983879555\",\n" +
// " ],\n" +
// " \"id\": \"000003608\",\n" +
// " \"loyaltyCampaignId\": \"c134cdeb8a924f8eac38e261acb9caf5\",\n" +
// " \"minsValue\": \"None\",\n" +
// " \"noOfRecurrance\": \"None\",\n" +
// " \"notificationMessage\": \"None\",\n" +
// " \"offerAudienceLevel\": \"msisdn\",\n" +
// " \"offerCode1\": \"000003608\",\n" +
// " \"offerName\": \"CCMS loyalty gifts4u v1\",\n" +
// " \"price\": \"None\",\n" +
// " \"productType\": \"White Label\",\n" +
// " \"provDuration\": \"0.0\",\n" +
// " \"provStepValueMins\": \"None\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"5224.e19.30e2f27b.ffffffffeb22b0db\",\n" +
// " \"validity\": \"0\",\n" +
// " \"voiceCategory\": \"None\",\n" +
// " \"wave\": \"1\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test3\",\n" +
// " \"subtitle\": \"Test3\",\n" +
// " \"description\": \"Test3\",\n" +
// " \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"5228.e1d.38378e61.750186c1\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"businessService\": \"0.0\",\n" +
// " \"eligibleAssets\": [\n" +
// " \"306945218770\",\n" +
// " \"306944333488\",\n" +
// " \"306932222490\",\n" +
// " \"306996824010\",\n" +
// " \"306972713201\",\n" +
// " \"306942496252\",\n" +
// " \"306977316716\",\n" +
// " \"306945433100\",\n" +
// " \"306977403986\",\n" +
// " \"306936581495\",\n" +
// " \"306980689662\",\n" +
// " \"306970101490\",\n" +
// " \"306973396329\",\n" +
// " \"306972577064\",\n" +
// " \"306974923219\",\n" +
// " \"306977513761\",\n" +
// " \"306984220987\",\n" +
// " \"306979949205\",\n" +
// " \"306943134127\",\n" +
// " \"306970437794\",\n" +
// " \"306932535319\",\n" +
// " \"306974063133\",\n" +
// " \"306932520323\",\n" +
// " \"306978733823\",\n" +
// " \"306985995420\",\n" +
// " \"306983879555\",\n" +
// " ],\n" +
// " \"id\": \"000003612\",\n" +
// " \"loyaltyCampaignId\": \"8eb71c4ceaff409c896e2d1f6f1c20f3\",\n" +
// " \"noOfRecurrance\": \"0\",\n" +
// " \"notificationMessage\": \"None\",\n" +
// " \"offerAudienceLevel\": \"msisdn\",\n" +
// " \"offerCode1\": \"000003612\",\n" +
// " \"offerName\": \"CCMS loyalty - postpay addon gifts4u\",\n" +
// " \"postpayProduct\": \"0.0\",\n" +
// " \"price\": \"None\",\n" +
// " \"productType\": \"MOBILE ADDON\",\n" +
// " \"provDuration\": \"0.0\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"5228.e1d.38378e61.750186c1\",\n" +
// " \"validity\": \"0\",\n" +
// " \"wave\": \"1\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test4\",\n" +
// " \"subtitle\": \"Test4\",\n" +
// " \"description\": \"Test4\",\n" +
// " \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"5222.e1b.ffffffffe725d1b3.ffffffffed6d8723\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"dataCategory\": \"Data\",\n" +
// " \"dataValue\": \"None\",\n" +
// " \"discount\": \"None\",\n" +
// " \"eligibleAssets\": [\n" +
// " \"306945218770\",\n" +
// " \"306944333488\",\n" +
// " \"306932222490\",\n" +
// " \"306996824010\",\n" +
// " \"306972713201\",\n" +
// " \"306942496252\",\n" +
// " \"306977316716\",\n" +
// " \"306945433100\",\n" +
// " \"306977403986\",\n" +
// " \"306936581495\",\n" +
// " \"306980689662\",\n" +
// " \"306970101490\",\n" +
// " \"306973396329\",\n" +
// " \"306972577064\",\n" +
// " \"306974923219\",\n" +
// " \"306977513761\",\n" +
// " \"306984220987\",\n" +
// " \"306979949205\",\n" +
// " \"306943134127\",\n" +
// " \"306970437794\",\n" +
// " \"306932535319\",\n" +
// " \"306974063133\",\n" +
// " \"306932520323\",\n" +
// " \"306978733823\",\n" +
// " \"306985995420\",\n" +
// " \"306983879555\",\n" +
// " ],\n" +
// " \"id\": \"000003610\",\n" +
// " \"loyaltyCampaignId\": \"8e2c88ec94c948d8b51577324ed9a4d5\",\n" +
// " \"minsValue\": \"None\",\n" +
// " \"noOfRecurrance\": \"None\",\n" +
// " \"notificationMessage\": \"None\",\n" +
// " \"offerAudienceLevel\": \"msisdn\",\n" +
// " \"offerCode1\": \"000003610\",\n" +
// " \"offerName\": \"CCMS loyalty more4u v1\",\n" +
// " \"price\": \"20\",\n" +
// " \"productType\": \"White Label\",\n" +
// " \"provDuration\": \"7.0\",\n" +
// " \"provStepValueMins\": \"None\",\n" +
// " \"score\": \"60\",\n" +
// " \"treatmentCode\": \"5222.e1b.ffffffffe725d1b3.ffffffffed6d8723\",\n" +
// " \"validity\": \"0\",\n" +
// " \"voiceCategory\": \"None\",\n" +
// " \"wave\": \"1\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test5\",\n" +
// " \"subtitle\": \"Test5\",\n" +
// " \"description\": \"Test5\",\n" +
// " \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"5226.e1f.728b68c6.ffffffffa6c7b10e\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"businessService\": \"0.0\",\n" +
// " \"eligibleAssets\": [\n" +
// " \"306945218770\",\n" +
// " \"306944333488\",\n" +
// " \"306932222490\",\n" +
// " \"306996824010\",\n" +
// " \"306972713201\",\n" +
// " \"306942496252\",\n" +
// " \"306977316716\",\n" +
// " \"306945433100\",\n" +
// " \"306977403986\",\n" +
// " \"306936581495\",\n" +
// " \"306980689662\",\n" +
// " \"306970101490\",\n" +
// " \"306973396329\",\n" +
// " \"306972577064\",\n" +
// " \"306974923219\",\n" +
// " \"306977513761\",\n" +
// " \"306984220987\",\n" +
// " \"306979949205\",\n" +
// " \"306943134127\",\n" +
// " \"306970437794\",\n" +
// " \"306932535319\",\n" +
// " \"306974063133\",\n" +
// " \"306932520323\",\n" +
// " \"306978733823\",\n" +
// " \"306985995420\",\n" +
// " \"306983879555\",\n" +
// " ],\n" +
// " \"id\": \"000003614\",\n" +
// " \"loyaltyCampaignId\": \"aaf4022194584f02bb84c7b283c7c51e\",\n" +
// " \"noOfRecurrance\": \"0\",\n" +
// " \"notificationMessage\": \"None\",\n" +
// " \"offerAudienceLevel\": \"msisdn\",\n" +
// " \"offerCode1\": \"000003614\",\n" +
// " \"offerName\": \"CCMS loyalty - postpay addon more4u\",\n" +
// " \"postpayProduct\": \"0.0\",\n" +
// " \"price\": \"None\",\n" +
// " \"productType\": \"MOBILE ADDON\",\n" +
// " \"provDuration\": \"0.0\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"5226.e1f.728b68c6.ffffffffa6c7b10e\",\n" +
// " \"validity\": \"0\",\n" +
// " \"wave\": \"1\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test6\",\n" +
// " \"subtitle\": \"Test6\",\n" +
// " \"description\": \"Test6\",\n" +
// " \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"5154.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"eligibleAssets\": [],\n" +
// " \"id\": \"000003586\",\n" +
// " \"loyaltyCampaignId\": \"NA\",\n" +
// " \"offerAudienceLevel\": \"guid\",\n" +
// " \"offerCode1\": \"000003586\",\n" +
// " \"offerName\": \"CCMS loyalty offer 6\",\n" +
// " \"productType\": \"GENERIC\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"5154.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
// " \"validity\": \"0\",\n" +
// " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"51d2.e0c.291f49d9.40d5a689\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"eligibleAssets\": [],\n" +
// " \"id\": \"000003595\",\n" +
// " \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
// " \"offerAudienceLevel\": \"guid\",\n" +
// " \"offerCode1\": \"000003595\",\n" +
// " \"offerName\": \"CCMS Loyal offer campaignId\",\n" +
// " \"productType\": \"GENERIC\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"51d2.e0c.291f49d9.40d5a689\",\n" +
// " \"validity\": \"0\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test7\",\n" +
// " \"subtitle\": \"Test7\",\n" +
// " \"description\": \"Test7\",\n" +
// " \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"51d6.e0c.291f49d9.40d5a689\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"eligibleAssets\": [],\n" +
// " \"id\": \"000003595\",\n" +
// " \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
// " \"offerAudienceLevel\": \"guid\",\n" +
// " \"offerCode1\": \"000003595\",\n" +
// " \"offerName\": \"CCMS Loyal offer campaignId\",\n" +
// " \"productType\": \"GENERIC\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"51d6.e0c.291f49d9.40d5a689\",\n" +
// " \"validity\": \"0\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test8\",\n" +
// " \"subtitle\": \"Test8\",\n" +
// " \"description\": \"Test8\",\n" +
// " \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"5150.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"eligibleAssets\": [],\n" +
// " \"id\": \"000003586\",\n" +
// " \"loyaltyCampaignId\": \"NA\",\n" +
// " \"offerAudienceLevel\": \"guid\",\n" +
// " \"offerCode1\": \"000003586\",\n" +
// " \"offerName\": \"CCMS loyalty offer 6\",\n" +
// " \"productType\": \"GENERIC\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"5150.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
// " \"validity\": \"0\",\n" +
// " \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"5152.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"eligibleAssets\": [],\n" +
// " \"id\": \"000003586\",\n" +
// " \"loyaltyCampaignId\": \"NA\",\n" +
// " \"offerAudienceLevel\": \"guid\",\n" +
// " \"offerCode1\": \"000003586\",\n" +
// " \"offerName\": \"CCMS loyalty offer 6\",\n" +
// " \"productType\": \"GENERIC\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"5152.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
// " \"validity\": \"0\",\n" +
// " \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
// " },\n" +
// " {\n" +
// " \"UACIOfferTrackingCode\": \"51d4.e0c.291f49d9.40d5a689\",\n" +
// " \"businessAdditionalId\": \"\",\n" +
// " \"eligibleAssets\": [],\n" +
// " \"id\": \"000003595\",\n" +
// " \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
// " \"offerAudienceLevel\": \"guid\",\n" +
// " \"offerCode1\": \"000003595\",\n" +
// " \"offerName\": \"CCMS Loyal offer campaignId\",\n" +
// " \"productType\": \"GENERIC\",\n" +
// " \"score\": \"50\",\n" +
// " \"treatmentCode\": \"51d4.e0c.291f49d9.40d5a689\",\n" +
// " \"validity\": \"0\",\n" +
// " \"imageUrl\": \"https://www.cosmotetvott.gr/assets/images/ogImage.jpg\",\n" +
// " \"title\": \"Test9\",\n" +
// " \"subtitle\": \"Test9\",\n" +
// " \"description\": \"Test9\",\n" +
// " \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
// " }\n" +
// " ]");
// } catch (JSONException e) {
// e.printStackTrace();
// }
// if (jArray != null && jArray.length() > 0) {
// for (int i = 0; i < jArray.length(); i++) {
// JSONObject jobj = new JSONObject();
// jobj = jArray.optJSONObject(i);
// if (jobj != null) {
// LoyaltyContextualOfferModel model = new LoyaltyContextualOfferModel(jobj);
// list.add(model);
// }
// }
// }
// WarplyManagerHelper.setCCMSLoyaltyCampaigns(list);
// WarplyManagerHelper.setCampaignList(result);
if (result.size() >= 0) {
objectSerializer.serialize(result, File.separator + requestSignature);
......@@ -1001,7 +497,7 @@ public enum Warply {
INSTANCE.mLastReceivedCampaigns = result;
if (receiver != null) {
receiver.onSuccess(/*result*/campaignLoyaltyList);
receiver.onSuccess(result/*campaignLoyaltyList*/);
}
}
}
......@@ -1611,8 +1107,11 @@ public enum Warply {
return;
}
// if (WarplyDBHelper.getInstance(mContext.get()).isForceRequestsExist()
// || (requestsInQueue >= MINIMUM_REQUESTS_FOR_SENDING)) {
if (WarplyDBHelper.getInstance(mContext.get()).isForceRequestsExist()
|| (requestsInQueue >= MINIMUM_REQUESTS_FOR_SENDING)) {
|| (requestsInQueue > 0)) {
WarpUtils.log("Waking post task!");
wakeSendingTask();
......
......@@ -317,7 +317,7 @@ public class WarpViewActivity extends WarpBaseActivity {
private void sendSteps() {
String date = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss", Locale.getDefault()).format(new Date());
WarpUtils.log("SEND_STEPS: " + String.valueOf(WarpUtils.getStepsCounter(this)));
if (WarpUtils.getStepsCounter(this) > 0) {
WarplyManager.setPacingDetails(new PacingCalculateRequest()
.setCounter(WarpUtils.getStepsCounter(this))
......
......@@ -213,13 +213,16 @@ public class WarplyHealthService extends Service implements SensorEventListener
&& (timeNs - lastStepTimeNs > STEP_DELAY_NS)) {
WarplyManagerHelper.mStepsWebview++;
sumSteps++;
WarplyManagerHelper.mSteps += WarplyManagerHelper.mStepsWebview;
WarplyManagerHelper.mSteps++;
WarpUtils.log("COUNT_STEPS: " + String.valueOf(WarplyManagerHelper.mSteps));
WarpUtils.setStepsCounter(this, WarplyManagerHelper.mSteps);
WarplyManagerHelper.mMetersWebview = (WarplyManagerHelper.mStepsWebview * 0.762);
WarpUtils.log("WEBVIEW_METERS: " + String.valueOf(WarplyManagerHelper.mMetersWebview));
HealthEventModel healthSteps = new HealthEventModel();
// healthSteps.setMeters((mStepsAll * 0.762)); // 16/09/2022
// healthSteps.setMeters(WarplyManagerHelper.mMetersWebview); // 20/09/2022
eventMeters = (sumSteps * 0.762);
WarpUtils.log("WIDGET_METERS: " + String.valueOf(eventMeters));
healthSteps.setMeters(eventMeters);
EventBus.getDefault().post(new WarplyEventBusManager(healthSteps));
......
......@@ -46,7 +46,9 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import ly.warp.sdk.R;
import ly.warp.sdk.Warply;
......@@ -105,8 +107,8 @@ public class WarplyManagerHelper {
private static CouponList mCouponListExpired = new CouponList();
private static CouponsetsList mCouponsetsList = new CouponsetsList();
private static CustomerStateModel mCustomerStateModel = new CustomerStateModel();
private static CampaignList mCampaignList = new CampaignList();
private static CampaignList mCampaignListAll = new CampaignList();
private static ArrayList<Campaign> mCampaignList = new ArrayList<Campaign>();
private static ArrayList<Campaign> mCampaignListAll = new ArrayList<Campaign>();
private static ArrayList<Campaign> mCarouselList = new ArrayList<Campaign>();
private static ArrayList<ActiveDFYCouponModel> mDfyCoupons = new ArrayList();
private static ArrayList<LoyaltyGiftsForYouPackage> mSeasonalList = new ArrayList<>();
......@@ -1077,7 +1079,7 @@ public class WarplyManagerHelper {
return mCouponListExpired;
}
public static void setUniqueCampaignList(CampaignList campaignList) {
public static void setUniqueCampaignList(ArrayList<Campaign> campaignList) {
mCampaignList.clear();
mCampaignList.addAll(campaignList);
......@@ -1097,12 +1099,12 @@ public class WarplyManagerHelper {
// }
}
public static void setCampaignList(CampaignList campaignList) {
public static void setCampaignList(ArrayList<Campaign> campaignList) {
// mCampaignList.clear();
// mCampaignList.addAll(campaignList);
Set<Campaign> set = new LinkedHashSet<>(campaignList);
mCampaignListAll.clear();
mCampaignListAll.addAll(campaignList);
mCampaignListAll.addAll(set);
mCampaignList.clear();
for (Campaign camp : campaignList) {
......@@ -1132,11 +1134,11 @@ public class WarplyManagerHelper {
return mCarouselList;
}
public static CampaignList getCampaignList() {
public static ArrayList<Campaign> getCampaignList() {
return mCampaignList;
}
public static CampaignList getCampaignListAll() {
public static ArrayList<Campaign> getCampaignListAll() {
return mCampaignListAll;
}
......
......@@ -45,6 +45,8 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.LinkedHashSet;
import java.util.Set;
import ly.warp.sdk.R;
import ly.warp.sdk.Warply;
......@@ -147,7 +149,7 @@ import ly.warp.sdk.utils.constants.WarpConstants;
*/
public class WarplyManager {
private static CampaignList mNewCampaignList = new CampaignList();
private static ArrayList<Campaign> mNewCampaignList = new ArrayList<Campaign>();
public static void getProducts(WarplyProductsRequest request, final CallbackReceiver<ProductList> receiver) {
// String productCategory = "";
......@@ -1372,7 +1374,8 @@ public class WarplyManager {
public void onSuccess(CampaignList result) {
// receiver.onSuccess(result);
mNewCampaignList.clear();
mNewCampaignList.addAll(result);
ArrayList<Campaign> tempCamps = new ArrayList<Campaign>(result);
mNewCampaignList.addAll(tempCamps);
getCampaignsPersonalized(request, new CallbackReceiver<CampaignList>() {
@Override
public void onSuccess(CampaignList resultPersonalized) {
......@@ -1402,7 +1405,8 @@ public class WarplyManager {
Warply.postReceiveMicroappData(WarpConstants.MICROAPP_NEW_CAMPAIGNS, true, "campaignsPersonalized", request.toJson(), new NewCampaignsHook(new CallbackReceiver<CampaignList>() {
@Override
public void onSuccess(CampaignList result) {
mNewCampaignList.addAll(result);
ArrayList<Campaign> tempCamps = new ArrayList<Campaign>(result);
mNewCampaignList.addAll(tempCamps);
Collections.sort(mNewCampaignList, (obj1, obj2) -> Integer.compare(obj1.getSorting(), obj2.getSorting()));
CampaignList campaignLoyaltyList = new CampaignList();
campaignLoyaltyList.clear();
......@@ -2023,7 +2027,11 @@ public class WarplyManager {
// }
// WarplyManagerHelper.setCCMSLoyaltyCampaigns(list);
receiver.onSuccess(campaignLoyaltyList); //result
CampaignList tempAllCamps = new CampaignList();
Set<Campaign> set = new LinkedHashSet<>(campaignLoyaltyList);
tempAllCamps.clear();
tempAllCamps.addAll(set);
receiver.onSuccess(tempAllCamps); //result, //campaignLoyaltyList
}
@Override
......