Panagiotis Triantafyllou

added missing event

...@@ -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.6rc34' 5 + PUBLISH_VERSION = '4.5.4.6rc35'
6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk' 6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
7 } 7 }
8 8
......
...@@ -28,6 +28,7 @@ import ly.warp.sdk.io.callbacks.CallbackReceiver; ...@@ -28,6 +28,7 @@ import ly.warp.sdk.io.callbacks.CallbackReceiver;
28 import ly.warp.sdk.io.models.Consumer; 28 import ly.warp.sdk.io.models.Consumer;
29 import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; 29 import ly.warp.sdk.io.models.LoyaltyContextualOfferModel;
30 import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; 30 import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
31 +import ly.warp.sdk.io.models.WarplyCCMSEnabledModel;
31 import ly.warp.sdk.io.request.CosmoteSubmitOrderRequest; 32 import ly.warp.sdk.io.request.CosmoteSubmitOrderRequest;
32 import ly.warp.sdk.io.request.WarplyConsumerRequest; 33 import ly.warp.sdk.io.request.WarplyConsumerRequest;
33 import ly.warp.sdk.utils.managers.WarplyAnalyticsManager; 34 import ly.warp.sdk.utils.managers.WarplyAnalyticsManager;
...@@ -266,6 +267,10 @@ public class ContextualActivity extends Activity implements View.OnClickListener ...@@ -266,6 +267,10 @@ public class ContextualActivity extends Activity implements View.OnClickListener
266 analyticsEvent.setParameter("successful", "true"); 267 analyticsEvent.setParameter("successful", "true");
267 EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); 268 EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
268 269
270 + WarplyCCMSEnabledModel ccmsEnabled = new WarplyCCMSEnabledModel();
271 + ccmsEnabled.setActivated(true);
272 + EventBus.getDefault().post(new WarplyEventBusManager(ccmsEnabled));
273 +
269 if (!isFinishing()) { 274 if (!isFinishing()) {
270 mAlertDialogSuccessActivating = new AlertDialog.Builder(this) 275 mAlertDialogSuccessActivating = new AlertDialog.Builder(this)
271 .setTitle(R.string.cos_dlg_activate_success_title) 276 .setTitle(R.string.cos_dlg_activate_success_title)
......
...@@ -34,6 +34,7 @@ import ly.warp.sdk.io.models.CouponList; ...@@ -34,6 +34,7 @@ import ly.warp.sdk.io.models.CouponList;
34 import ly.warp.sdk.io.models.Couponset; 34 import ly.warp.sdk.io.models.Couponset;
35 import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; 35 import ly.warp.sdk.io.models.LoyaltyContextualOfferModel;
36 import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; 36 import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
37 +import ly.warp.sdk.io.models.WarplyCCMSEnabledModel;
37 import ly.warp.sdk.io.models.WarplyCouponsChangedEventModel; 38 import ly.warp.sdk.io.models.WarplyCouponsChangedEventModel;
38 import ly.warp.sdk.io.request.WarplyGetCampaignsRequest; 39 import ly.warp.sdk.io.request.WarplyGetCampaignsRequest;
39 import ly.warp.sdk.io.request.WarplyRedeemCouponRequest; 40 import ly.warp.sdk.io.request.WarplyRedeemCouponRequest;
...@@ -205,6 +206,12 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe ...@@ -205,6 +206,12 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
205 mPbLoading.setVisibility(View.GONE); 206 mPbLoading.setVisibility(View.GONE);
206 int status = result.optInt("status"); 207 int status = result.optInt("status");
207 if (status == 1) { 208 if (status == 1) {
209 + if (mCcms != null) {
210 + WarplyCCMSEnabledModel ccmsEnabled = new WarplyCCMSEnabledModel();
211 + ccmsEnabled.setActivated(true);
212 + EventBus.getDefault().post(new WarplyEventBusManager(ccmsEnabled));
213 + }
214 +
208 mCoupon = new Coupon(result.optJSONObject("result")); 215 mCoupon = new Coupon(result.optJSONObject("result"));
209 mCoupon.setDescription(mCouponset.getShortDescription()); 216 mCoupon.setDescription(mCouponset.getShortDescription());
210 mCoupon.setImage(mCouponset.getImgPreview()); 217 mCoupon.setImage(mCouponset.getImgPreview());
......
...@@ -31,6 +31,7 @@ import ly.warp.sdk.io.models.Campaign; ...@@ -31,6 +31,7 @@ import ly.warp.sdk.io.models.Campaign;
31 import ly.warp.sdk.io.models.Consumer; 31 import ly.warp.sdk.io.models.Consumer;
32 import ly.warp.sdk.io.models.LoyaltyContextualOfferModel; 32 import ly.warp.sdk.io.models.LoyaltyContextualOfferModel;
33 import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; 33 import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
34 +import ly.warp.sdk.io.models.WarplyCCMSEnabledModel;
34 import ly.warp.sdk.io.request.CosmoteSubmitOrderRequest; 35 import ly.warp.sdk.io.request.CosmoteSubmitOrderRequest;
35 import ly.warp.sdk.io.request.WarplyConsumerRequest; 36 import ly.warp.sdk.io.request.WarplyConsumerRequest;
36 import ly.warp.sdk.utils.managers.WarplyAnalyticsManager; 37 import ly.warp.sdk.utils.managers.WarplyAnalyticsManager;
...@@ -300,6 +301,10 @@ public class TelcoActivity extends Activity implements View.OnClickListener { ...@@ -300,6 +301,10 @@ public class TelcoActivity extends Activity implements View.OnClickListener {
300 analyticsEvent.setParameter("successful", "true"); 301 analyticsEvent.setParameter("successful", "true");
301 EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent)); 302 EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
302 303
304 + WarplyCCMSEnabledModel ccmsEnabled = new WarplyCCMSEnabledModel();
305 + ccmsEnabled.setActivated(true);
306 + EventBus.getDefault().post(new WarplyEventBusManager(ccmsEnabled));
307 +
303 if (!isFinishing()) { 308 if (!isFinishing()) {
304 mAlertDialogSuccessActivating = new AlertDialog.Builder(this) 309 mAlertDialogSuccessActivating = new AlertDialog.Builder(this)
305 .setTitle(R.string.cos_dlg_activate_success_title) 310 .setTitle(R.string.cos_dlg_activate_success_title)
......
...@@ -70,6 +70,7 @@ import ly.warp.sdk.db.WarplyDBHelper; ...@@ -70,6 +70,7 @@ import ly.warp.sdk.db.WarplyDBHelper;
70 import ly.warp.sdk.io.models.CouponEventModel; 70 import ly.warp.sdk.io.models.CouponEventModel;
71 import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel; 71 import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
72 import ly.warp.sdk.io.models.QuestionnaireEventModel; 72 import ly.warp.sdk.io.models.QuestionnaireEventModel;
73 +import ly.warp.sdk.io.models.WarplyCCMSEnabledModel;
73 import ly.warp.sdk.io.models.WarplyPacingCardEventModel; 74 import ly.warp.sdk.io.models.WarplyPacingCardEventModel;
74 import ly.warp.sdk.io.models.WarplyPacingEventModel; 75 import ly.warp.sdk.io.models.WarplyPacingEventModel;
75 import ly.warp.sdk.services.WarplyHealthService; 76 import ly.warp.sdk.services.WarplyHealthService;
...@@ -421,8 +422,10 @@ public class WarpView extends WebView { ...@@ -421,8 +422,10 @@ public class WarpView extends WebView {
421 } 422 }
422 } else if (parts[1].equals("couponRetrieved")) { 423 } else if (parts[1].equals("couponRetrieved")) {
423 EventBus.getDefault().post(new WarplyEventBusManager(new CouponEventModel())); 424 EventBus.getDefault().post(new WarplyEventBusManager(new CouponEventModel()));
424 - } else if (parts[1].equals("couponShared")) { 425 + } else if (parts[1].equals("ccmsRetrieved")) {
425 -// EventBus.getDefault().post(new WarplyEventBusManager(new CouponEventModel())); 426 + WarplyCCMSEnabledModel ccmsEnabled = new WarplyCCMSEnabledModel();
427 + ccmsEnabled.setActivated(true);
428 + EventBus.getDefault().post(new WarplyEventBusManager(ccmsEnabled));
426 } else if (parts[1].equals("steps") && parts[2].equals("widgetDisabled")) { // This is for the pacing widget 429 } else if (parts[1].equals("steps") && parts[2].equals("widgetDisabled")) { // This is for the pacing widget
427 WarplyPacingCardEventModel pacingWidgetVisible = new WarplyPacingCardEventModel(); 430 WarplyPacingCardEventModel pacingWidgetVisible = new WarplyPacingCardEventModel();
428 pacingWidgetVisible.setVisible(false); 431 pacingWidgetVisible.setVisible(false);
......