Panagiotis Triantafyllou

vouchers fixes

1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<project version="4">
3 + <component name="deploymentTargetDropDown">
4 + <targetSelectedWithDropDown>
5 + <Target>
6 + <type value="QUICK_BOOT_TARGET" />
7 + <deviceKey>
8 + <Key>
9 + <type value="VIRTUAL_DEVICE_PATH" />
10 + <value value="$USER_HOME$/.android/avd/Pixel_6a_API_29.avd" />
11 + </Key>
12 + </deviceKey>
13 + </Target>
14 + </targetSelectedWithDropDown>
15 + <timeTargetWasSelectedWithDropDown value="2023-11-28T10:41:57.588318Z" />
16 + </component>
17 +</project>
...\ No newline at end of file ...\ No newline at end of file
...@@ -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.5.4r3' 5 + PUBLISH_VERSION = '4.5.5.4r4'
6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk' 6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
7 } 7 }
8 8
......
...@@ -180,6 +180,38 @@ public class WarplyManagerHelper { ...@@ -180,6 +180,38 @@ public class WarplyManagerHelper {
180 return url; 180 return url;
181 } 181 }
182 182
183 + private static String constructCampaignUrl(Campaign item, String dlParam) {
184 + WarplyManager.getSingleCampaign(item.getSessionUUID());
185 + String url = item.getIndexUrl();
186 +// + "?web_id=" + WarpUtils.getWebId(Warply.getWarplyContext())
187 +// + "&app_uuid=" + WarplyProperty.getAppUuid(Warply.getWarplyContext())
188 +// + "&api_key=" + WarpUtils.getApiKey(Warply.getWarplyContext())
189 +// + "&session_uuid=" + item.getSessionUUID()
190 +// + "&access_token=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("access_token")
191 +// + "&refresh_token=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("refresh_token")
192 +// + "&client_id=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_id")
193 +// + "&client_secret=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_secret");
194 +
195 + JSONObject params = new JSONObject();
196 + try {
197 + params.putOpt("web_id", WarpUtils.getWebId(Warply.getWarplyContext()));
198 + params.putOpt("app_uuid", WarplyProperty.getAppUuid(Warply.getWarplyContext()));
199 + params.putOpt("api_key", WarpUtils.getApiKey(Warply.getWarplyContext()));
200 + params.putOpt("session_uuid", item.getSessionUUID());
201 + params.putOpt("access_token", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("access_token"));
202 + params.putOpt("refresh_token", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("refresh_token"));
203 + params.putOpt("client_id", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_id"));
204 + params.putOpt("client_secret", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_secret"));
205 + params.putOpt("dl_param", dlParam);
206 + } catch (JSONException e) {
207 + e.printStackTrace();
208 + }
209 +
210 + WarpUtils.setWebviewParams(Warply.getWarplyContext(), params);
211 +
212 + return url;
213 + }
214 +
183 public static String constructCampaignUrl(Campaign item, boolean fromWidget) { 215 public static String constructCampaignUrl(Campaign item, boolean fromWidget) {
184 item.setNew(false); 216 item.setNew(false);
185 String url = item.getIndexUrl(); 217 String url = item.getIndexUrl();
...@@ -984,6 +1016,25 @@ public class WarplyManagerHelper { ...@@ -984,6 +1016,25 @@ public class WarplyManagerHelper {
984 } 1016 }
985 1017
986 /** 1018 /**
1019 + * Open DL for SM Deals campaign
1020 + */
1021 + public static void handleSMDealsCampaign(Context context, String dlParam) {
1022 + if (!noInternetDialog(context, true)) {
1023 + noInternetDialog((Activity) context);
1024 + return;
1025 + }
1026 +
1027 + if (mCampaignListAll != null && mCampaignListAll.size() > 0) {
1028 + for (Campaign camp : mCampaignListAll) {
1029 + if (camp.getSessionUUID().equals("39e70f0548884020809dda5f78d06c85") || camp.getSessionUUID().equals("8314046c83a44576a03ccc3cd9e825db")) {
1030 + context.startActivity(WarpViewActivity.createIntentFromURL(context, WarplyManagerHelper.constructCampaignUrl(camp, dlParam)));
1031 + break;
1032 + }
1033 + }
1034 + }
1035 + }
1036 +
1037 + /**
987 * Open Pacing 1038 * Open Pacing
988 */ 1039 */
989 public static String openPacing() { 1040 public static String openPacing() {
......
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
201 <string name="cos_dlg_negative_button4">Όχι</string> 201 <string name="cos_dlg_negative_button4">Όχι</string>
202 <string name="cos_dlg_positive_button3">Ναι</string> 202 <string name="cos_dlg_positive_button3">Ναι</string>
203 <string name="cos_vouchers_title">Υπόλοιπο επιδότησης</string> 203 <string name="cos_vouchers_title">Υπόλοιπο επιδότησης</string>
204 - <string name="cos_vouchers_info_title">Ενημερώσου για το υπόλοιπο επιδότησης</string> 204 + <string name="cos_vouchers_info_title">Δες το διαθέσιμο υπόλοιπο</string>
205 <string name="cos_loyalty_history">Ιστορικό</string> 205 <string name="cos_loyalty_history">Ιστορικό</string>
206 <string name="cos_redeemed_coupons_loyalty_title">Εξαργυρωμένα κουπόνια</string> 206 <string name="cos_redeemed_coupons_loyalty_title">Εξαργυρωμένα κουπόνια</string>
207 <string name="cos_history_info_text">Δες αναλυτικά το συνολικό όφελός σου έως τώρα από κουπόνια</string> 207 <string name="cos_history_info_text">Δες αναλυτικά το συνολικό όφελός σου έως τώρα από κουπόνια</string>
......