Panagiotis Triantafyllou

minor fixes

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4-cosbeta38'
PUBLISH_VERSION = '4.5.4-cosbeta39'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -147,6 +147,11 @@
android:permission="android.permission.BIND_JOB_SERVICE" />
<service
android:name="ly.warp.sdk.services.EventCampaignService"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" />
<service
android:name="ly.warp.sdk.services.WarplyBeaconsRangingService"
android:exported="false" />
......
......@@ -11,6 +11,8 @@ import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.appcompat.app.AlertDialog;
import androidx.work.OneTimeWorkRequest;
import androidx.work.WorkManager;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
......@@ -18,12 +20,18 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy;
import org.json.JSONObject;
import ly.warp.sdk.R;
import ly.warp.sdk.Warply;
import ly.warp.sdk.io.callbacks.CallbackReceiver;
import ly.warp.sdk.io.models.Campaign;
import ly.warp.sdk.io.models.CampaignList;
import ly.warp.sdk.io.models.Coupon;
import ly.warp.sdk.io.models.CouponList;
import ly.warp.sdk.io.models.Couponset;
import ly.warp.sdk.io.request.WarplyGetCampaignsRequest;
import ly.warp.sdk.io.request.WarplyRedeemCouponRequest;
import ly.warp.sdk.io.request.WarplyUserCouponsRequest;
import ly.warp.sdk.services.EventCampaignService;
import ly.warp.sdk.services.EventService;
import ly.warp.sdk.utils.managers.WarplyManager;
......@@ -45,6 +53,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
private Coupon mCoupon;
private boolean mIsTermsPressed = false;
private AlertDialog mAlertDialogCouponset;
private Campaign mLoyalty;
// ===========================================================
// Methods for/from SuperClass/Interfaces
......@@ -56,6 +65,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
setContentView(R.layout.activity_couponset_info);
mCouponset = (Couponset) getIntent().getSerializableExtra("couponset");
mLoyalty = (Campaign) getIntent().getSerializableExtra("loyalty");
mIvBack = findViewById(R.id.iv_couponset_info_back);
mTvTerms = findViewById(R.id.tv_terms);
......@@ -84,7 +94,9 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
}
if (view.getId() == R.id.ll_get_gift) {
mPbLoading.setVisibility(View.VISIBLE);
WarplyManager.redeemCoupon(new WarplyRedeemCouponRequest().setCouponsetUuid(mCouponset.getUuid()), mRedeemCouponCallback);
WarplyManager.redeemCoupon(new WarplyRedeemCouponRequest()
.setCouponsetUuid(mCouponset.getUuid())
.setCommunicationUuid(mLoyalty.getSessionUUID()), mRedeemCouponCallback);
return;
}
if (view.getId() == R.id.ll_terms_inner) {
......@@ -143,6 +155,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
new Thread(() -> {
if (!Thread.currentThread().isInterrupted()) {
WarplyManager.getUserCouponsWithCouponsets(new WarplyUserCouponsRequest(), mUserCouponsReceiver);
WarplyManager.getCampaigns(new WarplyGetCampaignsRequest().setLanguage("en"), mCampaignsCallback);
}
}).start();
showDialog(true, 1);
......@@ -206,8 +219,22 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
private final CallbackReceiver<CouponList> mUserCouponsReceiver = new CallbackReceiver<CouponList>() {
@Override
public void onSuccess(CouponList result) {
// Thread.currentThread().interrupt();
}
@Override
public void onFailure(int errorCode) {
Thread.currentThread().interrupt();
}
};
private CallbackReceiver<CampaignList> mCampaignsCallback = new CallbackReceiver<CampaignList>() {
@Override
public void onSuccess(CampaignList result) {
OneTimeWorkRequest mywork = new OneTimeWorkRequest.Builder(EventCampaignService.class).build();
WorkManager.getInstance(CouponsetInfoActivity.this).enqueue(mywork);
// Thread.currentThread().interrupt();
}
@Override
public void onFailure(int errorCode) {
......
......@@ -127,7 +127,7 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
@Subscribe()
public void onMessageEvent(WarplyEventBusManager event) {
if (event.getCcmsAdded() != null) {
if (event.getCcmsAdded() != null || event.getCampaignsAdded() != null) {
filterItems();
if (WarplyManagerHelper.getSeasonalList() != null && WarplyManagerHelper.getSeasonalList().size() > 0) {
......@@ -161,6 +161,7 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
if (cpns.getUuid().equals(cpnUuid)) {
Intent intent = new Intent(GiftsForYouActivity.this, CouponsetInfoActivity.class);
intent.putExtra("couponset", (Serializable) cpns);
intent.putExtra("loyalty", (Serializable) dataItem.getCampaign());
startActivity(intent);
break;
}
......@@ -254,6 +255,7 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
if (cpns.getUuid().equals(cpnUuid)) {
Intent intent = new Intent(GiftsForYouActivity.this, CouponsetInfoActivity.class);
intent.putExtra("couponset", (Serializable) cpns);
intent.putExtra("loyalty", (Serializable) dataItem.getCampaign());
startActivity(intent);
break;
}
......
/*
* Copyright 2010-2013 Warply Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE WARPLY LTD ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL WARPLY LTD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package ly.warp.sdk.io.models;
/**
* Created by Panagiotis Triantafyllou on 21-July-22.
*/
public class LoyaltyEventModel {
private boolean success;
public LoyaltyEventModel() {
this.success = true;
}
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
}
......@@ -25,6 +25,7 @@ public class WarplyRedeemCouponRequest {
private final String KEY_ACTION = "action";
private final String KEY_ACTION_VALUE = "retrieve_coupon";
private final String KEY_COUPONSET = "coupon_set";
private final String KEY_COMMUNICATION_UUID = "communication_uuid";
// ===========================================================
// Fields
......@@ -33,6 +34,7 @@ public class WarplyRedeemCouponRequest {
private HashMap<String, String> mFilters;
private long mCacheUpdateInterval = 0;
private String mCouponsetUuid = "";
private String mCommunicationUuid = "";
// ===========================================================
// Constructor
......@@ -83,6 +85,11 @@ public class WarplyRedeemCouponRequest {
return this;
}
public WarplyRedeemCouponRequest setCommunicationUuid(String uuid) {
mCommunicationUuid = uuid;
return this;
}
/**
* Call this to get how often the cached data will be updated.
*
......@@ -145,6 +152,7 @@ public class WarplyRedeemCouponRequest {
try {
bodyJsonObject.putOpt(KEY_ACTION, KEY_ACTION_VALUE);
bodyJsonObject.putOpt(KEY_COUPONSET, mCouponsetUuid);
bodyJsonObject.putOpt(KEY_COMMUNICATION_UUID, mCommunicationUuid);
} catch (JSONException e) {
if (WarpConstants.DEBUG)
e.printStackTrace();
......
package ly.warp.sdk.services;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.work.Worker;
import androidx.work.WorkerParameters;
import org.greenrobot.eventbus.EventBus;
import ly.warp.sdk.io.models.LoyaltyEventModel;
import ly.warp.sdk.utils.managers.WarplyEventBusManager;
/**
* Created by Panagiotis Triantafyllou on 21/Ιουλ/2022.
*/
public class EventCampaignService extends Worker {
public EventCampaignService(@NonNull Context context, @NonNull WorkerParameters workerParams) {
super(context, workerParams);
}
@NonNull
@Override
public Result doWork() {
LoyaltyEventModel campaignsAdded = new LoyaltyEventModel();
EventBus.getDefault().post(new WarplyEventBusManager(campaignsAdded));
return Result.success();
}
}
......@@ -34,7 +34,6 @@ import androidx.appcompat.app.AlertDialog;
import androidx.work.OneTimeWorkRequest;
import androidx.work.WorkManager;
import org.greenrobot.eventbus.EventBus;
import org.json.JSONObject;
import java.io.Serializable;
......@@ -44,8 +43,6 @@ import java.util.HashMap;
import ly.warp.sdk.R;
import ly.warp.sdk.Warply;
import ly.warp.sdk.activities.CouponsetInfoActivity;
import ly.warp.sdk.activities.GiftsForYouActivity;
import ly.warp.sdk.activities.MoreForYouActivity;
import ly.warp.sdk.activities.TelcoActivity;
import ly.warp.sdk.activities.WarpViewActivity;
import ly.warp.sdk.db.WarplyDBHelper;
......@@ -54,7 +51,6 @@ import ly.warp.sdk.io.models.ActiveDFYCouponModel;
import ly.warp.sdk.io.models.Campaign;
import ly.warp.sdk.io.models.CampaignList;
import ly.warp.sdk.io.models.Consumer;
import ly.warp.sdk.io.models.ContexualEventModel;
import ly.warp.sdk.io.models.Coupon;
import ly.warp.sdk.io.models.CouponList;
import ly.warp.sdk.io.models.Couponset;
......@@ -67,7 +63,6 @@ import ly.warp.sdk.io.request.CosmoteRetrieveSharingRequest;
import ly.warp.sdk.io.request.CosmoteSharingRequest;
import ly.warp.sdk.io.request.WarplyIntegrationRequest;
import ly.warp.sdk.services.EventService;
import ly.warp.sdk.utils.managers.WarplyEventBusManager;
import ly.warp.sdk.utils.managers.WarplyManager;
/**
......@@ -502,6 +497,7 @@ public class WarplyManagerHelper {
if (cpns.getUuid().equals(cpnUuid)) {
Intent intent = new Intent(context, CouponsetInfoActivity.class);
intent.putExtra("couponset", (Serializable) cpns);
intent.putExtra("loyalty", (Serializable) item);
context.startActivity(intent);
break;
}
......@@ -557,8 +553,8 @@ public class WarplyManagerHelper {
* Open Questionnaire
*/
public static String openQuestionnaire() {
if (mCampaignList != null && mCampaignList.size() > 0) {
for (Campaign camp : mCampaignList) {
if (mCampaignListAll != null && mCampaignListAll.size() > 0) {
for (Campaign camp : mCampaignListAll) {
if (camp.getOfferCategory().equals("questionnaire")) {
return constructCampaignUrl(camp);
}
......@@ -572,8 +568,8 @@ public class WarplyManagerHelper {
* Open Pacing
*/
public static String openPacing() {
if (mCampaignList != null && mCampaignList.size() > 0) {
for (Campaign camp : mCampaignList) {
if (mCampaignListAll != null && mCampaignListAll.size() > 0) {
for (Campaign camp : mCampaignListAll) {
if (camp.getOfferCategory().equals("pacing")) {
String pacingUrl = constructCampaignUrl(camp);
WarpUtils.log("PACING_LOG: " + pacingUrl);
......@@ -598,6 +594,7 @@ public class WarplyManagerHelper {
if (cpns.getUuid().equals(cpnUuid)) {
Intent intent = new Intent(context, CouponsetInfoActivity.class);
intent.putExtra("couponset", (Serializable) cpns);
intent.putExtra("loyalty", (Serializable) item);
context.startActivity(intent);
break;
}
......
......@@ -6,6 +6,7 @@ import ly.warp.sdk.io.models.ActiveDFYCouponEventModel;
import ly.warp.sdk.io.models.ContexualEventModel;
import ly.warp.sdk.io.models.CouponEventModel;
import ly.warp.sdk.io.models.LoyaltyContextualOfferModel;
import ly.warp.sdk.io.models.LoyaltyEventModel;
import ly.warp.sdk.io.models.LoyaltyGiftsForYouOfferClickEvent;
import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
import ly.warp.sdk.io.models.QuestionnaireEventModel;
......@@ -33,6 +34,7 @@ public class WarplyEventBusManager {
private CouponEventModel coupon;
private ActiveDFYCouponEventModel activeCoupon;
private ContexualEventModel ccmsAdded;
private LoyaltyEventModel campaignsAdded;
public WarplyEventBusManager() {
......@@ -50,6 +52,10 @@ public class WarplyEventBusManager {
this.ccmsAdded = ccmsAdded;
}
public WarplyEventBusManager(LoyaltyEventModel campaignsAdded) {
this.campaignsAdded = campaignsAdded;
}
public WarplyEventBusManager(CouponEventModel coupon) {
this.coupon = coupon;
}
......@@ -167,4 +173,8 @@ public class WarplyEventBusManager {
public ContexualEventModel getCcmsAdded() {
return ccmsAdded;
}
public LoyaltyEventModel getCampaignsAdded() {
return campaignsAdded;
}
}
......
......@@ -1387,510 +1387,510 @@ public class WarplyManager {
}
WarplyManagerHelper.setCampaignList(mNewCampaignList);
// 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);
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);
receiver.onSuccess(campaignLoyaltyList); //result
}
......