Showing
5 changed files
with
180 additions
and
105 deletions
.idea/deploymentTargetDropDown.xml
0 → 100644
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() { | ... | ... |
... | @@ -49,119 +49,126 @@ | ... | @@ -49,119 +49,126 @@ |
49 | android:layout_height="wrap_content" | 49 | android:layout_height="wrap_content" |
50 | android:orientation="vertical"> | 50 | android:orientation="vertical"> |
51 | 51 | ||
52 | - <androidx.constraintlayout.widget.ConstraintLayout | 52 | + <LinearLayout |
53 | - android:id="@+id/ll_first_view" | ||
54 | android:layout_width="match_parent" | 53 | android:layout_width="match_parent" |
55 | android:layout_height="wrap_content" | 54 | android:layout_height="wrap_content" |
56 | - android:background="@drawable/ic_background_line" | 55 | + android:background="@android:color/white" |
57 | - android:orientation="horizontal" | 56 | + android:orientation="vertical"> |
58 | - android:paddingHorizontal="16dp" | ||
59 | - android:paddingVertical="24dp"> | ||
60 | - | ||
61 | - <com.google.android.material.imageview.ShapeableImageView | ||
62 | - android:id="@+id/iv_profile_photo" | ||
63 | - android:layout_width="74dp" | ||
64 | - android:layout_height="74dp" | ||
65 | - android:padding="1dp" | ||
66 | - android:src="@drawable/ic_default_photo" | ||
67 | - app:layout_constraintBottom_toBottomOf="parent" | ||
68 | - app:layout_constraintStart_toStartOf="parent" | ||
69 | - app:layout_constraintTop_toTopOf="parent" | ||
70 | - app:shapeAppearanceOverlay="@style/ShapeAppearanceProfileImage" | ||
71 | - app:strokeColor="@color/cos_grey2" | ||
72 | - app:strokeWidth="1dp" /> | ||
73 | 57 | ||
74 | - <LinearLayout | 58 | + <androidx.constraintlayout.widget.ConstraintLayout |
75 | - android:layout_width="0dp" | 59 | + android:id="@+id/ll_first_view" |
76 | - android:layout_height="0dp" | 60 | + android:layout_width="match_parent" |
77 | - android:layout_marginStart="8dp" | 61 | + android:layout_height="wrap_content" |
78 | - android:orientation="vertical" | 62 | + android:layout_marginVertical="24dp" |
79 | - app:layout_constraintBottom_toBottomOf="@+id/iv_profile_photo" | 63 | + android:background="@drawable/ic_background_line" |
80 | - app:layout_constraintEnd_toEndOf="parent" | 64 | + android:orientation="horizontal" |
81 | - app:layout_constraintStart_toEndOf="@+id/iv_profile_photo" | 65 | + android:paddingHorizontal="16dp"> |
82 | - app:layout_constraintTop_toTopOf="@+id/iv_profile_photo"> | 66 | + |
83 | - | 67 | + <com.google.android.material.imageview.ShapeableImageView |
84 | - <TextView | 68 | + android:id="@+id/iv_profile_photo" |
85 | - android:id="@+id/tv_profile_name" | 69 | + android:layout_width="74dp" |
86 | - fontPath="fonts/PeridotPE-SemiBold.ttf" | 70 | + android:layout_height="74dp" |
87 | - android:layout_width="wrap_content" | 71 | + android:padding="1dp" |
88 | - android:layout_height="wrap_content" | 72 | + android:src="@drawable/ic_default_photo" |
89 | - android:layout_marginBottom="4dp" | 73 | + app:layout_constraintBottom_toBottomOf="parent" |
90 | - android:includeFontPadding="false" | 74 | + app:layout_constraintStart_toStartOf="parent" |
91 | - android:maxLines="1" | 75 | + app:layout_constraintTop_toTopOf="parent" |
92 | - android:textColor="@color/cos_light_black" | 76 | + app:shapeAppearanceOverlay="@style/ShapeAppearanceProfileImage" |
93 | - android:textSize="22sp" | 77 | + app:strokeColor="@color/cos_grey2" |
94 | - tools:text="Test Name" /> | 78 | + app:strokeWidth="1dp" /> |
95 | 79 | ||
96 | <LinearLayout | 80 | <LinearLayout |
97 | - android:layout_width="match_parent" | 81 | + android:layout_width="0dp" |
98 | - android:layout_height="wrap_content" | 82 | + android:layout_height="0dp" |
99 | - android:orientation="horizontal"> | 83 | + android:layout_marginStart="8dp" |
84 | + android:orientation="vertical" | ||
85 | + app:layout_constraintBottom_toBottomOf="parent" | ||
86 | + app:layout_constraintEnd_toEndOf="parent" | ||
87 | + app:layout_constraintStart_toEndOf="@+id/iv_profile_photo" | ||
88 | + app:layout_constraintTop_toTopOf="parent"> | ||
100 | 89 | ||
101 | - <LinearLayout | 90 | + <TextView |
102 | - android:id="@+id/ll_user_badge" | 91 | + android:id="@+id/tv_profile_name" |
92 | + fontPath="fonts/PeridotPE-SemiBold.ttf" | ||
103 | android:layout_width="wrap_content" | 93 | android:layout_width="wrap_content" |
104 | - android:layout_height="42dp" | 94 | + android:layout_height="wrap_content" |
105 | - android:background="@drawable/selector_button_green_border" | 95 | + android:layout_marginBottom="4dp" |
106 | - android:gravity="center" | 96 | + android:includeFontPadding="false" |
107 | - android:visibility="gone" | 97 | + android:maxLines="1" |
108 | - tools:visibility="gone"> | 98 | + android:textColor="@color/cos_light_black" |
109 | - | 99 | + android:textSize="22sp" |
110 | - <TextView | 100 | + tools:text="Test Name" /> |
111 | - android:id="@+id/tv_type" | ||
112 | - fontPath="fonts/PeridotPE-SemiBold.ttf" | ||
113 | - android:layout_width="wrap_content" | ||
114 | - android:layout_height="wrap_content" | ||
115 | - android:layout_marginHorizontal="20dp" | ||
116 | - android:includeFontPadding="false" | ||
117 | - android:textColor="@color/cos_green12" | ||
118 | - android:textSize="16sp" | ||
119 | - tools:text="@string/cos_profile_preferences_placeholder" /> | ||
120 | - </LinearLayout> | ||
121 | 101 | ||
122 | <LinearLayout | 102 | <LinearLayout |
123 | - android:id="@+id/ll_user_questionnaire" | 103 | + android:layout_width="match_parent" |
124 | - android:layout_width="160dp" | 104 | + android:layout_height="wrap_content" |
125 | - android:layout_height="42dp" | 105 | + android:orientation="horizontal"> |
126 | - android:background="@drawable/selector_button_green_border" | ||
127 | - android:gravity="center" | ||
128 | - android:visibility="gone" | ||
129 | - tools:visibility="visible"> | ||
130 | - | ||
131 | - <ImageView | ||
132 | - android:layout_width="16dp" | ||
133 | - android:layout_height="16dp" | ||
134 | - android:layout_marginEnd="4dp" | ||
135 | - android:src="@drawable/sv_plus_sign_green" /> | ||
136 | 106 | ||
137 | - <TextView | 107 | + <LinearLayout |
138 | - android:id="@+id/tv_questionnaire" | 108 | + android:id="@+id/ll_user_badge" |
139 | - fontPath="fonts/PeridotPE-Bold.ttf" | ||
140 | android:layout_width="wrap_content" | 109 | android:layout_width="wrap_content" |
141 | - android:layout_height="wrap_content" | 110 | + android:layout_height="42dp" |
142 | - android:includeFontPadding="false" | 111 | + android:background="@drawable/selector_button_green_border" |
143 | - android:text="@string/cos_profile_preferences" | 112 | + android:gravity="center" |
144 | - android:textColor="@color/cos_green12" | 113 | + android:visibility="gone" |
145 | - android:textSize="16sp" /> | 114 | + tools:visibility="gone"> |
146 | - </LinearLayout> | ||
147 | 115 | ||
148 | - <LinearLayout | 116 | + <TextView |
149 | - android:id="@+id/ll_loyalty_history" | 117 | + android:id="@+id/tv_type" |
150 | - android:layout_width="52dp" | 118 | + fontPath="fonts/PeridotPE-SemiBold.ttf" |
151 | - android:layout_height="42dp" | 119 | + android:layout_width="wrap_content" |
152 | - android:layout_marginStart="4dp" | 120 | + android:layout_height="wrap_content" |
153 | - android:background="@drawable/selector_button_green_border" | 121 | + android:layout_marginHorizontal="20dp" |
154 | - android:gravity="center" | 122 | + android:includeFontPadding="false" |
155 | - android:orientation="vertical"> | 123 | + android:textColor="@color/cos_green12" |
124 | + android:textSize="16sp" | ||
125 | + tools:text="@string/cos_profile_preferences_placeholder" /> | ||
126 | + </LinearLayout> | ||
127 | + | ||
128 | + <LinearLayout | ||
129 | + android:id="@+id/ll_user_questionnaire" | ||
130 | + android:layout_width="160dp" | ||
131 | + android:layout_height="42dp" | ||
132 | + android:background="@drawable/selector_button_green_border" | ||
133 | + android:gravity="center" | ||
134 | + android:visibility="gone" | ||
135 | + tools:visibility="visible"> | ||
156 | 136 | ||
157 | - <ImageView | 137 | + <ImageView |
158 | - android:layout_width="16dp" | 138 | + android:layout_width="16dp" |
159 | - android:layout_height="16dp" | 139 | + android:layout_height="16dp" |
160 | - android:src="@drawable/sv_history" /> | 140 | + android:layout_marginEnd="4dp" |
141 | + android:src="@drawable/sv_plus_sign_green" /> | ||
142 | + | ||
143 | + <TextView | ||
144 | + android:id="@+id/tv_questionnaire" | ||
145 | + fontPath="fonts/PeridotPE-Bold.ttf" | ||
146 | + android:layout_width="wrap_content" | ||
147 | + android:layout_height="wrap_content" | ||
148 | + android:includeFontPadding="false" | ||
149 | + android:text="@string/cos_profile_preferences" | ||
150 | + android:textColor="@color/cos_green12" | ||
151 | + android:textSize="16sp" /> | ||
152 | + </LinearLayout> | ||
153 | + | ||
154 | + <LinearLayout | ||
155 | + android:id="@+id/ll_loyalty_history" | ||
156 | + android:layout_width="52dp" | ||
157 | + android:layout_height="42dp" | ||
158 | + android:layout_marginStart="4dp" | ||
159 | + android:background="@drawable/selector_button_green_border" | ||
160 | + android:gravity="center" | ||
161 | + android:orientation="vertical"> | ||
162 | + | ||
163 | + <ImageView | ||
164 | + android:layout_width="16dp" | ||
165 | + android:layout_height="16dp" | ||
166 | + android:src="@drawable/sv_history" /> | ||
167 | + </LinearLayout> | ||
161 | </LinearLayout> | 168 | </LinearLayout> |
162 | </LinearLayout> | 169 | </LinearLayout> |
163 | - </LinearLayout> | 170 | + </androidx.constraintlayout.widget.ConstraintLayout> |
164 | - </androidx.constraintlayout.widget.ConstraintLayout> | 171 | + </LinearLayout> |
165 | 172 | ||
166 | <RelativeLayout | 173 | <RelativeLayout |
167 | android:layout_width="match_parent" | 174 | android:layout_width="match_parent" |
... | @@ -651,13 +658,13 @@ | ... | @@ -651,13 +658,13 @@ |
651 | <LinearLayout | 658 | <LinearLayout |
652 | android:layout_width="16dp" | 659 | android:layout_width="16dp" |
653 | android:layout_height="16dp" | 660 | android:layout_height="16dp" |
661 | + android:layout_marginStart="2dp" | ||
654 | android:background="@drawable/shape_cos_counter_orange" | 662 | android:background="@drawable/shape_cos_counter_orange" |
655 | android:gravity="center" | 663 | android:gravity="center" |
656 | android:orientation="vertical" | 664 | android:orientation="vertical" |
657 | - android:layout_marginStart="2dp" | ||
658 | - app:layout_constraintTop_toTopOf="@+id/tv_vouchers_info_title_disabled" | ||
659 | app:layout_constraintBottom_toTopOf="@+id/tv_vouchers_info_title_disabled" | 665 | app:layout_constraintBottom_toTopOf="@+id/tv_vouchers_info_title_disabled" |
660 | - app:layout_constraintStart_toEndOf="@+id/tv_vouchers_info_title_disabled"> | 666 | + app:layout_constraintStart_toEndOf="@+id/tv_vouchers_info_title_disabled" |
667 | + app:layout_constraintTop_toTopOf="@+id/tv_vouchers_info_title_disabled"> | ||
661 | 668 | ||
662 | <TextView | 669 | <TextView |
663 | android:id="@+id/tv_vouchers_count_disabled" | 670 | android:id="@+id/tv_vouchers_count_disabled" |
... | @@ -666,9 +673,9 @@ | ... | @@ -666,9 +673,9 @@ |
666 | android:layout_height="16dp" | 673 | android:layout_height="16dp" |
667 | android:includeFontPadding="false" | 674 | android:includeFontPadding="false" |
668 | android:maxLines="1" | 675 | android:maxLines="1" |
676 | + android:text="0" | ||
669 | android:textColor="@color/cos_light_black" | 677 | android:textColor="@color/cos_light_black" |
670 | - android:textSize="12sp" | 678 | + android:textSize="12sp" /> |
671 | - android:text="0" /> | ||
672 | </LinearLayout> | 679 | </LinearLayout> |
673 | </androidx.constraintlayout.widget.ConstraintLayout> | 680 | </androidx.constraintlayout.widget.ConstraintLayout> |
674 | </androidx.cardview.widget.CardView> | 681 | </androidx.cardview.widget.CardView> | ... | ... |
... | @@ -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> | ... | ... |
-
Please register or login to post a comment