Panagiotis Triantafyllou

additions

......@@ -16,6 +16,7 @@ import ly.warp.sdk.io.callbacks.SimpleCallbackReceiver;
import ly.warp.sdk.io.callbacks.WarplyReadyCallback;
import ly.warp.sdk.io.request.WarplyConsumerRequest;
import ly.warp.sdk.io.request.WarplyLoginRequest;
import ly.warp.sdk.io.request.WarplyVerifyTicketRequest;
import ly.warp.sdk.utils.WarplyInitializer;
import ly.warp.sdk.utils.managers.WarplyManager;
import warp.ly.android_sdk.R;
......@@ -38,6 +39,12 @@ public class SplashActivity extends BaseActivity {
.setPassword("123456"),
mLoginReceiver
);
// WarplyManager.verifyTicket(new WarplyVerifyTicketRequest()
// .setGuid("6012139059")
// .setTicket("eyJraWQiOiIxMjc3IiwidHlwIjoiSldUIiwiYWxnIjoiUlM1MTIifQ.eyJhdWQiOiJsb3lhbHR5Iiwic3ViIjoiNjAxMjEzOTA1OSIsIm5iZiI6MTY1NTgwMjE4Miwic2NvcGUiOltdLCJraWQiOjEyNzcsImlzcyI6IlBVQkxJQ19DQUxMRVIiLCJleHAiOjE2NTU4MDM5ODIsImlhdCI6MTY1NTgwMjE4Mn0.T5F7QoGd0PFwW4hQ7FhSqxjK0V8RKUmuu7PgXAbfTnpeHuR1Jj8BT3vDNGsVjoF6ZXR3wIouxCnpJroUn0o6bMROk0YI_zFkpinoYF9ByxI2ErJqCAruhpcsNQvbONQaUk9oMTPRI1-B8iYJkofThAKvs98wjqWRDlM30KDTpXI7A3yxY56gVHYzZvfe2uSuNeniw60X5XowZyFrLvzwkdAeIuafQhfGZCvFSP2tTz1apVKh3rv8erLI92MA6xu66bc3MFpTOrKQklQDqmRYL6xcbFNtOk1D_Tb84KjHj7C8Ufg1wWIYkSTi4TtfneSkYkcjZfI2Anbmqm-0mCRKRA"),
// mLoginReceiver
// );
} else {
startNextActivity();
}
......
......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4-cosbeta13'
PUBLISH_VERSION = '4.5.4-cosbeta14'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -194,7 +194,7 @@ public class BaseFragmentActivity extends FragmentActivity implements Navigation
}
}
WarplyManagerHelper.setUniqueCampaignList(mUniqueCampaignList);
WarplyManagerHelper.setUniqueCampaignList(result);
// Thread.currentThread().interrupt();
......
......@@ -26,7 +26,6 @@ import ly.warp.sdk.io.models.Couponset;
import ly.warp.sdk.io.models.CouponsetsList;
import ly.warp.sdk.io.models.LoyaltyContextualOfferModel;
import ly.warp.sdk.io.models.LoyaltyGiftsForYouOfferClickEvent;
import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
import ly.warp.sdk.io.models.MergedGifts;
import ly.warp.sdk.utils.WarpUtils;
import ly.warp.sdk.utils.WarplyManagerHelper;
......
......@@ -153,10 +153,7 @@ public class WarpViewActivity extends WarpBaseActivity {
RelativeLayout.LayoutParams warpViewParams = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.MATCH_PARENT,
RelativeLayout.LayoutParams.MATCH_PARENT);
// warpViewParams.addRule(
// RelativeLayout.SYSTEM_UI_FLAG_LAYOUT_STABLE
// | RelativeLayout.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
// | RelativeLayout.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
root.setFitsSystemWindows(true);
root.addView(mWarpView, warpViewParams);
......
......@@ -57,6 +57,7 @@ public class WarplyManagerHelper {
private static CouponList mCouponList = new CouponList();
private static CouponsetsList mCouponsetsList = new CouponsetsList();
private static CustomerStateModel mCustomerStateModel;
private static CampaignList mCampaignList;
// ===========================================================
// Methods for/from SuperClass/Interfaces
......@@ -81,10 +82,10 @@ public class WarplyManagerHelper {
+ "&client_id=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_id")
+ "&client_secret=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_secret");
if (mConsumer != null)
url = url + "&auth_token=" + (mConsumer.getUuid());
else
url = url + "&auth_token=";
// if (mConsumer != null)
// url = url + "&auth_token=" + (mConsumer.getUuid());
// else
// url = url + "&auth_token=";
return url;
}
......@@ -92,7 +93,10 @@ public class WarplyManagerHelper {
/**
* Open Warply campaign with sharing id
*/
public static String constructCampaignUrlForShare(Campaign item, String deeplink) {
public static String constructCampaignUrlForShare(String sessionUuid, String sharingId) {
if (getCampaignList() != null) {
for (Campaign item : getCampaignList()) {
if (item.getSessionUUID().equals(sessionUuid)) {
String url = item.getIndexUrl()
+ "?web_id=" + WarpUtils.getWebId(Warply.getWarplyContext())
+ "&app_uuid=" + WarplyProperty.getAppUuid(Warply.getWarplyContext())
......@@ -101,16 +105,15 @@ public class WarplyManagerHelper {
+ "&access_token=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("access_token")
+ "&refresh_token=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("refresh_token")
+ "&client_id=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_id")
+ "&client_secret=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_secret");
/*+ "&sharing_id=" + sharingId;*/
if (mConsumer != null)
url = url + "&auth_token=" + (mConsumer.getUuid());
else
url = url + "&auth_token=";
+ "&client_secret=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_secret")
+ "&sharing_id=" + sharingId;
return url;
}
}
}
return "";
}
/**
* Open CCMS campaign
......@@ -203,8 +206,31 @@ public class WarplyManagerHelper {
mConsumer = consumer;
}
public static void setUniqueCampaignList(HashMap<String, CampaignList> uniqueCouponList) {
mUniqueCampaignList = uniqueCouponList;
public static void setUniqueCampaignList(HashMap<String, CampaignList> uniqueCampaignList) {
mUniqueCampaignList = uniqueCampaignList;
}
public static void setUniqueCampaignList(CampaignList campaignList) {
mCampaignList = campaignList;
for (Campaign campaign : campaignList) {
if (mUniqueCampaignList.containsKey(campaign.getOfferCategory().trim())) {
CampaignList tempCampaignList = (CampaignList) mUniqueCampaignList.get(campaign.getOfferCategory().trim());
tempCampaignList.add(campaign);
mUniqueCampaignList.put(campaign.getOfferCategory().trim(), tempCampaignList);
} else {
CampaignList tempCampaignList = new CampaignList();
tempCampaignList.add(campaign);
mUniqueCampaignList.put(campaign.getOfferCategory().trim(), tempCampaignList);
}
}
}
public static void setCampaignList(CampaignList campaignList) {
mCampaignList = campaignList;
}
public static CampaignList getCampaignList() {
return mCampaignList;
}
public static void setCouponList(CouponList couponList) {
......