Showing
5 changed files
with
86 additions
and
11 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,14 +49,20 @@ | ... | @@ -49,14 +49,20 @@ |
49 | android:layout_height="wrap_content" | 49 | android:layout_height="wrap_content" |
50 | android:orientation="vertical"> | 50 | android:orientation="vertical"> |
51 | 51 | ||
52 | + <LinearLayout | ||
53 | + android:layout_width="match_parent" | ||
54 | + android:layout_height="wrap_content" | ||
55 | + android:background="@android:color/white" | ||
56 | + android:orientation="vertical"> | ||
57 | + | ||
52 | <androidx.constraintlayout.widget.ConstraintLayout | 58 | <androidx.constraintlayout.widget.ConstraintLayout |
53 | android:id="@+id/ll_first_view" | 59 | android:id="@+id/ll_first_view" |
54 | android:layout_width="match_parent" | 60 | android:layout_width="match_parent" |
55 | android:layout_height="wrap_content" | 61 | android:layout_height="wrap_content" |
62 | + android:layout_marginVertical="24dp" | ||
56 | android:background="@drawable/ic_background_line" | 63 | android:background="@drawable/ic_background_line" |
57 | android:orientation="horizontal" | 64 | android:orientation="horizontal" |
58 | - android:paddingHorizontal="16dp" | 65 | + android:paddingHorizontal="16dp"> |
59 | - android:paddingVertical="24dp"> | ||
60 | 66 | ||
61 | <com.google.android.material.imageview.ShapeableImageView | 67 | <com.google.android.material.imageview.ShapeableImageView |
62 | android:id="@+id/iv_profile_photo" | 68 | android:id="@+id/iv_profile_photo" |
... | @@ -76,10 +82,10 @@ | ... | @@ -76,10 +82,10 @@ |
76 | android:layout_height="0dp" | 82 | android:layout_height="0dp" |
77 | android:layout_marginStart="8dp" | 83 | android:layout_marginStart="8dp" |
78 | android:orientation="vertical" | 84 | android:orientation="vertical" |
79 | - app:layout_constraintBottom_toBottomOf="@+id/iv_profile_photo" | 85 | + app:layout_constraintBottom_toBottomOf="parent" |
80 | app:layout_constraintEnd_toEndOf="parent" | 86 | app:layout_constraintEnd_toEndOf="parent" |
81 | app:layout_constraintStart_toEndOf="@+id/iv_profile_photo" | 87 | app:layout_constraintStart_toEndOf="@+id/iv_profile_photo" |
82 | - app:layout_constraintTop_toTopOf="@+id/iv_profile_photo"> | 88 | + app:layout_constraintTop_toTopOf="parent"> |
83 | 89 | ||
84 | <TextView | 90 | <TextView |
85 | android:id="@+id/tv_profile_name" | 91 | android:id="@+id/tv_profile_name" |
... | @@ -162,6 +168,7 @@ | ... | @@ -162,6 +168,7 @@ |
162 | </LinearLayout> | 168 | </LinearLayout> |
163 | </LinearLayout> | 169 | </LinearLayout> |
164 | </androidx.constraintlayout.widget.ConstraintLayout> | 170 | </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