Panagiotis Triantafyllou

new keys

......@@ -1325,27 +1325,21 @@ public enum Warply {
super.onResult(json, errorCode);
if (json != null) {
if (!WarpUtils.getIsDeviceInfoSaved(mContext.get())) {
WarpUtils.setIsDeviceInfoSaved(mContext.get(), true);
WarpUtils.setDeviceInfoObject(mContext.get(), json);
postMicroappData(WarpConstants.MICROAPP_DEVICE_INFO, json, true);
} else {
if (hasDeviceInfoDifference(WarpUtils.getDeviceInfoObject(mContext.get()), json)) {
WarpUtils.setDeviceInfoObject(mContext.get(), json);
postMicroappData(WarpConstants.MICROAPP_DEVICE_INFO, json, true);
}
}
// OLD LOGIC //
// if (!WarpUtils.getIsDeviceInfoSaved(mContext.get())) {
// WarpUtils.setIsDeviceInfoSaved(mContext.get(), true);
// WarpUtils.setDeviceInfoObject(mContext.get(), json);
// postMicroappData(WarpConstants.MICROAPP_DEVICE_INFO, json, true);
// } else {
// if (hasDeviceInfoDifference(WarpUtils.getDeviceInfoObject(mContext.get()), json)) {
// WarpUtils.setDeviceInfoObject(mContext.get(), json);
// postMicroappData(WarpConstants.MICROAPP_DEVICE_INFO, json, true);
// }
// }
// OLD LOGIC //
//// if (WarplyProperty.isSendPackages(mContext.get())) {
//// json = deviceInfoCollector.getInstalledPackages(true);
//// if (json != null) {
////
//// WarpUtils.log("********** Installed Packages **********");
//// WarpUtils.log(json.toString());
//// WarpUtils.log("********************************");
//// postMicroappData(WarpConstants.MICROAPP_USER_PACKAGES, json, true);
//// }
//// }
// NEW LOGIC - REVERT IF NEEDED //
postMicroappData(WarpConstants.MICROAPP_DEVICE_INFO, json, true);
}
}
});
......
......@@ -73,6 +73,7 @@ import ly.warp.sdk.io.models.PushCampaign;
import ly.warp.sdk.io.models.WarplyCouponsChangedEventModel;
import ly.warp.sdk.io.request.CosmoteRetrieveSharingRequest;
import ly.warp.sdk.io.request.CosmoteSharingRequest;
import ly.warp.sdk.io.request.WarplyEditConsumerRequest;
import ly.warp.sdk.io.request.WarplyIntegrationRequest;
import ly.warp.sdk.io.request.WarplyUserCouponsRequest;
import ly.warp.sdk.services.EventService;
......@@ -947,6 +948,29 @@ public class WarplyManagerHelper {
});
}
public static void setTrackersEnabled(boolean isEnabled) {
JSONObject obj = new JSONObject();
try {
obj.putOpt("trackers_enabled", isEnabled);
} catch (JSONException e) {
e.printStackTrace();
}
WarplyManager.editConsumer(new WarplyEditConsumerRequest()
.setHasProfileMetadata(true)
.setProfileMetadata(obj), new CallbackReceiver<JSONObject>() {
@Override
public void onSuccess(JSONObject result) {
WarpUtils.log("EDIT CONSUMER SUCCESS");
}
@Override
public void onFailure(int errorCode) {
WarpUtils.log("EDIT CONSUMER FAILED");
}
});
}
/**
* Get if customer is nonTelco and if he/she has accepted the consents
* And his msisdn list
......
......@@ -13,7 +13,7 @@
<string name="cos_profile_type">Traveller</string>
<string name="header_add">Προσθήκη</string>
<string name="cos_profile_reward">My Loyalty\nWallet</string>
<string name="cos_profile_title">Rewards</string>
<string name="cos_profile_title">My Rewards</string>
<string name="cos_deals_title">Deals for You</string>
<string name="cos_profile_more">Δες περισσότερα</string>
<string name="cos_gifts_title">GIFTS for YOU</string>
......