Panagiotis Triantafyllou

new keys

...@@ -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-cosbeta65' 5 + PUBLISH_VERSION = '4.5.4-cosbeta66'
6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk' 6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
7 } 7 }
8 8
...@@ -56,6 +56,7 @@ dependencies { ...@@ -56,6 +56,7 @@ dependencies {
56 api 'com.github.siyamed:android-shape-imageview:0.9.3' 56 api 'com.github.siyamed:android-shape-imageview:0.9.3'
57 implementation 'org.greenrobot:eventbus:3.3.1' 57 implementation 'org.greenrobot:eventbus:3.3.1'
58 api 'com.google.android.flexbox:flexbox:3.0.0' 58 api 'com.google.android.flexbox:flexbox:3.0.0'
59 + api 'org.apmem.tools:layouts:1.10'
59 60
60 //------------------------------ Firebase -----------------------------// 61 //------------------------------ Firebase -----------------------------//
61 api platform('com.google.firebase:firebase-bom:29.0.3') 62 api platform('com.google.firebase:firebase-bom:29.0.3')
......
...@@ -261,11 +261,13 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe ...@@ -261,11 +261,13 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
261 261
262 private void nonTelcoDialog() { 262 private void nonTelcoDialog() {
263 mAlertDialogNonTelco = new AlertDialog.Builder(this) 263 mAlertDialogNonTelco = new AlertDialog.Builder(this)
264 + .setTitle(R.string.cos_dlg_non_telco_title)
264 .setMessage(R.string.cos_dlg_non_telco) 265 .setMessage(R.string.cos_dlg_non_telco)
265 .setPositiveButton(R.string.cos_dlg_positive_button2, (dialogPositive, whichPositive) -> { 266 .setPositiveButton(R.string.cos_dlg_positive_button2, (dialogPositive, whichPositive) -> {
266 dialogPositive.dismiss(); 267 dialogPositive.dismiss();
267 onBackPressed(); 268 onBackPressed();
268 }) 269 })
270 + .setCancelable(false)
269 .show(); 271 .show();
270 } 272 }
271 273
......
...@@ -464,11 +464,13 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { ...@@ -464,11 +464,13 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener {
464 464
465 private void nonTelcoDialog() { 465 private void nonTelcoDialog() {
466 mAlertDialogNonTelco = new AlertDialog.Builder(this) 466 mAlertDialogNonTelco = new AlertDialog.Builder(this)
467 + .setTitle(R.string.cos_dlg_non_telco_title)
467 .setMessage(R.string.cos_dlg_non_telco) 468 .setMessage(R.string.cos_dlg_non_telco)
468 .setPositiveButton(R.string.cos_dlg_positive_button2, (dialogPositive, whichPositive) -> { 469 .setPositiveButton(R.string.cos_dlg_positive_button2, (dialogPositive, whichPositive) -> {
469 dialogPositive.dismiss(); 470 dialogPositive.dismiss();
470 onBackPressed(); 471 onBackPressed();
471 }) 472 })
473 + .setCancelable(false)
472 .show(); 474 .show();
473 } 475 }
474 476
......
...@@ -51,6 +51,7 @@ public class PacingDetails { ...@@ -51,6 +51,7 @@ public class PacingDetails {
51 private static final String MESSAGE = "msg"; 51 private static final String MESSAGE = "msg";
52 private static final String TITLE = "title"; 52 private static final String TITLE = "title";
53 private static final String SHORTCUT_ENABLED = "shortcut_enabled"; 53 private static final String SHORTCUT_ENABLED = "shortcut_enabled";
54 + private static final String BUTTON = "button";
54 55
55 /* Member variables of the Campaign object */ 56 /* Member variables of the Campaign object */
56 private PacingInner steps = new PacingInner(); 57 private PacingInner steps = new PacingInner();
...@@ -60,6 +61,7 @@ public class PacingDetails { ...@@ -60,6 +61,7 @@ public class PacingDetails {
60 private String msg = ""; 61 private String msg = "";
61 private String title = ""; 62 private String title = "";
62 private boolean shortcut_enabled = false; 63 private boolean shortcut_enabled = false;
64 + private String buttonText = "";
63 65
64 /** 66 /**
65 * Basic constructor used to create an object from a String, representing a 67 * Basic constructor used to create an object from a String, representing a
...@@ -93,6 +95,7 @@ public class PacingDetails { ...@@ -93,6 +95,7 @@ public class PacingDetails {
93 this.msg = result.optString(MESSAGE); 95 this.msg = result.optString(MESSAGE);
94 this.shortcut_enabled = result.optBoolean(SHORTCUT_ENABLED); 96 this.shortcut_enabled = result.optBoolean(SHORTCUT_ENABLED);
95 this.title = result.optString(TITLE); 97 this.title = result.optString(TITLE);
98 + this.buttonText = result.optString(BUTTON);
96 } 99 }
97 } 100 }
98 } 101 }
...@@ -112,6 +115,7 @@ public class PacingDetails { ...@@ -112,6 +115,7 @@ public class PacingDetails {
112 jObj.putOpt(MESSAGE, this.msg); 115 jObj.putOpt(MESSAGE, this.msg);
113 jObj.putOpt(SHORTCUT_ENABLED, this.shortcut_enabled); 116 jObj.putOpt(SHORTCUT_ENABLED, this.shortcut_enabled);
114 jObj.putOpt(TITLE, this.title); 117 jObj.putOpt(TITLE, this.title);
118 + jObj.putOpt(BUTTON, this.buttonText);
115 } catch (JSONException e) { 119 } catch (JSONException e) {
116 if (WarpConstants.DEBUG) { 120 if (WarpConstants.DEBUG) {
117 e.printStackTrace(); 121 e.printStackTrace();
...@@ -372,4 +376,12 @@ public class PacingDetails { ...@@ -372,4 +376,12 @@ public class PacingDetails {
372 public void setTitle(String title) { 376 public void setTitle(String title) {
373 this.title = title; 377 this.title = title;
374 } 378 }
379 +
380 + public String getButtonText() {
381 + return buttonText;
382 + }
383 +
384 + public void setButtonText(String buttonText) {
385 + this.buttonText = buttonText;
386 + }
375 } 387 }
......
...@@ -152,6 +152,38 @@ public class WarplyManagerHelper { ...@@ -152,6 +152,38 @@ public class WarplyManagerHelper {
152 return url; 152 return url;
153 } 153 }
154 154
155 + public static String constructCampaignUrl(Campaign item, boolean fromWidget) {
156 + item.setNew(false);
157 + String url = item.getIndexUrl();
158 +// + "?web_id=" + WarpUtils.getWebId(Warply.getWarplyContext())
159 +// + "&app_uuid=" + WarplyProperty.getAppUuid(Warply.getWarplyContext())
160 +// + "&api_key=" + WarpUtils.getApiKey(Warply.getWarplyContext())
161 +// + "&session_uuid=" + item.getSessionUUID()
162 +// + "&access_token=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("access_token")
163 +// + "&refresh_token=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("refresh_token")
164 +// + "&client_id=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_id")
165 +// + "&client_secret=" + WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_secret");
166 +
167 + JSONObject params = new JSONObject();
168 + try {
169 + params.putOpt("web_id", WarpUtils.getWebId(Warply.getWarplyContext()));
170 + params.putOpt("app_uuid", WarplyProperty.getAppUuid(Warply.getWarplyContext()));
171 + params.putOpt("api_key", WarpUtils.getApiKey(Warply.getWarplyContext()));
172 + params.putOpt("session_uuid", item.getSessionUUID());
173 + params.putOpt("access_token", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("access_token"));
174 + params.putOpt("refresh_token", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("refresh_token"));
175 + params.putOpt("client_id", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_id"));
176 + params.putOpt("client_secret", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_secret"));
177 + params.putOpt("from_widget", fromWidget);
178 + } catch (JSONException e) {
179 + e.printStackTrace();
180 + }
181 +
182 + WarpUtils.setWebviewParams(Warply.getWarplyContext(), params);
183 +
184 + return url;
185 + }
186 +
155 /** 187 /**
156 * Handle sharing flow 188 * Handle sharing flow
157 */ 189 */
...@@ -788,7 +820,7 @@ public class WarplyManagerHelper { ...@@ -788,7 +820,7 @@ public class WarplyManagerHelper {
788 if (mCampaignListAll != null && mCampaignListAll.size() > 0) { 820 if (mCampaignListAll != null && mCampaignListAll.size() > 0) {
789 for (Campaign camp : mCampaignListAll) { 821 for (Campaign camp : mCampaignListAll) {
790 if (camp.getOfferCategory().equals("pacing")) { 822 if (camp.getOfferCategory().equals("pacing")) {
791 - String pacingUrl = constructCampaignUrl(camp); 823 + String pacingUrl = constructCampaignUrl(camp, true);
792 WarpUtils.log("PACING_LOG: " + pacingUrl); 824 WarpUtils.log("PACING_LOG: " + pacingUrl);
793 return pacingUrl; 825 return pacingUrl;
794 } 826 }
...@@ -972,7 +1004,7 @@ public class WarplyManagerHelper { ...@@ -972,7 +1004,7 @@ public class WarplyManagerHelper {
972 1004
973 public static void setCarouselList(CampaignList carouselList) { 1005 public static void setCarouselList(CampaignList carouselList) {
974 mCarouselList.clear(); 1006 mCarouselList.clear();
975 - mCarouselList.addAll(carouselList); 1007 + mCarouselList = carouselList;
976 } 1008 }
977 1009
978 public static CampaignList getCarouselList() { 1010 public static CampaignList getCarouselList() {
......
...@@ -1369,7 +1369,7 @@ public class WarplyManager { ...@@ -1369,7 +1369,7 @@ public class WarplyManager {
1369 public void onSuccess(CampaignList result) { 1369 public void onSuccess(CampaignList result) {
1370 // receiver.onSuccess(result); 1370 // receiver.onSuccess(result);
1371 mNewCampaignList.clear(); 1371 mNewCampaignList.clear();
1372 - mNewCampaignList.addAll(result); 1372 + mNewCampaignList = result;
1373 getCampaignsPersonalized(request, new CallbackReceiver<CampaignList>() { 1373 getCampaignsPersonalized(request, new CallbackReceiver<CampaignList>() {
1374 @Override 1374 @Override
1375 public void onSuccess(CampaignList resultPersonalized) { 1375 public void onSuccess(CampaignList resultPersonalized) {
......
...@@ -35,11 +35,17 @@ ...@@ -35,11 +35,17 @@
35 </androidx.constraintlayout.widget.ConstraintLayout> 35 </androidx.constraintlayout.widget.ConstraintLayout>
36 36
37 <LinearLayout 37 <LinearLayout
38 - android:id="@+id/ll_first_view"
39 android:layout_width="match_parent" 38 android:layout_width="match_parent"
40 android:layout_height="wrap_content" 39 android:layout_height="wrap_content"
41 android:layout_below="@+id/cl_loyalty_wallet_header" 40 android:layout_below="@+id/cl_loyalty_wallet_header"
41 + android:orientation="vertical">
42 +
43 + <LinearLayout
44 + android:id="@+id/ll_first_view"
45 + android:layout_width="match_parent"
46 + android:layout_height="wrap_content"
42 android:background="@drawable/ic_background_circle" 47 android:background="@drawable/ic_background_circle"
48 + android:elevation="1dp"
43 android:gravity="center_horizontal" 49 android:gravity="center_horizontal"
44 android:orientation="vertical" 50 android:orientation="vertical"
45 android:paddingVertical="32dp"> 51 android:paddingVertical="32dp">
...@@ -105,21 +111,16 @@ ...@@ -105,21 +111,16 @@
105 </LinearLayout> 111 </LinearLayout>
106 </LinearLayout> 112 </LinearLayout>
107 113
108 - <RelativeLayout
109 - android:layout_width="match_parent"
110 - android:layout_height="match_parent"
111 - android:layout_below="@+id/ll_first_view"
112 - android:background="@color/cos_grey5">
113 -
114 <ScrollView 114 <ScrollView
115 android:layout_width="match_parent" 115 android:layout_width="match_parent"
116 android:layout_height="match_parent" 116 android:layout_height="match_parent"
117 - android:background="@color/cos_grey5" 117 + android:layout_marginTop="-24dp"
118 android:fillViewport="true"> 118 android:fillViewport="true">
119 119
120 <RelativeLayout 120 <RelativeLayout
121 android:layout_width="match_parent" 121 android:layout_width="match_parent"
122 - android:layout_height="wrap_content"> 122 + android:layout_height="wrap_content"
123 + android:layout_marginTop="24dp">
123 124
124 <LinearLayout 125 <LinearLayout
125 android:id="@+id/ll_second_view" 126 android:id="@+id/ll_second_view"
...@@ -340,11 +341,18 @@ ...@@ -340,11 +341,18 @@
340 android:layout_height="wrap_content" 341 android:layout_height="wrap_content"
341 android:visibility="gone" 342 android:visibility="gone"
342 app:flexDirection="row" 343 app:flexDirection="row"
343 - app:justifyContent="flex_start" 344 + app:flexWrap="wrap"
344 - app:flexWrap="wrap"> 345 + app:justifyContent="flex_start">
345 346
346 </com.google.android.flexbox.FlexboxLayout> 347 </com.google.android.flexbox.FlexboxLayout>
347 348
349 + <!-- <org.apmem.tools.layouts.FlowLayout-->
350 + <!-- android:id="@+id/ll_active_deals_codes_view"-->
351 + <!-- android:layout_width="match_parent"-->
352 + <!-- android:layout_height="wrap_content">-->
353 +
354 + <!-- </org.apmem.tools.layouts.FlowLayout>-->
355 +
348 <TextView 356 <TextView
349 android:id="@+id/tv_active_deals_date_text" 357 android:id="@+id/tv_active_deals_date_text"
350 android:layout_width="wrap_content" 358 android:layout_width="wrap_content"
...@@ -414,5 +422,5 @@ ...@@ -414,5 +422,5 @@
414 </LinearLayout> 422 </LinearLayout>
415 </RelativeLayout> 423 </RelativeLayout>
416 </ScrollView> 424 </ScrollView>
417 - </RelativeLayout> 425 + </LinearLayout>
418 </RelativeLayout> 426 </RelativeLayout>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 7
8 <TextView 8 <TextView
9 android:id="@+id/tv_code_copy" 9 android:id="@+id/tv_code_copy"
10 - fontPath="fonts/pf_square_sans_pro_medium.ttf" 10 + fontPath="fonts/pf_square_sans_pro_bold.ttf"
11 android:layout_width="wrap_content" 11 android:layout_width="wrap_content"
12 android:layout_height="wrap_content" 12 android:layout_height="wrap_content"
13 android:background="@android:color/transparent" 13 android:background="@android:color/transparent"
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 17
18 <TextView 18 <TextView
19 android:id="@+id/tv_code_comma" 19 android:id="@+id/tv_code_comma"
20 - fontPath="fonts/pf_square_sans_pro_medium.ttf" 20 + fontPath="fonts/pf_square_sans_pro_bold.ttf"
21 android:layout_width="wrap_content" 21 android:layout_width="wrap_content"
22 android:layout_height="wrap_content" 22 android:layout_height="wrap_content"
23 android:background="@android:color/transparent" 23 android:background="@android:color/transparent"
......
...@@ -136,6 +136,7 @@ ...@@ -136,6 +136,7 @@
136 <string name="cos_coupon_share_telco">Επιλογή σύνδεσης</string> 136 <string name="cos_coupon_share_telco">Επιλογή σύνδεσης</string>
137 <string name="cos_steps_for_good_notification_subtitle">Περπάτησε κάθε μέρα περισσότερο για να ολοκληρώσεις το στόχο του μήνα και να ξεκλειδώσεις μοναδικές προσφορές!</string> 137 <string name="cos_steps_for_good_notification_subtitle">Περπάτησε κάθε μέρα περισσότερο για να ολοκληρώσεις το στόχο του μήνα και να ξεκλειδώσεις μοναδικές προσφορές!</string>
138 <string name="cos_comma">,</string> 138 <string name="cos_comma">,</string>
139 + <string name="cos_dlg_non_telco_title">Δεν έχεις προσθέσει τις συνδέσεις σου</string>
139 140
140 <string-array name="coupons_array"> 141 <string-array name="coupons_array">
141 <item>Κουπόνια</item> 142 <item>Κουπόνια</item>
......