Panagiotis Triantafyllou

new keys

...@@ -1325,27 +1325,21 @@ public enum Warply { ...@@ -1325,27 +1325,21 @@ public enum Warply {
1325 super.onResult(json, errorCode); 1325 super.onResult(json, errorCode);
1326 1326
1327 if (json != null) { 1327 if (json != null) {
1328 - if (!WarpUtils.getIsDeviceInfoSaved(mContext.get())) { 1328 + // OLD LOGIC //
1329 - WarpUtils.setIsDeviceInfoSaved(mContext.get(), true); 1329 +// if (!WarpUtils.getIsDeviceInfoSaved(mContext.get())) {
1330 - WarpUtils.setDeviceInfoObject(mContext.get(), json); 1330 +// WarpUtils.setIsDeviceInfoSaved(mContext.get(), true);
1331 - postMicroappData(WarpConstants.MICROAPP_DEVICE_INFO, json, true); 1331 +// WarpUtils.setDeviceInfoObject(mContext.get(), json);
1332 - } else { 1332 +// postMicroappData(WarpConstants.MICROAPP_DEVICE_INFO, json, true);
1333 - if (hasDeviceInfoDifference(WarpUtils.getDeviceInfoObject(mContext.get()), json)) { 1333 +// } else {
1334 - WarpUtils.setDeviceInfoObject(mContext.get(), json); 1334 +// if (hasDeviceInfoDifference(WarpUtils.getDeviceInfoObject(mContext.get()), json)) {
1335 - postMicroappData(WarpConstants.MICROAPP_DEVICE_INFO, json, true); 1335 +// WarpUtils.setDeviceInfoObject(mContext.get(), json);
1336 - } 1336 +// postMicroappData(WarpConstants.MICROAPP_DEVICE_INFO, json, true);
1337 - } 1337 +// }
1338 +// }
1339 + // OLD LOGIC //
1338 1340
1339 -//// if (WarplyProperty.isSendPackages(mContext.get())) { 1341 + // NEW LOGIC - REVERT IF NEEDED //
1340 -//// json = deviceInfoCollector.getInstalledPackages(true); 1342 + postMicroappData(WarpConstants.MICROAPP_DEVICE_INFO, json, true);
1341 -//// if (json != null) {
1342 -////
1343 -//// WarpUtils.log("********** Installed Packages **********");
1344 -//// WarpUtils.log(json.toString());
1345 -//// WarpUtils.log("********************************");
1346 -//// postMicroappData(WarpConstants.MICROAPP_USER_PACKAGES, json, true);
1347 -//// }
1348 -//// }
1349 } 1343 }
1350 } 1344 }
1351 }); 1345 });
......
...@@ -73,6 +73,7 @@ import ly.warp.sdk.io.models.PushCampaign; ...@@ -73,6 +73,7 @@ import ly.warp.sdk.io.models.PushCampaign;
73 import ly.warp.sdk.io.models.WarplyCouponsChangedEventModel; 73 import ly.warp.sdk.io.models.WarplyCouponsChangedEventModel;
74 import ly.warp.sdk.io.request.CosmoteRetrieveSharingRequest; 74 import ly.warp.sdk.io.request.CosmoteRetrieveSharingRequest;
75 import ly.warp.sdk.io.request.CosmoteSharingRequest; 75 import ly.warp.sdk.io.request.CosmoteSharingRequest;
76 +import ly.warp.sdk.io.request.WarplyEditConsumerRequest;
76 import ly.warp.sdk.io.request.WarplyIntegrationRequest; 77 import ly.warp.sdk.io.request.WarplyIntegrationRequest;
77 import ly.warp.sdk.io.request.WarplyUserCouponsRequest; 78 import ly.warp.sdk.io.request.WarplyUserCouponsRequest;
78 import ly.warp.sdk.services.EventService; 79 import ly.warp.sdk.services.EventService;
...@@ -947,6 +948,29 @@ public class WarplyManagerHelper { ...@@ -947,6 +948,29 @@ public class WarplyManagerHelper {
947 }); 948 });
948 } 949 }
949 950
951 + public static void setTrackersEnabled(boolean isEnabled) {
952 + JSONObject obj = new JSONObject();
953 + try {
954 + obj.putOpt("trackers_enabled", isEnabled);
955 + } catch (JSONException e) {
956 + e.printStackTrace();
957 + }
958 +
959 + WarplyManager.editConsumer(new WarplyEditConsumerRequest()
960 + .setHasProfileMetadata(true)
961 + .setProfileMetadata(obj), new CallbackReceiver<JSONObject>() {
962 + @Override
963 + public void onSuccess(JSONObject result) {
964 + WarpUtils.log("EDIT CONSUMER SUCCESS");
965 + }
966 +
967 + @Override
968 + public void onFailure(int errorCode) {
969 + WarpUtils.log("EDIT CONSUMER FAILED");
970 + }
971 + });
972 + }
973 +
950 /** 974 /**
951 * Get if customer is nonTelco and if he/she has accepted the consents 975 * Get if customer is nonTelco and if he/she has accepted the consents
952 * And his msisdn list 976 * And his msisdn list
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
13 <string name="cos_profile_type">Traveller</string> 13 <string name="cos_profile_type">Traveller</string>
14 <string name="header_add">Προσθήκη</string> 14 <string name="header_add">Προσθήκη</string>
15 <string name="cos_profile_reward">My Loyalty\nWallet</string> 15 <string name="cos_profile_reward">My Loyalty\nWallet</string>
16 - <string name="cos_profile_title">Rewards</string> 16 + <string name="cos_profile_title">My Rewards</string>
17 <string name="cos_deals_title">Deals for You</string> 17 <string name="cos_deals_title">Deals for You</string>
18 <string name="cos_profile_more">Δες περισσότερα</string> 18 <string name="cos_profile_more">Δες περισσότερα</string>
19 <string name="cos_gifts_title">GIFTS for YOU</string> 19 <string name="cos_gifts_title">GIFTS for YOU</string>
......