Panagiotis Triantafyllou

refactor code

Showing 58 changed files with 180 additions and 724 deletions
1 # {@link ly.warp.sdk.utils.WarplyProperty} 1 # {@link ly.warp.sdk.utils.WarplyProperty}
2 2
3 # The app uuid the warply sdk need to connect to the engage server 3 # The app uuid the warply sdk need to connect to the engage server
4 -# dev b13ade8ef743468b89a7aaa8efbfc468 4 +# dev d5f9038f46374666a1f4e1039d89f608
5 -# prod b13ade8ef743468b89a7aaa8efbfc468 5 +# prod d5f9038f46374666a1f4e1039d89f608
6 -Uuid=b13ade8ef743468b89a7aaa8efbfc468 6 +
7 +# dev cosmote f83dfde1145e4c2da69793abb2f579af
8 +# prod cosmote 0086a2088301440792091b9f814c2267
9 +Uuid=d5f9038f46374666a1f4e1039d89f608
7 10
8 # If we need to see logs in Logcat 11 # If we need to see logs in Logcat
9 Debug=true 12 Debug=true
...@@ -11,11 +14,9 @@ Debug=true ...@@ -11,11 +14,9 @@ Debug=true
11 # Production or Development environment of the engage server 14 # Production or Development environment of the engage server
12 # Production: https://engage.warp.ly 15 # Production: https://engage.warp.ly
13 # Development: https://engage-stage.warp.ly 16 # Development: https://engage-stage.warp.ly
14 -BaseURL=https://engage-stage.warp.ly 17 +# DEH Production: https://engage-prod.dei.gr
15 - 18 +# DEH Development: https://engage-uat.dei.gr
16 -# Production: https://magenta.supermarketdeals.eu/ 19 +BaseURL=https://engage-prod.dei.gr
17 -# Development: https://magenta-dev.supermarketdeals.eu/
18 -SupermarketsURL=https://magenta-dev.supermarketdeals.eu/
19 20
20 # For Verify Ticket request 21 # For Verify Ticket request
21 VerifyURL=/partners/cosmote/verify 22 VerifyURL=/partners/cosmote/verify
......
No preview for this file type
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
8 android:id="@+id/iv_splash" 8 android:id="@+id/iv_splash"
9 android:layout_width="match_parent" 9 android:layout_width="match_parent"
10 android:layout_height="wrap_content" 10 android:layout_height="wrap_content"
11 - android:layout_centerHorizontal="true" 11 + android:scaleType="fitCenter"
12 - android:scaleType="centerCrop" 12 + android:src="@drawable/ic_logo" />
13 - android:src="@drawable/ic_cosmote_logo_horizontal_grey" />
14 </RelativeLayout> 13 </RelativeLayout>
......
...@@ -630,11 +630,9 @@ public enum Warply { ...@@ -630,11 +630,9 @@ public enum Warply {
630 try { 630 try {
631 PackageInfo info = mContext.getPackageManager().getPackageInfo(mContext.getApplicationContext().getPackageName(), 0); 631 PackageInfo info = mContext.getPackageManager().getPackageInfo(mContext.getApplicationContext().getPackageName(), 0);
632 632
633 - if (WarpUtils.getTrackersEnabled(mContext)) {
634 object.putOpt("app_version", info.versionName); 633 object.putOpt("app_version", info.versionName);
635 object.putOpt("sdk_version", WarpConstants.SDK_VERSION); 634 object.putOpt("sdk_version", WarpConstants.SDK_VERSION);
636 object.putOpt("app_build", info.versionCode); 635 object.putOpt("app_build", info.versionCode);
637 - }
638 // object.putOpt("bundle_identifier", mContext.get().getApplicationContext().getPackageName()); 636 // object.putOpt("bundle_identifier", mContext.get().getApplicationContext().getPackageName());
639 if (!WarpUtils.getHasApplicationInfo(mContext)) { 637 if (!WarpUtils.getHasApplicationInfo(mContext)) {
640 WarpUtils.setHasApplicationInfo(mContext, true); 638 WarpUtils.setHasApplicationInfo(mContext, true);
......
...@@ -210,23 +210,23 @@ public class ProfileActivity extends Activity implements View.OnClickListener, O ...@@ -210,23 +210,23 @@ public class ProfileActivity extends Activity implements View.OnClickListener, O
210 private void filterCoupons(String status) { 210 private void filterCoupons(String status) {
211 // Reset all filter button styles 211 // Reset all filter button styles
212 mBtnFilterActive.setBackgroundResource(R.drawable.shape_transparent_black_border); 212 mBtnFilterActive.setBackgroundResource(R.drawable.shape_transparent_black_border);
213 - mBtnFilterActive.setTextColor(getResources().getColor(R.color.black2)); 213 + mBtnFilterActive.setTextColor(getResources().getColor(R.color.custom_black2));
214 214
215 mBtnFilterFavorites.setBackgroundResource(R.drawable.shape_transparent_black_border); 215 mBtnFilterFavorites.setBackgroundResource(R.drawable.shape_transparent_black_border);
216 - mBtnFilterFavorites.setTextColor(getResources().getColor(R.color.black2)); 216 + mBtnFilterFavorites.setTextColor(getResources().getColor(R.color.custom_black2));
217 217
218 mBtnFilterRedeemed.setBackgroundResource(R.drawable.shape_transparent_black_border); 218 mBtnFilterRedeemed.setBackgroundResource(R.drawable.shape_transparent_black_border);
219 - mBtnFilterRedeemed.setTextColor(getResources().getColor(R.color.black2)); 219 + mBtnFilterRedeemed.setTextColor(getResources().getColor(R.color.custom_black2));
220 220
221 // Set selected filter button style 221 // Set selected filter button style
222 if (CouponItem.STATUS_ACTIVE.equals(status)) { 222 if (CouponItem.STATUS_ACTIVE.equals(status)) {
223 - mBtnFilterActive.setBackgroundResource(R.drawable.shape_cos_black); 223 + mBtnFilterActive.setBackgroundResource(R.drawable.shape_rectangle_rounded_black);
224 mBtnFilterActive.setTextColor(Color.WHITE); 224 mBtnFilterActive.setTextColor(Color.WHITE);
225 } else if (CouponItem.STATUS_FAVORITE.equals(status)) { 225 } else if (CouponItem.STATUS_FAVORITE.equals(status)) {
226 - mBtnFilterFavorites.setBackgroundResource(R.drawable.shape_cos_black); 226 + mBtnFilterFavorites.setBackgroundResource(R.drawable.shape_rectangle_rounded_black);
227 mBtnFilterFavorites.setTextColor(Color.WHITE); 227 mBtnFilterFavorites.setTextColor(Color.WHITE);
228 } else if (CouponItem.STATUS_REDEEMED.equals(status)) { 228 } else if (CouponItem.STATUS_REDEEMED.equals(status)) {
229 - mBtnFilterRedeemed.setBackgroundResource(R.drawable.shape_cos_black); 229 + mBtnFilterRedeemed.setBackgroundResource(R.drawable.shape_rectangle_rounded_black);
230 mBtnFilterRedeemed.setTextColor(Color.WHITE); 230 mBtnFilterRedeemed.setTextColor(Color.WHITE);
231 } 231 }
232 232
......
...@@ -34,7 +34,6 @@ import android.content.pm.PackageManager; ...@@ -34,7 +34,6 @@ import android.content.pm.PackageManager;
34 import android.graphics.Color; 34 import android.graphics.Color;
35 import android.os.Build; 35 import android.os.Build;
36 import android.os.Bundle; 36 import android.os.Bundle;
37 -import android.os.Handler;
38 import android.text.TextUtils; 37 import android.text.TextUtils;
39 import android.view.KeyEvent; 38 import android.view.KeyEvent;
40 import android.view.View; 39 import android.view.View;
...@@ -81,8 +80,6 @@ public class WarpViewActivity extends WarpBaseActivity { ...@@ -81,8 +80,6 @@ public class WarpViewActivity extends WarpBaseActivity {
81 // =========================================================== 80 // ===========================================================
82 81
83 private WarpView mWarpView; 82 private WarpView mWarpView;
84 - private static Handler metersHandler;
85 - private static boolean mWebviewSupermarket = false;
86 83
87 // =========================================================== 84 // ===========================================================
88 // Methods for/from SuperClass/Interfaces 85 // Methods for/from SuperClass/Interfaces
...@@ -91,8 +88,6 @@ public class WarpViewActivity extends WarpBaseActivity { ...@@ -91,8 +88,6 @@ public class WarpViewActivity extends WarpBaseActivity {
91 @Override 88 @Override
92 public void onCreate(Bundle savedInstanceState) { 89 public void onCreate(Bundle savedInstanceState) {
93 super.onCreate(savedInstanceState); 90 super.onCreate(savedInstanceState);
94 - metersHandler = new Handler();
95 - mWebviewSupermarket = false;
96 WarplySessionManager.onCreateActivity(this); 91 WarplySessionManager.onCreateActivity(this);
97 initViews(); 92 initViews();
98 Warply.getInitializer(this).init(); 93 Warply.getInitializer(this).init();
...@@ -112,16 +107,6 @@ public class WarpViewActivity extends WarpBaseActivity { ...@@ -112,16 +107,6 @@ public class WarpViewActivity extends WarpBaseActivity {
112 WarplySessionManager.onStartActivity(this); 107 WarplySessionManager.onStartActivity(this);
113 if (!EventBus.getDefault().isRegistered(this)) 108 if (!EventBus.getDefault().isRegistered(this))
114 EventBus.getDefault().register(this); 109 EventBus.getDefault().register(this);
115 -
116 - if (mWarpView != null) {
117 - if (getWebviewSupermarket()) {
118 - String scriptSourceInit = "webviewDidFocusRefresh(" + String.valueOf(getWebviewSupermarket()) + ");";
119 - mWarpView.evaluateJavascript(scriptSourceInit, s -> {
120 -
121 - });
122 - setWebviewSupermarket(false);
123 - }
124 - }
125 } 110 }
126 111
127 @Override 112 @Override
...@@ -134,10 +119,7 @@ public class WarpViewActivity extends WarpBaseActivity { ...@@ -134,10 +119,7 @@ public class WarpViewActivity extends WarpBaseActivity {
134 @Override 119 @Override
135 protected void onDestroy() { 120 protected void onDestroy() {
136 super.onDestroy(); 121 super.onDestroy();
137 - if (metersHandler != null) metersHandler.removeCallbacksAndMessages(null);
138 -// WarplyManager.sendSteps(this);
139 WarpUtils.setWebviewParams(this, new JSONObject()); 122 WarpUtils.setWebviewParams(this, new JSONObject());
140 - setWebviewSupermarket(false);
141 } 123 }
142 124
143 @Override 125 @Override
...@@ -166,7 +148,7 @@ public class WarpViewActivity extends WarpBaseActivity { ...@@ -166,7 +148,7 @@ public class WarpViewActivity extends WarpBaseActivity {
166 @Override 148 @Override
167 protected void onActivityResult(int requestCode, int resultCode, Intent data) { 149 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
168 super.onActivityResult(requestCode, resultCode, data); 150 super.onActivityResult(requestCode, resultCode, data);
169 - if (requestCode == 3002 || requestCode == 3003) { 151 + if (requestCode == 3002) {
170 WarplyWebviewActivityCallbackEventModel webviewCallbackEventModel = new WarplyWebviewActivityCallbackEventModel(); 152 WarplyWebviewActivityCallbackEventModel webviewCallbackEventModel = new WarplyWebviewActivityCallbackEventModel();
171 webviewCallbackEventModel.setRequestId(requestCode); 153 webviewCallbackEventModel.setRequestId(requestCode);
172 webviewCallbackEventModel.setResponseCode(resultCode == RESULT_OK ? "enabled" : "disabled"); 154 webviewCallbackEventModel.setResponseCode(resultCode == RESULT_OK ? "enabled" : "disabled");
...@@ -311,12 +293,4 @@ public class WarpViewActivity extends WarpBaseActivity { ...@@ -311,12 +293,4 @@ public class WarpViewActivity extends WarpBaseActivity {
311 293
312 } 294 }
313 }; 295 };
314 -
315 - public static boolean getWebviewSupermarket() {
316 - return mWebviewSupermarket;
317 - }
318 -
319 - public static void setWebviewSupermarket(boolean isLoaded) {
320 - mWebviewSupermarket = isLoaded;
321 - }
322 } 296 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -5,11 +5,8 @@ import android.os.Bundle; ...@@ -5,11 +5,8 @@ import android.os.Bundle;
5 import android.view.LayoutInflater; 5 import android.view.LayoutInflater;
6 import android.view.View; 6 import android.view.View;
7 import android.view.ViewGroup; 7 import android.view.ViewGroup;
8 -import android.widget.EditText;
9 -import android.widget.ImageView;
10 import android.widget.LinearLayout; 8 import android.widget.LinearLayout;
11 import android.widget.RelativeLayout; 9 import android.widget.RelativeLayout;
12 -import android.widget.TextView;
13 import android.widget.Toast; 10 import android.widget.Toast;
14 11
15 import androidx.annotation.NonNull; 12 import androidx.annotation.NonNull;
...@@ -19,16 +16,12 @@ import org.json.JSONObject; ...@@ -19,16 +16,12 @@ import org.json.JSONObject;
19 16
20 import ly.warp.sdk.R; 17 import ly.warp.sdk.R;
21 import ly.warp.sdk.activities.HomeActivity; 18 import ly.warp.sdk.activities.HomeActivity;
22 -import ly.warp.sdk.db.WarplyDBHelper;
23 import ly.warp.sdk.io.callbacks.CallbackReceiver; 19 import ly.warp.sdk.io.callbacks.CallbackReceiver;
24 -import ly.warp.sdk.utils.WarplyManagerHelper;
25 import ly.warp.sdk.utils.managers.WarplyManager; 20 import ly.warp.sdk.utils.managers.WarplyManager;
26 21
27 public class HomeFragment extends Fragment implements View.OnClickListener { 22 public class HomeFragment extends Fragment implements View.OnClickListener {
28 - private RelativeLayout mOptionOne, mOptionTwo, mOptionThree, mPbLoading; 23 + private RelativeLayout mPbLoading;
29 - private TextView mTvUsername, mTvUser; 24 + private LinearLayout mRlSmFlow;
30 - private EditText mEtGuid;
31 - private LinearLayout mLlAuthLogin, mLlAuthLogout, mRlSmFlow, mRlSmMap;
32 25
33 @Override 26 @Override
34 public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 27 public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
...@@ -38,51 +31,15 @@ public class HomeFragment extends Fragment implements View.OnClickListener { ...@@ -38,51 +31,15 @@ public class HomeFragment extends Fragment implements View.OnClickListener {
38 public void onViewCreated(@NonNull View view, Bundle savedInstanceState) { 31 public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
39 super.onViewCreated(view, savedInstanceState); 32 super.onViewCreated(view, savedInstanceState);
40 33
41 - mOptionOne = view.findViewById(R.id.info_button);
42 - TextView mOptionOneText = mOptionOne.findViewById(R.id.option_text);
43 - ImageView mOptionOneImage = mOptionOne.findViewById(R.id.option_icon);
44 - mOptionOneText.setText("2");
45 - mOptionOneImage.setImageResource(R.drawable.mobile_option);
46 -
47 - mOptionTwo = view.findViewById(R.id.info_button2);
48 - TextView mOptionTwoText = mOptionTwo.findViewById(R.id.option_text);
49 - ImageView mOptionTwoImage = mOptionTwo.findViewById(R.id.option_icon);
50 - mOptionTwoText.setText("1");
51 - mOptionTwoImage.setImageResource(R.drawable.phone_option);
52 -
53 - mOptionThree = view.findViewById(R.id.info_button3);
54 - TextView mOptionThreeText = mOptionThree.findViewById(R.id.option_text);
55 - ImageView mOptionThreeImage = mOptionThree.findViewById(R.id.option_icon);
56 - mOptionThreeText.setText("1");
57 - mOptionThreeImage.setImageResource(R.drawable.tv_option);
58 -
59 - mTvUsername = view.findViewById(R.id.welcome_user_txt);
60 -
61 mPbLoading = view.findViewById(R.id.pb_loading); 34 mPbLoading = view.findViewById(R.id.pb_loading);
62 mPbLoading.setOnTouchListener((v, event) -> true); 35 mPbLoading.setOnTouchListener((v, event) -> true);
63 -
64 - mEtGuid = view.findViewById(R.id.et_login);
65 - mLlAuthLogin = view.findViewById(R.id.ll_auth_login);
66 - mLlAuthLogin.setOnClickListener(this);
67 - mLlAuthLogout = view.findViewById(R.id.ll_auth_logout);
68 - mLlAuthLogout.setOnClickListener(this);
69 - mTvUser = view.findViewById(R.id.tv_login);
70 mRlSmFlow = view.findViewById(R.id.ll_sm_flow); 36 mRlSmFlow = view.findViewById(R.id.ll_sm_flow);
71 mRlSmFlow.setOnClickListener(this); 37 mRlSmFlow.setOnClickListener(this);
72 - mRlSmMap = view.findViewById(R.id.ll_sm_map); 38 +
73 - mRlSmMap.setOnClickListener(this); 39 + // 6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826
74 - 40 + // prod 6006552990, prod 6005892749, live 3000184910,prod 7000070282, live 3000136179
75 - if (!WarplyDBHelper.getInstance(getActivity()).isTableNotEmpty("auth")) { 41 + mPbLoading.setVisibility(View.VISIBLE);
76 - mTvUser.setVisibility(View.GONE); 42 + WarplyManager.getDehUser("aggeliki@warp.ly", mLoginReceiver);
77 - mLlAuthLogout.setVisibility(View.GONE);
78 - mLlAuthLogin.setVisibility(View.VISIBLE);
79 - mEtGuid.setVisibility(View.VISIBLE);
80 - } else {
81 - mEtGuid.setVisibility(View.GONE);
82 - mLlAuthLogin.setVisibility(View.GONE);
83 - mLlAuthLogout.setVisibility(View.VISIBLE);
84 - mTvUser.setVisibility(View.VISIBLE);
85 - }
86 } 43 }
87 44
88 @Override 45 @Override
...@@ -92,27 +49,24 @@ public class HomeFragment extends Fragment implements View.OnClickListener { ...@@ -92,27 +49,24 @@ public class HomeFragment extends Fragment implements View.OnClickListener {
92 49
93 @Override 50 @Override
94 public void onClick(View view) { 51 public void onClick(View view) {
95 - if (view.getId() == R.id.ll_auth_login) { 52 +// if (view.getId() == R.id.ll_auth_login) {
96 - //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons 53 +// //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons
97 - //prod 6006552990, prod 6005892749, live 3000184910,prod 7000070282, live 3000136179 54 +// //prod 6006552990, prod 6005892749, live 3000184910,prod 7000070282, live 3000136179
55 +//// mPbLoading.setVisibility(View.VISIBLE);
56 +//// WarplyManager.getDehUser(mEtGuid.getText().toString(), mLoginReceiver);
57 +//
58 +// Intent myIntent = new Intent(getContext(), HomeActivity.class);
59 +// startActivity(myIntent);
60 +// return;
61 +// }
62 +// if (view.getId() == R.id.ll_auth_logout) {
98 // mPbLoading.setVisibility(View.VISIBLE); 63 // mPbLoading.setVisibility(View.VISIBLE);
99 -// WarplyManager.getCosmoteUser(mEtGuid.getText().toString(), mLoginReceiver); 64 +// WarplyManager.logout(mLogoutReceiver);
100 - 65 +// return;
66 +// }
67 + if (view.getId() == R.id.ll_sm_flow) {
101 Intent myIntent = new Intent(getContext(), HomeActivity.class); 68 Intent myIntent = new Intent(getContext(), HomeActivity.class);
102 startActivity(myIntent); 69 startActivity(myIntent);
103 - return;
104 - }
105 - if (view.getId() == R.id.ll_auth_logout) {
106 - mPbLoading.setVisibility(View.VISIBLE);
107 - WarplyManager.logout(mLogoutReceiver);
108 - return;
109 - }
110 - if (view.getId() == R.id.ll_sm_flow) {
111 - WarplyManagerHelper.openSupermarketsFlow(getContext());
112 - return;
113 - }
114 - if (view.getId() == R.id.ll_sm_map) {
115 - WarplyManagerHelper.openSupermarketsMap(getContext());
116 } 70 }
117 } 71 }
118 72
...@@ -124,11 +78,7 @@ public class HomeFragment extends Fragment implements View.OnClickListener { ...@@ -124,11 +78,7 @@ public class HomeFragment extends Fragment implements View.OnClickListener {
124 private final CallbackReceiver<JSONObject> mLogoutReceiver = new CallbackReceiver<JSONObject>() { 78 private final CallbackReceiver<JSONObject> mLogoutReceiver = new CallbackReceiver<JSONObject>() {
125 @Override 79 @Override
126 public void onSuccess(JSONObject result) { 80 public void onSuccess(JSONObject result) {
127 - mTvUser.setVisibility(View.GONE);
128 mPbLoading.setVisibility(View.GONE); 81 mPbLoading.setVisibility(View.GONE);
129 - mLlAuthLogout.setVisibility(View.GONE);
130 - mLlAuthLogin.setVisibility(View.VISIBLE);
131 - mEtGuid.setVisibility(View.VISIBLE);
132 Toast.makeText(getActivity(), "LOGOUT SUCCESS", Toast.LENGTH_SHORT).show(); 82 Toast.makeText(getActivity(), "LOGOUT SUCCESS", Toast.LENGTH_SHORT).show();
133 } 83 }
134 84
...@@ -143,11 +93,7 @@ public class HomeFragment extends Fragment implements View.OnClickListener { ...@@ -143,11 +93,7 @@ public class HomeFragment extends Fragment implements View.OnClickListener {
143 @Override 93 @Override
144 public void onSuccess(JSONObject result) { 94 public void onSuccess(JSONObject result) {
145 mPbLoading.setVisibility(View.GONE); 95 mPbLoading.setVisibility(View.GONE);
146 - mLlAuthLogin.setVisibility(View.GONE); 96 + Toast.makeText(getActivity(), "LOGIN SUCCESS", Toast.LENGTH_SHORT).show();
147 - mEtGuid.setVisibility(View.GONE);
148 - mLlAuthLogout.setVisibility(View.VISIBLE);
149 - mTvUser.setVisibility(View.VISIBLE);
150 - mTvUser.setText(mEtGuid.getText().toString());
151 } 97 }
152 98
153 @Override 99 @Override
......
1 -/*
2 - * Copyright 2010-2013 Warply Ltd. All rights reserved.
3 - *
4 - * Redistribution and use in source and binary forms, without modification, are
5 - * permitted provided that the following conditions are met:
6 - *
7 - * 1. Redistributions of source code must retain the above copyright notice,
8 - * this list of conditions and the following disclaimer.
9 - *
10 - * 2. Redistributions in binary form must reproduce the above copyright notice,
11 - * this list of conditions and the following disclaimer in the documentation
12 - * and/or other materials provided with the distribution.
13 - *
14 - * THIS SOFTWARE IS PROVIDED BY THE WARPLY LTD ``AS IS'' AND ANY EXPRESS OR
15 - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
17 - * EVENT SHALL WARPLY LTD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
18 - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19 - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
20 - * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
21 - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
22 - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
23 - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 - */
25 -
26 -package ly.warp.sdk.io.models;
27 -
28 -import java.util.HashMap;
29 -
30 -/**
31 - * Created by Panagiotis Triantafyllou on 21-Oct-22.
32 - */
33 -
34 -public class LoyaltySDKDynatraceEventModel {
35 - private String eventName;
36 - private HashMap<String, String> parameters;
37 -
38 - public LoyaltySDKDynatraceEventModel() {
39 - this.eventName = "";
40 - this.parameters = new HashMap();
41 - }
42 -
43 - public String getEventName() {
44 - return eventName;
45 - }
46 -
47 - public void setEventName(String eventName) {
48 - this.eventName = eventName;
49 - }
50 -
51 - public HashMap<String, String> getParameters() {
52 - return parameters;
53 - }
54 -
55 - public void setParameter(String key, String value) {
56 - this.parameters.put(key, value);
57 - }
58 -}
1 -/*
2 - * Copyright 2010-2013 Warply Ltd. All rights reserved.
3 - *
4 - * Redistribution and use in source and binary forms, without modification, are
5 - * permitted provided that the following conditions are met:
6 - *
7 - * 1. Redistributions of source code must retain the above copyright notice,
8 - * this list of conditions and the following disclaimer.
9 - *
10 - * 2. Redistributions in binary form must reproduce the above copyright notice,
11 - * this list of conditions and the following disclaimer in the documentation
12 - * and/or other materials provided with the distribution.
13 - *
14 - * THIS SOFTWARE IS PROVIDED BY THE WARPLY LTD ``AS IS'' AND ANY EXPRESS OR
15 - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
17 - * EVENT SHALL WARPLY LTD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
18 - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19 - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
20 - * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
21 - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
22 - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
23 - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 - */
25 -
26 -package ly.warp.sdk.io.models;
27 -
28 -import java.util.HashMap;
29 -
30 -/**
31 - * Created by Panagiotis Triantafyllou on 25-May-22.
32 - */
33 -
34 -public class LoyaltySDKFirebaseEventModel {
35 - private String eventName;
36 - private HashMap<String, String> parameters;
37 -
38 - public LoyaltySDKFirebaseEventModel() {
39 - this.eventName = "";
40 - this.parameters = new HashMap();
41 - }
42 -
43 - public String getEventName() {
44 - return eventName;
45 - }
46 -
47 - public void setEventName(String eventName) {
48 - this.eventName = eventName;
49 - }
50 -
51 - public HashMap<String, String> getParameters() {
52 - return parameters;
53 - }
54 -
55 - public void setParameter(String key, String value) {
56 - this.parameters.put(key, value);
57 - }
58 -}
...@@ -31,16 +31,14 @@ public interface ApiService { ...@@ -31,16 +31,14 @@ public interface ApiService {
31 // =========================================================== 31 // ===========================================================
32 32
33 @Headers("Content-Type: application/json") 33 @Headers("Content-Type: application/json")
34 - @POST("/partners/oauth/{appUuid}/token") 34 + @POST("/partners/dei/app_login")
35 - Call<ResponseBody> cosmoteUser(@Path("appUuid") String appUuid, 35 + Call<ResponseBody> dehUser(@Body RequestBody request,
36 - @Body RequestBody request,
37 @Header(WarpConstants.HEADER_DATE) String timeStamp, 36 @Header(WarpConstants.HEADER_DATE) String timeStamp,
38 @Header(WarpConstants.HEADER_LOYALTY_BUNDLE_ID) String bundleId, 37 @Header(WarpConstants.HEADER_LOYALTY_BUNDLE_ID) String bundleId,
39 @Header(WarpConstants.HEADER_UNIQUE_DEVICE_ID) String deviceId, 38 @Header(WarpConstants.HEADER_UNIQUE_DEVICE_ID) String deviceId,
40 @Header(WarpConstants.HEADER_CHANNEL) String channel, 39 @Header(WarpConstants.HEADER_CHANNEL) String channel,
41 @Header(WarpConstants.HEADER_WEB_ID) String webId, 40 @Header(WarpConstants.HEADER_WEB_ID) String webId,
42 - @Header(WarpConstants.HEADER_SIGNATURE) String signature, 41 + @Header(WarpConstants.HEADER_SIGNATURE) String signature);
43 - @Header(WarpConstants.HEADER_AUTHORIZATION) String basic);
44 42
45 @Headers("Content-Type: application/json") 43 @Headers("Content-Type: application/json")
46 @POST("/partners/cosmote/verify") 44 @POST("/partners/cosmote/verify")
......
1 -package ly.warp.sdk.services;
2 -
3 -import android.content.Context;
4 -
5 -import androidx.annotation.NonNull;
6 -import androidx.work.Worker;
7 -import androidx.work.WorkerParameters;
8 -
9 -/**
10 - * Created by Panagiotis Triantafyllou on 05/Sept/2022.
11 - */
12 -public class EventRewardsCouponsService extends Worker {
13 -
14 - public EventRewardsCouponsService(@NonNull Context context, @NonNull WorkerParameters workerParams) {
15 - super(context, workerParams);
16 - }
17 -
18 - @NonNull
19 - @Override
20 - public Result doWork() {
21 - return Result.success();
22 - }
23 -}
...@@ -70,13 +70,11 @@ import java.io.IOException; ...@@ -70,13 +70,11 @@ import java.io.IOException;
70 import java.io.InputStream; 70 import java.io.InputStream;
71 import java.io.InputStreamReader; 71 import java.io.InputStreamReader;
72 import java.nio.charset.Charset; 72 import java.nio.charset.Charset;
73 -import java.security.GeneralSecurityException;
74 import java.security.MessageDigest; 73 import java.security.MessageDigest;
75 import java.security.NoSuchAlgorithmException; 74 import java.security.NoSuchAlgorithmException;
76 import java.util.concurrent.TimeUnit; 75 import java.util.concurrent.TimeUnit;
77 import java.util.zip.GZIPInputStream; 76 import java.util.zip.GZIPInputStream;
78 77
79 -import ly.warp.sdk.R;
80 import ly.warp.sdk.services.EventRefreshDeviceTokenService; 78 import ly.warp.sdk.services.EventRefreshDeviceTokenService;
81 import ly.warp.sdk.utils.constants.WarpConstants; 79 import ly.warp.sdk.utils.constants.WarpConstants;
82 80
...@@ -103,7 +101,7 @@ public class WarpUtils { ...@@ -103,7 +101,7 @@ public class WarpUtils {
103 private static final String PREFERENCES_KEY_GCM_ENABLED = PREFERENCES_PREFIX 101 private static final String PREFERENCES_KEY_GCM_ENABLED = PREFERENCES_PREFIX
104 + "gcm_enabled"; 102 + "gcm_enabled";
105 private static final String PREFERENCES_KEY_LAST_APPLICATION_UUID = PREFERENCES_PREFIX 103 private static final String PREFERENCES_KEY_LAST_APPLICATION_UUID = PREFERENCES_PREFIX
106 - + "last_appplixation_uuid"; 104 + + "last_application_uuid";
107 private static final String PREFERENCES_KEY_TIMESTAMP = PREFERENCES_PREFIX 105 private static final String PREFERENCES_KEY_TIMESTAMP = PREFERENCES_PREFIX
108 + "timestamp"; 106 + "timestamp";
109 private static final String PREFERENCES_KEY_DEVICE_TOKEN = PREFERENCES_PREFIX 107 private static final String PREFERENCES_KEY_DEVICE_TOKEN = PREFERENCES_PREFIX
...@@ -138,28 +136,10 @@ public class WarpUtils { ...@@ -138,28 +136,10 @@ public class WarpUtils {
138 + "device_info_data"; 136 + "device_info_data";
139 private static final String PREFERENCES_KEY_LIFECYCLE_ANALYTICS_ENABLED = PREFERENCES_PREFIX 137 private static final String PREFERENCES_KEY_LIFECYCLE_ANALYTICS_ENABLED = PREFERENCES_PREFIX
140 + "lifecycle_analytics_enabled"; 138 + "lifecycle_analytics_enabled";
141 - private static final String PREFERENCES_KEY_GIFTS_POPUP = PREFERENCES_PREFIX
142 - + "gifts_popup";
143 - private static final String PREFERENCES_KEY_MORE_POPUP = PREFERENCES_PREFIX
144 - + "more_popup";
145 - private static final String PREFERENCES_KEY_USER_TAG = PREFERENCES_PREFIX
146 - + "user_badge";
147 private static final String PREFERENCES_KEY_WEBVIEW_PARAMS = PREFERENCES_PREFIX 139 private static final String PREFERENCES_KEY_WEBVIEW_PARAMS = PREFERENCES_PREFIX
148 + "webview_params"; 140 + "webview_params";
149 - private static final String PREFERENCES_STEPS_COUNTER = PREFERENCES_PREFIX
150 - + "steps_counter";
151 - private static final String PREFERENCES_KEY_USER_NON_TELCO = PREFERENCES_PREFIX
152 - + "user_non_telco";
153 - private static final String PREFERENCES_STEPS_METERS_COUNTER = PREFERENCES_PREFIX
154 - + "steps_meters_counter";
155 - private static final String PREFERENCES_TRACKERS_ENABLED = PREFERENCES_PREFIX
156 - + "trackers_enabled";
157 private static final String PREFERENCES_KEY_LANGUAGE = PREFERENCES_PREFIX 141 private static final String PREFERENCES_KEY_LANGUAGE = PREFERENCES_PREFIX
158 + "language"; 142 + "language";
159 - private static final String PREFERENCES_KEY_STEPS = PREFERENCES_PREFIX
160 - + "steps";
161 - private static final String PREFERENCES_KEY_STEPS_MANUALLY_STOPPED = PREFERENCES_PREFIX
162 - + "steps_manually_stopped";
163 private static final String PREFERENCES_KEY_JWT_ENABLED = PREFERENCES_PREFIX 143 private static final String PREFERENCES_KEY_JWT_ENABLED = PREFERENCES_PREFIX
164 + "jwt_enabled"; 144 + "jwt_enabled";
165 private static final String PREFERENCES_KEY_APP_LOCALE = PREFERENCES_PREFIX 145 private static final String PREFERENCES_KEY_APP_LOCALE = PREFERENCES_PREFIX
...@@ -195,36 +175,6 @@ public class WarpUtils { ...@@ -195,36 +175,6 @@ public class WarpUtils {
195 editor.apply(); 175 editor.apply();
196 } 176 }
197 177
198 - public static boolean getIsSteps(Context context) {
199 - return getPreferences(context).getBoolean(PREFERENCES_KEY_STEPS, false);
200 - }
201 -
202 - public static void setIsSteps(Context context, boolean isSteps) {
203 - SharedPreferences.Editor editor = getPreferences(context).edit();
204 - editor.putBoolean(PREFERENCES_KEY_STEPS, isSteps);
205 - editor.apply();
206 - }
207 -
208 - public static boolean getIsStepsManuallyStopped(Context context) {
209 - return getPreferences(context).getBoolean(PREFERENCES_KEY_STEPS_MANUALLY_STOPPED, false);
210 - }
211 -
212 - public static void setIsStepsManuallyStopped(Context context, boolean isManuallyStopped) {
213 - SharedPreferences.Editor editor = getPreferences(context).edit();
214 - editor.putBoolean(PREFERENCES_KEY_STEPS_MANUALLY_STOPPED, isManuallyStopped);
215 - editor.apply();
216 - }
217 -
218 - public static String getUserTag(Context context) {
219 - return getPreferences(context).getString(PREFERENCES_KEY_USER_TAG, "");
220 - }
221 -
222 - public static void setUserTag(Context context, String userTag) {
223 - SharedPreferences.Editor editor = getPreferences(context).edit();
224 - editor.putString(PREFERENCES_KEY_USER_TAG, userTag);
225 - editor.apply();
226 - }
227 -
228 public static String getLanguage(Context context) { 178 public static String getLanguage(Context context) {
229 return getPreferences(context).getString(PREFERENCES_KEY_LANGUAGE, "el"); 179 return getPreferences(context).getString(PREFERENCES_KEY_LANGUAGE, "el");
230 } 180 }
...@@ -235,16 +185,6 @@ public class WarpUtils { ...@@ -235,16 +185,6 @@ public class WarpUtils {
235 editor.apply(); 185 editor.apply();
236 } 186 }
237 187
238 - public static boolean getUserNonTelco(Context context) {
239 - return getPreferences(context).getBoolean(PREFERENCES_KEY_USER_NON_TELCO, false);
240 - }
241 -
242 - public static void setUserNonTelco(Context context, boolean userNonTelco) {
243 - SharedPreferences.Editor editor = getPreferences(context).edit();
244 - editor.putBoolean(PREFERENCES_KEY_USER_NON_TELCO, userNonTelco);
245 - editor.apply();
246 - }
247 -
248 /** 188 /**
249 * Method used to return the token of this device for the GCM service 189 * Method used to return the token of this device for the GCM service
250 * 190 *
...@@ -255,7 +195,6 @@ public class WarpUtils { ...@@ -255,7 +195,6 @@ public class WarpUtils {
255 } 195 }
256 196
257 public static void setRegistrationGCM(Context context, String registrationGCM) { 197 public static void setRegistrationGCM(Context context, String registrationGCM) {
258 -
259 SharedPreferences.Editor editor = getPreferences(context).edit(); 198 SharedPreferences.Editor editor = getPreferences(context).edit();
260 editor.putString(PREFERENCES_KEY_REGISTRATION_GCM, registrationGCM); 199 editor.putString(PREFERENCES_KEY_REGISTRATION_GCM, registrationGCM);
261 editor.apply(); 200 editor.apply();
...@@ -283,36 +222,10 @@ public class WarpUtils { ...@@ -283,36 +222,10 @@ public class WarpUtils {
283 editor.apply(); 222 editor.apply();
284 } 223 }
285 224
286 - public static boolean getGiftsPopup(Context context) {
287 - SharedPreferences prefs = getPreferences(context);
288 - return prefs.getBoolean(PREFERENCES_KEY_GIFTS_POPUP, true);
289 - }
290 -
291 - public static void setGiftsPopup(Context context, boolean visible) {
292 - SharedPreferences.Editor editor = getPreferences(context).edit();
293 - editor.putBoolean(PREFERENCES_KEY_GIFTS_POPUP, visible);
294 - editor.apply();
295 - }
296 -
297 - public static boolean getMorePopup(Context context) {
298 - SharedPreferences prefs = getPreferences(context);
299 - return prefs.getBoolean(PREFERENCES_KEY_MORE_POPUP, true);
300 - }
301 -
302 - public static void setMorePopup(Context context, boolean visible) {
303 - SharedPreferences.Editor editor = getPreferences(context).edit();
304 - editor.putBoolean(PREFERENCES_KEY_MORE_POPUP, visible);
305 - editor.apply();
306 - }
307 -
308 public static boolean isRegisteredWarply(Context context) { 225 public static boolean isRegisteredWarply(Context context) {
309 return !("".equalsIgnoreCase(getWebId(context))); 226 return !("".equalsIgnoreCase(getWebId(context)));
310 } 227 }
311 228
312 - public static void invalidateRegistrationWarply(Context context) {
313 - setWebId(context, "");
314 - }
315 -
316 private static SharedPreferences getPreferences(Context context) { 229 private static SharedPreferences getPreferences(Context context) {
317 if (_prefs == null) { 230 if (_prefs == null) {
318 try { 231 try {
...@@ -708,39 +621,6 @@ public class WarpUtils { ...@@ -708,39 +621,6 @@ public class WarpUtils {
708 return prefs.getString(PREFERENCES_KEY_WEBVIEW_PARAMS, ""); 621 return prefs.getString(PREFERENCES_KEY_WEBVIEW_PARAMS, "");
709 } 622 }
710 623
711 - public static synchronized void setStepsCounter(Context context, int counter) {
712 - SharedPreferences.Editor editor = getPreferences(context).edit();
713 - editor.putInt(PREFERENCES_STEPS_COUNTER, counter);
714 - editor.apply();
715 - }
716 -
717 - public static synchronized int getStepsCounter(Context context) {
718 - SharedPreferences prefs = getPreferences(context);
719 - return prefs.getInt(PREFERENCES_STEPS_COUNTER, 0);
720 - }
721 -
722 - public static void setStepsMetersCounter(Context context, double counter) {
723 - SharedPreferences.Editor editor = getPreferences(context).edit();
724 - editor.putLong(PREFERENCES_STEPS_METERS_COUNTER, Double.doubleToRawLongBits(counter));
725 - editor.apply();
726 - }
727 -
728 - public static double getStepsMetersCounter(Context context) {
729 - SharedPreferences prefs = getPreferences(context);
730 - return Double.longBitsToDouble(prefs.getLong(PREFERENCES_STEPS_METERS_COUNTER, 0));
731 - }
732 -
733 - public static void setTrackersEnabled(Context context, boolean isEnabled) {
734 - SharedPreferences.Editor editor = getPreferences(context).edit();
735 - editor.putBoolean(PREFERENCES_TRACKERS_ENABLED, isEnabled);
736 - editor.apply();
737 - }
738 -
739 - public static boolean getTrackersEnabled(Context context) {
740 - SharedPreferences prefs = getPreferences(context);
741 - return prefs.getBoolean(PREFERENCES_TRACKERS_ENABLED, false);
742 - }
743 -
744 public static JSONObject getDeviceInfoObject(Context context) { 624 public static JSONObject getDeviceInfoObject(Context context) {
745 SharedPreferences prefs = getPreferences(context); 625 SharedPreferences prefs = getPreferences(context);
746 try { 626 try {
......
...@@ -72,14 +72,11 @@ public class WarplyDeviceInfoCollector { ...@@ -72,14 +72,11 @@ public class WarplyDeviceInfoCollector {
72 if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mContext) == ConnectionResult.SUCCESS) { 72 if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mContext) == ConnectionResult.SUCCESS) {
73 //Google Play Services are available 73 //Google Play Services are available
74 try { 74 try {
75 - if (WarpUtils.getTrackersEnabled(mContext)) {
76 jObj.putOpt("platform", "android"); 75 jObj.putOpt("platform", "android");
77 jObj.putOpt("manufacturer", getDeviceManufacturer()); 76 jObj.putOpt("manufacturer", getDeviceManufacturer());
78 jObj.putOpt("android_phone_model", getDeviceModel()); 77 jObj.putOpt("android_phone_model", getDeviceModel());
79 jObj.putOpt("os_version", getOsVersion()); 78 jObj.putOpt("os_version", getOsVersion());
80 jObj.putOpt("app_version", getAppVersion()); 79 jObj.putOpt("app_version", getAppVersion());
81 - }
82 -
83 jObj.putOpt("registration_gcm", getRegistrationGCM()); 80 jObj.putOpt("registration_gcm", getRegistrationGCM());
84 jObj.putOpt("vendor", "google"); 81 jObj.putOpt("vendor", "google");
85 jObj.putOpt("unique_device_id", getUniqueDeviceId()); 82 jObj.putOpt("unique_device_id", getUniqueDeviceId());
...@@ -91,14 +88,11 @@ public class WarplyDeviceInfoCollector { ...@@ -91,14 +88,11 @@ public class WarplyDeviceInfoCollector {
91 } else { 88 } else {
92 //Google Play Services are not available, or not updated 89 //Google Play Services are not available, or not updated
93 try { 90 try {
94 - if (WarpUtils.getTrackersEnabled(mContext)) {
95 jObj.putOpt("platform", "android"); 91 jObj.putOpt("platform", "android");
96 jObj.putOpt("manufacturer", getDeviceManufacturer()); 92 jObj.putOpt("manufacturer", getDeviceManufacturer());
97 jObj.putOpt("android_phone_model", getDeviceModel()); 93 jObj.putOpt("android_phone_model", getDeviceModel());
98 jObj.putOpt("os_version", getOsVersion()); 94 jObj.putOpt("os_version", getOsVersion());
99 jObj.putOpt("app_version", getAppVersion()); 95 jObj.putOpt("app_version", getAppVersion());
100 - }
101 -
102 jObj.putOpt("vendor", "huawei"); 96 jObj.putOpt("vendor", "huawei");
103 jObj.putOpt("registration_gcm", getRegistrationGCM()); 97 jObj.putOpt("registration_gcm", getRegistrationGCM());
104 jObj.putOpt("unique_device_id", getUniqueDeviceId()); 98 jObj.putOpt("unique_device_id", getUniqueDeviceId());
...@@ -122,14 +116,11 @@ public class WarplyDeviceInfoCollector { ...@@ -122,14 +116,11 @@ public class WarplyDeviceInfoCollector {
122 if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mContext) == ConnectionResult.SUCCESS) { 116 if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mContext) == ConnectionResult.SUCCESS) {
123 //Google Play Services are available 117 //Google Play Services are available
124 try { 118 try {
125 - if (WarpUtils.getTrackersEnabled(mContext)) {
126 jObj.putOpt("platform", "android"); 119 jObj.putOpt("platform", "android");
127 jObj.putOpt("manufacturer", getDeviceManufacturer()); 120 jObj.putOpt("manufacturer", getDeviceManufacturer());
128 jObj.putOpt("android_phone_model", getDeviceModel()); 121 jObj.putOpt("android_phone_model", getDeviceModel());
129 jObj.putOpt("os_version", getOsVersion()); 122 jObj.putOpt("os_version", getOsVersion());
130 jObj.putOpt("app_version", getAppVersion()); 123 jObj.putOpt("app_version", getAppVersion());
131 - }
132 -
133 jObj.putOpt("unique_device_id", getUniqueDeviceId()); 124 jObj.putOpt("unique_device_id", getUniqueDeviceId());
134 jObj.putOpt("vendor", "google"); 125 jObj.putOpt("vendor", "google");
135 } catch (JSONException e) { 126 } catch (JSONException e) {
...@@ -140,14 +131,11 @@ public class WarplyDeviceInfoCollector { ...@@ -140,14 +131,11 @@ public class WarplyDeviceInfoCollector {
140 } else { 131 } else {
141 //Google Play Services are not available, or not updated 132 //Google Play Services are not available, or not updated
142 try { 133 try {
143 - if (WarpUtils.getTrackersEnabled(mContext)) {
144 jObj.putOpt("platform", "android"); 134 jObj.putOpt("platform", "android");
145 jObj.putOpt("manufacturer", getDeviceManufacturer()); 135 jObj.putOpt("manufacturer", getDeviceManufacturer());
146 jObj.putOpt("android_phone_model", getDeviceModel()); 136 jObj.putOpt("android_phone_model", getDeviceModel());
147 jObj.putOpt("os_version", getOsVersion()); 137 jObj.putOpt("os_version", getOsVersion());
148 jObj.putOpt("app_version", getAppVersion()); 138 jObj.putOpt("app_version", getAppVersion());
149 - }
150 -
151 jObj.putOpt("unique_device_id", getUniqueDeviceId()); 139 jObj.putOpt("unique_device_id", getUniqueDeviceId());
152 jObj.putOpt("vendor", "huawei"); 140 jObj.putOpt("vendor", "huawei");
153 } catch (JSONException e) { 141 } catch (JSONException e) {
......
...@@ -25,19 +25,15 @@ ...@@ -25,19 +25,15 @@
25 25
26 package ly.warp.sdk.utils; 26 package ly.warp.sdk.utils;
27 27
28 -import android.content.Context;
29 -
30 import org.json.JSONException; 28 import org.json.JSONException;
31 import org.json.JSONObject; 29 import org.json.JSONObject;
32 30
33 import java.util.ArrayList; 31 import java.util.ArrayList;
34 32
35 import ly.warp.sdk.Warply; 33 import ly.warp.sdk.Warply;
36 -import ly.warp.sdk.activities.WarpViewActivity;
37 import ly.warp.sdk.db.WarplyDBHelper; 34 import ly.warp.sdk.db.WarplyDBHelper;
38 import ly.warp.sdk.io.models.Campaign; 35 import ly.warp.sdk.io.models.Campaign;
39 import ly.warp.sdk.io.models.CouponList; 36 import ly.warp.sdk.io.models.CouponList;
40 -import ly.warp.sdk.utils.constants.WarpConstants;
41 import ly.warp.sdk.utils.managers.WarplyManager; 37 import ly.warp.sdk.utils.managers.WarplyManager;
42 38
43 /** 39 /**
...@@ -55,8 +51,7 @@ public class WarplyManagerHelper { ...@@ -55,8 +51,7 @@ public class WarplyManagerHelper {
55 // =========================================================== 51 // ===========================================================
56 52
57 private static CouponList mCouponRedeemedList = new CouponList(); 53 private static CouponList mCouponRedeemedList = new CouponList();
58 - private static ArrayList<Campaign> mCampaignListAll = new ArrayList<Campaign>(), 54 + private static ArrayList<Campaign> mCampaignListAll = new ArrayList<Campaign>();
59 - mSupermarketCampaigns = new ArrayList<Campaign>();
60 55
61 // =========================================================== 56 // ===========================================================
62 // Methods for/from SuperClass/Interfaces 57 // Methods for/from SuperClass/Interfaces
...@@ -66,20 +61,11 @@ public class WarplyManagerHelper { ...@@ -66,20 +61,11 @@ public class WarplyManagerHelper {
66 // Methods 61 // Methods
67 // =========================================================== 62 // ===========================================================
68 63
69 - public static void setTrackersEnabled(Context context, boolean isEnabled) {
70 - WarpUtils.setTrackersEnabled(context, isEnabled);
71 - }
72 -
73 public static void setCampaignList(ArrayList<Campaign> campaignList) { 64 public static void setCampaignList(ArrayList<Campaign> campaignList) {
74 mCampaignListAll.clear(); 65 mCampaignListAll.clear();
75 mCampaignListAll.addAll(campaignList); 66 mCampaignListAll.addAll(campaignList);
76 } 67 }
77 68
78 - public static void setSupermarketCampaigns(ArrayList<Campaign> campaignList) {
79 - mSupermarketCampaigns.clear();
80 - mSupermarketCampaigns.addAll(campaignList);
81 - }
82 -
83 public static void setCouponRedeemedList(CouponList couponRedeemedList) { 69 public static void setCouponRedeemedList(CouponList couponRedeemedList) {
84 mCouponRedeemedList.clear(); 70 mCouponRedeemedList.clear();
85 mCouponRedeemedList.addAll(couponRedeemedList); 71 mCouponRedeemedList.addAll(couponRedeemedList);
...@@ -140,78 +126,6 @@ public class WarplyManagerHelper { ...@@ -140,78 +126,6 @@ public class WarplyManagerHelper {
140 return url; 126 return url;
141 } 127 }
142 128
143 - public static void openSupermarketsFlow(Context context) {
144 - if (mSupermarketCampaigns == null || mSupermarketCampaigns.isEmpty()) {
145 - return;
146 - }
147 -
148 - JSONObject params = new JSONObject();
149 - try {
150 - params.putOpt("web_id", WarpUtils.getWebId(context));
151 - params.putOpt("app_uuid", WarplyProperty.getAppUuid(context));
152 - params.putOpt("api_key", WarpUtils.getApiKey(context));
153 - params.putOpt("session_uuid", "");
154 - params.putOpt("access_token", WarplyDBHelper.getInstance(context).getAuthValue("access_token"));
155 - params.putOpt("refresh_token", WarplyDBHelper.getInstance(context).getAuthValue("refresh_token"));
156 - params.putOpt("client_id", WarplyDBHelper.getInstance(context).getClientValue("client_id"));
157 - params.putOpt("client_secret", WarplyDBHelper.getInstance(context).getClientValue("client_secret"));
158 - params.putOpt("lan", WarpUtils.getApplicationLocale(context));
159 - params.putOpt("dark", String.valueOf(WarpUtils.getIsDarkModeEnabled(context)));
160 - } catch (JSONException e) {
161 - e.printStackTrace();
162 - }
163 -
164 - WarpUtils.setWebviewParams(context, params);
165 -
166 - context.startActivity(WarpViewActivity.createIntentFromURL(context, WarplyManagerHelper.constructCampaignUrl(mSupermarketCampaigns.get(0))));
167 - }
168 -
169 - public static void openSupermarketsMap(Context context) {
170 - JSONObject params = new JSONObject();
171 - try {
172 - params.putOpt("web_id", WarpUtils.getWebId(context));
173 - params.putOpt("app_uuid", WarplyProperty.getAppUuid(context));
174 - params.putOpt("api_key", WarpUtils.getApiKey(context));
175 - params.putOpt("session_uuid", "");
176 - params.putOpt("access_token", WarplyDBHelper.getInstance(context).getAuthValue("access_token"));
177 - params.putOpt("refresh_token", WarplyDBHelper.getInstance(context).getAuthValue("refresh_token"));
178 - params.putOpt("client_id", WarplyDBHelper.getInstance(context).getClientValue("client_id"));
179 - params.putOpt("client_secret", WarplyDBHelper.getInstance(context).getClientValue("client_secret"));
180 - params.putOpt("map", "true");
181 - params.putOpt("lan", WarpUtils.getApplicationLocale(context));
182 - params.putOpt("dark", String.valueOf(WarpUtils.getIsDarkModeEnabled(context)));
183 - } catch (JSONException e) {
184 - e.printStackTrace();
185 - }
186 -
187 - WarpUtils.setWebviewParams(context, params);
188 -
189 - context.startActivity(WarpViewActivity.createIntentFromURL(context, (WarplyProperty.getSupermarketsUrl(context) + WarpConstants.SUPERMARKETS_MAP)));
190 - }
191 -
192 - public static void openContest(Context context) {
193 - final String mContestUrl = "https://warply.s3.amazonaws.com/dei/campaigns/DehEasterContest_stage/index.html";
194 - JSONObject params = new JSONObject();
195 - try {
196 - params.putOpt("web_id", WarpUtils.getWebId(context));
197 - params.putOpt("app_uuid", WarplyProperty.getAppUuid(context));
198 - params.putOpt("api_key", WarpUtils.getApiKey(context));
199 - params.putOpt("session_uuid", "");
200 - params.putOpt("access_token", WarplyDBHelper.getInstance(context).getAuthValue("access_token"));
201 - params.putOpt("refresh_token", WarplyDBHelper.getInstance(context).getAuthValue("refresh_token"));
202 - params.putOpt("client_id", WarplyDBHelper.getInstance(context).getClientValue("client_id"));
203 - params.putOpt("client_secret", WarplyDBHelper.getInstance(context).getClientValue("client_secret"));
204 - params.putOpt("lan", WarpUtils.getApplicationLocale(context));
205 - params.putOpt("dark", String.valueOf(WarpUtils.getIsDarkModeEnabled(context)));
206 - } catch (JSONException e) {
207 - e.printStackTrace();
208 - }
209 -
210 - WarpUtils.setWebviewParams(context, params);
211 -
212 - context.startActivity(WarpViewActivity.createIntentFromURL(context, mContestUrl));
213 - }
214 -
215 // =========================================================== 129 // ===========================================================
216 // Inner and Anonymous Classes 130 // Inner and Anonymous Classes
217 // =========================================================== 131 // ===========================================================
......
...@@ -49,7 +49,6 @@ public class WarplyProperty { ...@@ -49,7 +49,6 @@ public class WarplyProperty {
49 public static final String KEY_LOGIN_TYPE = "LoginType"; 49 public static final String KEY_LOGIN_TYPE = "LoginType";
50 public static final String KEY_DL_URL_SCHEME = "DL_URL_SCHEME"; 50 public static final String KEY_DL_URL_SCHEME = "DL_URL_SCHEME";
51 public static final String KEY_BASE_URL = "BaseURL"; 51 public static final String KEY_BASE_URL = "BaseURL";
52 - public static final String KEY_SUPERMARKETS_URL = "SupermarketsURL";
53 public static final String KEY_VERIFY_URL = "VerifyURL"; 52 public static final String KEY_VERIFY_URL = "VerifyURL";
54 53
55 // =========================================================== 54 // ===========================================================
...@@ -205,10 +204,6 @@ public class WarplyProperty { ...@@ -205,10 +204,6 @@ public class WarplyProperty {
205 return getWarplyProperty(context, KEY_BASE_URL); 204 return getWarplyProperty(context, KEY_BASE_URL);
206 } 205 }
207 206
208 - public static String getSupermarketsUrl(Context context) {
209 - return getWarplyProperty(context, KEY_SUPERMARKETS_URL);
210 - }
211 -
212 public static String getVerifyUrl(Context context) { 207 public static String getVerifyUrl(Context context) {
213 return getWarplyProperty(context, KEY_VERIFY_URL); 208 return getWarplyProperty(context, KEY_VERIFY_URL);
214 } 209 }
......
1 package ly.warp.sdk.utils.managers; 1 package ly.warp.sdk.utils.managers;
2 2
3 -import ly.warp.sdk.io.models.LoyaltySDKDynatraceEventModel;
4 -import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
5 import ly.warp.sdk.io.models.QuestionnaireEventModel; 3 import ly.warp.sdk.io.models.QuestionnaireEventModel;
6 import ly.warp.sdk.io.models.WarplyWebviewActivityCallbackEventModel; 4 import ly.warp.sdk.io.models.WarplyWebviewActivityCallbackEventModel;
7 import ly.warp.sdk.io.models.WarplyWebviewCallbackEventModel; 5 import ly.warp.sdk.io.models.WarplyWebviewCallbackEventModel;
...@@ -10,8 +8,6 @@ import ly.warp.sdk.io.models.WarplyWebviewCallbackEventModel; ...@@ -10,8 +8,6 @@ import ly.warp.sdk.io.models.WarplyWebviewCallbackEventModel;
10 * Created by Panagiotis Triantafyllou on 26/Απρ/2022. 8 * Created by Panagiotis Triantafyllou on 26/Απρ/2022.
11 */ 9 */
12 public class WarplyEventBusManager { 10 public class WarplyEventBusManager {
13 - private LoyaltySDKFirebaseEventModel fireEvent;
14 - private LoyaltySDKDynatraceEventModel dynatraceEvent;
15 private WarplyWebviewCallbackEventModel webviewCallback; 11 private WarplyWebviewCallbackEventModel webviewCallback;
16 private WarplyWebviewActivityCallbackEventModel webviewActivityCallback; 12 private WarplyWebviewActivityCallbackEventModel webviewActivityCallback;
17 private QuestionnaireEventModel questionnaire; 13 private QuestionnaireEventModel questionnaire;
...@@ -28,14 +24,6 @@ public class WarplyEventBusManager { ...@@ -28,14 +24,6 @@ public class WarplyEventBusManager {
28 this.webviewActivityCallback = webviewActivityCallback; 24 this.webviewActivityCallback = webviewActivityCallback;
29 } 25 }
30 26
31 - public WarplyEventBusManager(LoyaltySDKFirebaseEventModel fireEvent) {
32 - this.fireEvent = fireEvent;
33 - }
34 -
35 - public WarplyEventBusManager(LoyaltySDKDynatraceEventModel dynatraceEvent) {
36 - this.dynatraceEvent = dynatraceEvent;
37 - }
38 -
39 public WarplyWebviewCallbackEventModel getWarplyWebviewCallbackEventModel() { 27 public WarplyWebviewCallbackEventModel getWarplyWebviewCallbackEventModel() {
40 return webviewCallback; 28 return webviewCallback;
41 } 29 }
......
...@@ -81,10 +81,7 @@ import java.util.Map; ...@@ -81,10 +81,7 @@ import java.util.Map;
81 81
82 import ly.warp.sdk.R; 82 import ly.warp.sdk.R;
83 import ly.warp.sdk.Warply; 83 import ly.warp.sdk.Warply;
84 -import ly.warp.sdk.activities.WarpViewActivity;
85 import ly.warp.sdk.db.WarplyDBHelper; 84 import ly.warp.sdk.db.WarplyDBHelper;
86 -import ly.warp.sdk.io.models.LoyaltySDKDynatraceEventModel;
87 -import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
88 import ly.warp.sdk.io.models.QuestionnaireEventModel; 85 import ly.warp.sdk.io.models.QuestionnaireEventModel;
89 import ly.warp.sdk.utils.WarpUtils; 86 import ly.warp.sdk.utils.WarpUtils;
90 import ly.warp.sdk.utils.WarplyProperty; 87 import ly.warp.sdk.utils.WarplyProperty;
...@@ -101,7 +98,6 @@ public class WarpView extends WebView implements DefaultLifecycleObserver { ...@@ -101,7 +98,6 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
101 private static final String URL_ACTION_MAIL = "mailto"; 98 private static final String URL_ACTION_MAIL = "mailto";
102 private static final String URL_ACTION_MARKET = "market"; 99 private static final String URL_ACTION_MARKET = "market";
103 private static final String URL_ACTION_INTENT = "intent"; 100 private static final String URL_ACTION_INTENT = "intent";
104 -
105 private static final String URL_ACTION_MAPS = "geo"; 101 private static final String URL_ACTION_MAPS = "geo";
106 private static final String URL_FALLBACK_MAPS = "https://www.google.com/maps/search/?api=1&query="; 102 private static final String URL_FALLBACK_MAPS = "https://www.google.com/maps/search/?api=1&query=";
107 private static final String URL_ACTION_MARKET_AUTHORITY = "play.google.com"; 103 private static final String URL_ACTION_MARKET_AUTHORITY = "play.google.com";
...@@ -175,7 +171,7 @@ public class WarpView extends WebView implements DefaultLifecycleObserver { ...@@ -175,7 +171,7 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
175 settings.setAllowUniversalAccessFromFileURLs(true); 171 settings.setAllowUniversalAccessFromFileURLs(true);
176 settings.setSupportMultipleWindows(true); 172 settings.setSupportMultipleWindows(true);
177 // settings.setGeolocationDatabasePath(getContext().getFilesDir().getPath()); 173 // settings.setGeolocationDatabasePath(getContext().getFilesDir().getPath());
178 - WarpView.this.addJavascriptInterface(new JSInterface(), "Cosmote"); 174 + WarpView.this.addJavascriptInterface(new JSInterface(), "DEH");
179 setBackgroundColor(ContextCompat.getColor(getContext(), android.R.color.transparent)); 175 setBackgroundColor(ContextCompat.getColor(getContext(), android.R.color.transparent));
180 setWebViewClient(new WarplyWebViewClient()); 176 setWebViewClient(new WarplyWebViewClient());
181 setWebChromeClient(new WarplyWebChromeClient()); 177 setWebChromeClient(new WarplyWebChromeClient());
...@@ -454,11 +450,7 @@ public class WarpView extends WebView implements DefaultLifecycleObserver { ...@@ -454,11 +450,7 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
454 public void sendMessage(String message) { 450 public void sendMessage(String message) {
455 if (message.contains("event")) { 451 if (message.contains("event")) {
456 String[] parts = message.split(":"); 452 String[] parts = message.split(":");
457 - if (parts[1].equals("webviewRefresh")) { 453 + if (parts[1].equals("closeArtwork")) {
458 - WarpViewActivity.setWebviewSupermarket(true);
459 - } else if (parts[1].equals("closeArtwork")) {
460 - WarpViewActivity.setWebviewSupermarket(false);
461 -
462 QuestionnaireEventModel questionnaireEvent = new QuestionnaireEventModel(); 454 QuestionnaireEventModel questionnaireEvent = new QuestionnaireEventModel();
463 questionnaireEvent.setName(parts[1]); 455 questionnaireEvent.setName(parts[1]);
464 EventBus.getDefault().post(new WarplyEventBusManager(questionnaireEvent)); 456 EventBus.getDefault().post(new WarplyEventBusManager(questionnaireEvent));
...@@ -466,62 +458,6 @@ public class WarpView extends WebView implements DefaultLifecycleObserver { ...@@ -466,62 +458,6 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
466 WarpUtils.log("**************** WARPLY Webview Log START *****************"); 458 WarpUtils.log("**************** WARPLY Webview Log START *****************");
467 WarpUtils.log(message); 459 WarpUtils.log(message);
468 WarpUtils.log("**************** WARPLY Webview Log END *****************"); 460 WarpUtils.log("**************** WARPLY Webview Log END *****************");
469 - } else if (parts[1].equals("loyalty_questionnaire_selected")) {
470 - LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
471 - analyticsEvent.setEventName(parts[1]);
472 - analyticsEvent.setParameter("completed", "true");
473 - EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
474 - } else if (parts[1].equals("loyalty_questionnaire_answer_again") || parts[1].equals("loyalty_questionnaire_answers_deleted")) {
475 - LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
476 - analyticsEvent.setEventName(parts[1]);
477 - EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
478 - } else if (parts[1].equals("loyalty_questionnaire_later")) {
479 - LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
480 - analyticsEvent.setEventName("loyalty_questionnaire_selected");
481 - analyticsEvent.setParameter("completed", "false");
482 - EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
483 - } else if (parts[1].equals("loyalty_sdk_offer_selected")) {
484 - try {
485 - LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
486 - analyticsEvent.setEventName("loyalty_sdk_offer_selected");
487 - analyticsEvent.setParameter("name", parts[2]);
488 - analyticsEvent.setParameter("type", parts[3]);
489 - EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
490 - } catch (Exception e) {
491 - e.printStackTrace();
492 - }
493 - } else if (parts[1].equals("loyalty_offer_activated")) {
494 - try {
495 - LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
496 - analyticsEvent.setEventName("loyalty_sdk_offer_selected");
497 - analyticsEvent.setParameter("name", parts[2]);
498 - analyticsEvent.setParameter("type", parts[3]);
499 - analyticsEvent.setParameter("successful", parts[4]);
500 - EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
501 - } catch (Exception e) {
502 - e.printStackTrace();
503 - }
504 - } else if (parts[1].equals("unified_coupon_activated")) {
505 - try {
506 - LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
507 - analyticsEvent.setEventName("loyalty_sdk_unified_activated");
508 - analyticsEvent.setParameter("name", parts[2]);
509 - analyticsEvent.setParameter("type", parts[3]);
510 - analyticsEvent.setParameter("successful", parts[4]);
511 - EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
512 - } catch (Exception e) {
513 - e.printStackTrace();
514 - }
515 - } else if (parts[1].equals("time_spent_on_loyalty_sdk")) {
516 - try {
517 - LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
518 - analyticsEvent.setEventName("time_spent_on_loyalty_sdk");
519 - analyticsEvent.setParameter("name", parts[2]);
520 - analyticsEvent.setParameter("seconds", parts[3]);
521 - EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
522 - } catch (Exception e) {
523 - e.printStackTrace();
524 - }
525 } else if (parts[1].equals("refreshToken")) { 461 } else if (parts[1].equals("refreshToken")) {
526 try { 462 try {
527 if (Warply.getWarplyContext() != null) { 463 if (Warply.getWarplyContext() != null) {
...@@ -530,30 +466,6 @@ public class WarpView extends WebView implements DefaultLifecycleObserver { ...@@ -530,30 +466,6 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
530 } catch (Exception e) { 466 } catch (Exception e) {
531 e.printStackTrace(); 467 e.printStackTrace();
532 } 468 }
533 - } else if (parts[1].equals("cancel_unified_success")) {
534 - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel();
535 - dynatraceEvent.setEventName("custom_success_cancel_unified_loyalty");
536 - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent));
537 - } else if (parts[1].equals("cancel_unified_failed")) {
538 - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel();
539 - dynatraceEvent.setEventName("custom_error_cancel_unified_loyalty");
540 - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent));
541 - } else if (parts[1].equals("create_unified_success")) {
542 - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel();
543 - dynatraceEvent.setEventName("custom_success_create_unified_loyalty");
544 - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent));
545 - } else if (parts[1].equals("create_unified_failed")) {
546 - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel();
547 - dynatraceEvent.setEventName("custom_error_create_unified_loyalty");
548 - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent));
549 - } else if (parts[1].equals("get_unified_success")) {
550 - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel();
551 - dynatraceEvent.setEventName("custom_success_unified_coupons_loyalty");
552 - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent));
553 - } else if (parts[1].equals("get_unified_failed")) {
554 - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel();
555 - dynatraceEvent.setEventName("custom_error_unified_coupons_loyalty");
556 - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent));
557 } 469 }
558 } 470 }
559 } 471 }
...@@ -571,8 +483,8 @@ public class WarpView extends WebView implements DefaultLifecycleObserver { ...@@ -571,8 +483,8 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
571 builder.setTitle(getContext().getString(R.string.webview_permission_title)); 483 builder.setTitle(getContext().getString(R.string.webview_permission_title));
572 builder.setMessage(getContext().getString(R.string.webview_permission_message)) 484 builder.setMessage(getContext().getString(R.string.webview_permission_message))
573 .setCancelable(false) 485 .setCancelable(false)
574 - .setPositiveButton(getContext().getString(R.string.lbl_take_photo_accept), (dialog, id) -> checkForPermissions(origin, callback)) 486 + .setPositiveButton(getContext().getString(R.string.lbl_ok), (dialog, id) -> checkForPermissions(origin, callback))
575 - .setNegativeButton(getContext().getString(R.string.lbl_take_photo_decline), (dialog, id) -> callback.invoke(origin, false, false)); 487 + .setNegativeButton(getContext().getString(R.string.lbl_cancel), (dialog, id) -> callback.invoke(origin, false, false));
576 AlertDialog alert = builder.create(); 488 AlertDialog alert = builder.create();
577 alert.show(); 489 alert.show();
578 } 490 }
...@@ -603,7 +515,7 @@ public class WarpView extends WebView implements DefaultLifecycleObserver { ...@@ -603,7 +515,7 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
603 geolocationOrigin = origin; 515 geolocationOrigin = origin;
604 geolocationCallback = callback; 516 geolocationCallback = callback;
605 } else { 517 } else {
606 - //TODO: show infromative popup and go to settings 518 + //TODO: show informative popup and go to settings
607 } 519 }
608 } 520 }
609 } 521 }
......
1 +<vector xmlns:android="http://schemas.android.com/apk/res/android"
2 + android:width="48dp"
3 + android:height="48dp"
4 + android:viewportWidth="960"
5 + android:viewportHeight="960"
6 + android:autoMirrored="true">
7 + <path
8 + android:fillColor="@android:color/black"
9 + android:pathData="M180,840Q156,840 138,822Q120,804 120,780L120,180Q120,156 138,138Q156,120 180,120L479,120L479,180L180,180Q180,180 180,180Q180,180 180,180L180,780Q180,780 180,780Q180,780 180,780L479,780L479,840L180,840ZM666,655L623,612L725,510L360,510L360,450L723,450L621,348L664,305L840,481L666,655Z"/>
10 +</vector>
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
3 android:shape="oval"> 3 android:shape="oval">
4 <corners android:radius="1000dp" /> 4 <corners android:radius="1000dp" />
5 5
6 - <solid android:color="@color/pink" /> 6 + <solid android:color="@color/custom_pink" />
7 </shape> 7 </shape>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
6 <solid android:color="@android:color/transparent" /> 6 <solid android:color="@android:color/transparent" />
7 <stroke 7 <stroke
8 android:width="1dp" 8 android:width="1dp"
9 - android:color="@color/black2" /> 9 + android:color="@color/custom_black2" />
10 </shape> 10 </shape>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
6 <solid android:color="@color/white" /> 6 <solid android:color="@color/white" />
7 <stroke 7 <stroke
8 android:width="1dp" 8 android:width="1dp"
9 - android:color="@color/grey" /> 9 + android:color="@color/custom_grey" />
10 </shape> 10 </shape>
...\ No newline at end of file ...\ No newline at end of file
......
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <shape xmlns:android="http://schemas.android.com/apk/res/android" 2 <shape xmlns:android="http://schemas.android.com/apk/res/android"
3 android:shape="oval"> 3 android:shape="oval">
4 - <solid android:color="@color/pink3" /> 4 + <solid android:color="@color/custom_pink3" />
5 <size android:width="8dp" android:height="8dp" /> 5 <size android:width="8dp" android:height="8dp" />
6 </shape> 6 </shape>
......
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <shape xmlns:android="http://schemas.android.com/apk/res/android" 2 <shape xmlns:android="http://schemas.android.com/apk/res/android"
3 android:shape="oval"> 3 android:shape="oval">
4 - <solid android:color="@color/grey2" /> 4 + <solid android:color="@color/custom_grey2" />
5 <size android:width="8dp" android:height="8dp" /> 5 <size android:width="8dp" android:height="8dp" />
6 </shape> 6 </shape>
......
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <selector xmlns:android="http://schemas.android.com/apk/res/android"> 2 <selector xmlns:android="http://schemas.android.com/apk/res/android">
3 - <item android:drawable="@drawable/shape_cos_black_tr" android:state_pressed="true" /> 3 + <item android:drawable="@drawable/shape_rectangle_rounded_black_tr" android:state_pressed="true" />
4 - <item android:drawable="@drawable/shape_cos_black" android:state_pressed="false" /> 4 + <item android:drawable="@drawable/shape_rectangle_rounded_black" android:state_pressed="false" />
5 </selector> 5 </selector>
...\ No newline at end of file ...\ No newline at end of file
......
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <selector xmlns:android="http://schemas.android.com/apk/res/android"> 2 <selector xmlns:android="http://schemas.android.com/apk/res/android">
3 - <item android:drawable="@drawable/shape_cos_green_tr" android:state_pressed="true" /> 3 + <item android:drawable="@drawable/shape_rectangle_rounded_green_tr" android:state_pressed="true" />
4 - <item android:drawable="@drawable/shape_cos_green" android:state_pressed="false" /> 4 + <item android:drawable="@drawable/shape_rectangle_rounded_green" android:state_pressed="false" />
5 </selector> 5 </selector>
...\ No newline at end of file ...\ No newline at end of file
......
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<selector xmlns:android="http://schemas.android.com/apk/res/android">
3 + <item android:drawable="@drawable/shape_rectangle_rounded_light_blue_tr" android:state_pressed="true" />
4 + <item android:drawable="@drawable/shape_rectangle_rounded_light_blue" android:state_pressed="false" />
5 +</selector>
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <selector xmlns:android="http://schemas.android.com/apk/res/android"> 2 <selector xmlns:android="http://schemas.android.com/apk/res/android">
3 - <item android:state_checked="true" android:color="@color/cos_cyan" /> 3 + <item android:state_checked="true" android:color="@color/custom_cyan" />
4 - <item android:color="@color/cos_grey_dark" /> 4 + <item android:color="@color/custom_grey_dark" />
5 </selector> 5 </selector>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
5 5
6 <solid 6 <solid
7 android:width="2dp" 7 android:width="2dp"
8 - android:color="@color/black2" /> 8 + android:color="@color/custom_black2" />
9 </shape> 9 </shape>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
5 5
6 <solid 6 <solid
7 android:width="2dp" 7 android:width="2dp"
8 - android:color="@color/black2_tr" /> 8 + android:color="@color/custom_black2_tr" />
9 </shape> 9 </shape>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
5 5
6 <solid 6 <solid
7 android:width="2dp" 7 android:width="2dp"
8 - android:color="@color/cos_green12" /> 8 + android:color="@color/custom_green12" />
9 </shape> 9 </shape>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
5 5
6 <solid 6 <solid
7 android:width="2dp" 7 android:width="2dp"
8 - android:color="@color/cos_green6_tr" /> 8 + android:color="@color/custom_green6_tr" />
9 </shape> 9 </shape>
...\ No newline at end of file ...\ No newline at end of file
......
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<shape xmlns:android="http://schemas.android.com/apk/res/android"
3 + android:shape="rectangle">
4 + <corners android:radius="16dp" />
5 +
6 + <solid
7 + android:width="2dp"
8 + android:color="@color/custom_light_blue" />
9 +</shape>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<shape xmlns:android="http://schemas.android.com/apk/res/android"
3 + android:shape="rectangle">
4 + <corners android:radius="16dp" />
5 +
6 + <solid
7 + android:width="2dp"
8 + android:color="@color/custom_light_blue" />
9 +</shape>
...\ No newline at end of file ...\ No newline at end of file
...@@ -7,5 +7,5 @@ ...@@ -7,5 +7,5 @@
7 7
8 <stroke 8 <stroke
9 android:width="1dp" 9 android:width="1dp"
10 - android:color="@color/black2" /> 10 + android:color="@color/custom_black2" />
11 </shape> 11 </shape>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -7,5 +7,5 @@ ...@@ -7,5 +7,5 @@
7 7
8 <stroke 8 <stroke
9 android:width="1dp" 9 android:width="1dp"
10 - android:color="@color/black2_tr" /> 10 + android:color="@color/custom_black2_tr" />
11 </shape> 11 </shape>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
19 style="@style/BottomNavigationView" 19 style="@style/BottomNavigationView"
20 android:background="@android:color/white" 20 android:background="@android:color/white"
21 app:itemTextColor="@drawable/selector_tab_title_color" 21 app:itemTextColor="@drawable/selector_tab_title_color"
22 - app:itemRippleColor="@color/cos_cyan" 22 + app:itemRippleColor="@color/custom_cyan"
23 app:labelVisibilityMode="labeled" 23 app:labelVisibilityMode="labeled"
24 app:layout_constraintBottom_toBottomOf="parent" 24 app:layout_constraintBottom_toBottomOf="parent"
25 app:layout_constraintEnd_toEndOf="parent" 25 app:layout_constraintEnd_toEndOf="parent"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 xmlns:tools="http://schemas.android.com/tools" 3 xmlns:tools="http://schemas.android.com/tools"
4 android:layout_width="match_parent" 4 android:layout_width="match_parent"
5 android:layout_height="match_parent" 5 android:layout_height="match_parent"
6 - android:background="@color/cos_grey_light"> 6 + android:background="@color/custom_grey_light">
7 7
8 <androidx.core.widget.NestedScrollView 8 <androidx.core.widget.NestedScrollView
9 android:id="@+id/home_scrollview" 9 android:id="@+id/home_scrollview"
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
22 android:layout_width="match_parent" 22 android:layout_width="match_parent"
23 android:layout_height="wrap_content" 23 android:layout_height="wrap_content"
24 android:layout_gravity="center" 24 android:layout_gravity="center"
25 - android:background="@color/cos_grey_light" 25 + android:background="@color/custom_grey_light"
26 android:orientation="horizontal" 26 android:orientation="horizontal"
27 android:padding="16dp"> 27 android:padding="16dp">
28 28
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
71 android:id="@+id/dots_container" 71 android:id="@+id/dots_container"
72 android:layout_width="match_parent" 72 android:layout_width="match_parent"
73 android:layout_height="50dp" 73 android:layout_height="50dp"
74 - android:background="@color/cos_grey_light" 74 + android:background="@color/custom_grey_light"
75 android:gravity="center" 75 android:gravity="center"
76 android:orientation="horizontal" 76 android:orientation="horizontal"
77 android:padding="4dp" 77 android:padding="4dp"
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
99 android:layout_width="0dp" 99 android:layout_width="0dp"
100 android:layout_height="wrap_content" 100 android:layout_height="wrap_content"
101 android:layout_weight="1" 101 android:layout_weight="1"
102 - android:textColor="@color/black2" 102 + android:textColor="@color/custom_black2"
103 android:textSize="16sp" 103 android:textSize="16sp"
104 tools:text="Top Offers (10)" /> 104 tools:text="Top Offers (10)" />
105 105
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
111 android:paddingHorizontal="16dp" 111 android:paddingHorizontal="16dp"
112 android:paddingVertical="5dp" 112 android:paddingVertical="5dp"
113 android:text="@string/demo_all" 113 android:text="@string/demo_all"
114 - android:textColor="@color/black3" 114 + android:textColor="@color/custom_black3"
115 android:textSize="14sp" /> 115 android:textSize="14sp" />
116 </LinearLayout> 116 </LinearLayout>
117 117
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
145 android:layout_width="0dp" 145 android:layout_width="0dp"
146 android:layout_height="wrap_content" 146 android:layout_height="wrap_content"
147 android:layout_weight="1" 147 android:layout_weight="1"
148 - android:textColor="@color/black2" 148 + android:textColor="@color/custom_black2"
149 android:textSize="16sp" 149 android:textSize="16sp"
150 tools:text="Favorites (10)" /> 150 tools:text="Favorites (10)" />
151 151
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
157 android:paddingHorizontal="16dp" 157 android:paddingHorizontal="16dp"
158 android:paddingVertical="5dp" 158 android:paddingVertical="5dp"
159 android:text="@string/demo_all" 159 android:text="@string/demo_all"
160 - android:textColor="@color/black3" 160 + android:textColor="@color/custom_black3"
161 android:textSize="14sp" /> 161 android:textSize="14sp" />
162 </LinearLayout> 162 </LinearLayout>
163 163
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
191 android:layout_width="0dp" 191 android:layout_width="0dp"
192 android:layout_height="wrap_content" 192 android:layout_height="wrap_content"
193 android:layout_weight="1" 193 android:layout_weight="1"
194 - android:textColor="@color/black2" 194 + android:textColor="@color/custom_black2"
195 android:textSize="16sp" 195 android:textSize="16sp"
196 tools:text="Viability (10)" /> 196 tools:text="Viability (10)" />
197 197
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
203 android:paddingHorizontal="16dp" 203 android:paddingHorizontal="16dp"
204 android:paddingVertical="5dp" 204 android:paddingVertical="5dp"
205 android:text="@string/demo_all" 205 android:text="@string/demo_all"
206 - android:textColor="@color/black3" 206 + android:textColor="@color/custom_black3"
207 android:textSize="14sp" /> 207 android:textSize="14sp" />
208 </LinearLayout> 208 </LinearLayout>
209 209
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
237 android:layout_width="0dp" 237 android:layout_width="0dp"
238 android:layout_height="wrap_content" 238 android:layout_height="wrap_content"
239 android:layout_weight="1" 239 android:layout_weight="1"
240 - android:textColor="@color/black2" 240 + android:textColor="@color/custom_black2"
241 android:textSize="16sp" 241 android:textSize="16sp"
242 tools:text="Family (10)" /> 242 tools:text="Family (10)" />
243 243
...@@ -249,7 +249,7 @@ ...@@ -249,7 +249,7 @@
249 android:paddingHorizontal="16dp" 249 android:paddingHorizontal="16dp"
250 android:paddingVertical="5dp" 250 android:paddingVertical="5dp"
251 android:text="@string/demo_all" 251 android:text="@string/demo_all"
252 - android:textColor="@color/black3" 252 + android:textColor="@color/custom_black3"
253 android:textSize="14sp" /> 253 android:textSize="14sp" />
254 </LinearLayout> 254 </LinearLayout>
255 255
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
283 android:layout_width="0dp" 283 android:layout_width="0dp"
284 android:layout_height="wrap_content" 284 android:layout_height="wrap_content"
285 android:layout_weight="1" 285 android:layout_weight="1"
286 - android:textColor="@color/black2" 286 + android:textColor="@color/custom_black2"
287 android:textSize="16sp" 287 android:textSize="16sp"
288 tools:text="Food and Coffee (10)" /> 288 tools:text="Food and Coffee (10)" />
289 289
...@@ -295,7 +295,7 @@ ...@@ -295,7 +295,7 @@
295 android:paddingHorizontal="16dp" 295 android:paddingHorizontal="16dp"
296 android:paddingVertical="5dp" 296 android:paddingVertical="5dp"
297 android:text="@string/demo_all" 297 android:text="@string/demo_all"
298 - android:textColor="@color/black3" 298 + android:textColor="@color/custom_black3"
299 android:textSize="14sp" /> 299 android:textSize="14sp" />
300 </LinearLayout> 300 </LinearLayout>
301 301
...@@ -329,7 +329,7 @@ ...@@ -329,7 +329,7 @@
329 android:layout_width="0dp" 329 android:layout_width="0dp"
330 android:layout_height="wrap_content" 330 android:layout_height="wrap_content"
331 android:layout_weight="1" 331 android:layout_weight="1"
332 - android:textColor="@color/black2" 332 + android:textColor="@color/custom_black2"
333 android:textSize="16sp" 333 android:textSize="16sp"
334 tools:text="Travelling (10)" /> 334 tools:text="Travelling (10)" />
335 335
...@@ -341,7 +341,7 @@ ...@@ -341,7 +341,7 @@
341 android:paddingHorizontal="16dp" 341 android:paddingHorizontal="16dp"
342 android:paddingVertical="5dp" 342 android:paddingVertical="5dp"
343 android:text="@string/demo_all" 343 android:text="@string/demo_all"
344 - android:textColor="@color/black3" 344 + android:textColor="@color/custom_black3"
345 android:textSize="14sp" /> 345 android:textSize="14sp" />
346 </LinearLayout> 346 </LinearLayout>
347 347
...@@ -375,7 +375,7 @@ ...@@ -375,7 +375,7 @@
375 android:layout_width="0dp" 375 android:layout_width="0dp"
376 android:layout_height="wrap_content" 376 android:layout_height="wrap_content"
377 android:layout_weight="1" 377 android:layout_weight="1"
378 - android:textColor="@color/black2" 378 + android:textColor="@color/custom_black2"
379 android:textSize="16sp" 379 android:textSize="16sp"
380 tools:text="Kids (10)" /> 380 tools:text="Kids (10)" />
381 381
...@@ -387,7 +387,7 @@ ...@@ -387,7 +387,7 @@
387 android:paddingHorizontal="16dp" 387 android:paddingHorizontal="16dp"
388 android:paddingVertical="5dp" 388 android:paddingVertical="5dp"
389 android:text="@string/demo_all" 389 android:text="@string/demo_all"
390 - android:textColor="@color/black3" 390 + android:textColor="@color/custom_black3"
391 android:textSize="14sp" /> 391 android:textSize="14sp" />
392 </LinearLayout> 392 </LinearLayout>
393 393
...@@ -422,7 +422,7 @@ ...@@ -422,7 +422,7 @@
422 android:layout_width="0dp" 422 android:layout_width="0dp"
423 android:layout_height="wrap_content" 423 android:layout_height="wrap_content"
424 android:layout_weight="1" 424 android:layout_weight="1"
425 - android:textColor="@color/black2" 425 + android:textColor="@color/custom_black2"
426 android:textSize="16sp" 426 android:textSize="16sp"
427 tools:text="Purchases (10)" /> 427 tools:text="Purchases (10)" />
428 428
...@@ -434,7 +434,7 @@ ...@@ -434,7 +434,7 @@
434 android:paddingHorizontal="16dp" 434 android:paddingHorizontal="16dp"
435 android:paddingVertical="5dp" 435 android:paddingVertical="5dp"
436 android:text="@string/demo_all" 436 android:text="@string/demo_all"
437 - android:textColor="@color/black3" 437 + android:textColor="@color/custom_black3"
438 android:textSize="14sp" /> 438 android:textSize="14sp" />
439 </LinearLayout> 439 </LinearLayout>
440 440
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 xmlns:tools="http://schemas.android.com/tools" 3 xmlns:tools="http://schemas.android.com/tools"
4 android:layout_width="match_parent" 4 android:layout_width="match_parent"
5 android:layout_height="match_parent" 5 android:layout_height="match_parent"
6 - android:background="@color/cos_grey_light"> 6 + android:background="@color/custom_grey_light">
7 7
8 <androidx.core.widget.NestedScrollView 8 <androidx.core.widget.NestedScrollView
9 android:id="@+id/profile_scrollview" 9 android:id="@+id/profile_scrollview"
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
46 android:layout_height="wrap_content" 46 android:layout_height="wrap_content"
47 android:includeFontPadding="false" 47 android:includeFontPadding="false"
48 android:text="@string/demo_profile" 48 android:text="@string/demo_profile"
49 - android:textColor="@color/black4" 49 + android:textColor="@color/custom_black4"
50 android:textSize="16sp" /> 50 android:textSize="16sp" />
51 </LinearLayout> 51 </LinearLayout>
52 </LinearLayout> 52 </LinearLayout>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
57 android:layout_height="wrap_content" 57 android:layout_height="wrap_content"
58 android:layout_gravity="center" 58 android:layout_gravity="center"
59 android:layout_marginTop="8dp" 59 android:layout_marginTop="8dp"
60 - android:background="@color/cos_grey_light" 60 + android:background="@color/custom_grey_light"
61 android:orientation="horizontal" 61 android:orientation="horizontal"
62 android:padding="16dp"> 62 android:padding="16dp">
63 63
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
117 android:layout_width="0dp" 117 android:layout_width="0dp"
118 android:layout_height="wrap_content" 118 android:layout_height="wrap_content"
119 android:layout_weight="1" 119 android:layout_weight="1"
120 - android:textColor="@color/black2" 120 + android:textColor="@color/custom_black2"
121 android:textSize="16sp" 121 android:textSize="16sp"
122 tools:text="Προτάσεις για εσένα (5)" /> 122 tools:text="Προτάσεις για εσένα (5)" />
123 123
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
129 android:paddingHorizontal="16dp" 129 android:paddingHorizontal="16dp"
130 android:paddingVertical="5dp" 130 android:paddingVertical="5dp"
131 android:text="@string/demo_all" 131 android:text="@string/demo_all"
132 - android:textColor="@color/black3" 132 + android:textColor="@color/custom_black3"
133 android:textSize="14sp" /> 133 android:textSize="14sp" />
134 </LinearLayout> 134 </LinearLayout>
135 135
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
160 android:layout_marginVertical="8dp" 160 android:layout_marginVertical="8dp"
161 android:paddingHorizontal="16dp" 161 android:paddingHorizontal="16dp"
162 android:text="@string/demo_my_coupons" 162 android:text="@string/demo_my_coupons"
163 - android:textColor="@color/black2" 163 + android:textColor="@color/custom_black2"
164 android:textSize="16sp" /> 164 android:textSize="16sp" />
165 165
166 <!-- Filter Buttons --> 166 <!-- Filter Buttons -->
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
179 android:layout_height="wrap_content" 179 android:layout_height="wrap_content"
180 android:layout_marginEnd="8dp" 180 android:layout_marginEnd="8dp"
181 android:layout_weight="1" 181 android:layout_weight="1"
182 - android:background="@drawable/shape_cos_black" 182 + android:background="@drawable/shape_rectangle_rounded_black"
183 android:gravity="center" 183 android:gravity="center"
184 android:paddingVertical="8dp" 184 android:paddingVertical="8dp"
185 android:text="@string/demo_active" 185 android:text="@string/demo_active"
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
196 android:gravity="center" 196 android:gravity="center"
197 android:paddingVertical="8dp" 197 android:paddingVertical="8dp"
198 android:text="@string/demo_favorites" 198 android:text="@string/demo_favorites"
199 - android:textColor="@color/black2" 199 + android:textColor="@color/custom_black2"
200 android:textSize="14sp" /> 200 android:textSize="14sp" />
201 201
202 <TextView 202 <TextView
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
208 android:gravity="center" 208 android:gravity="center"
209 android:paddingVertical="8dp" 209 android:paddingVertical="8dp"
210 android:text="@string/demo_redeemed" 210 android:text="@string/demo_redeemed"
211 - android:textColor="@color/black2" 211 + android:textColor="@color/custom_black2"
212 android:textSize="14sp" /> 212 android:textSize="14sp" />
213 </LinearLayout> 213 </LinearLayout>
214 214
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 xmlns:tools="http://schemas.android.com/tools" 3 xmlns:tools="http://schemas.android.com/tools"
4 android:layout_width="match_parent" 4 android:layout_width="match_parent"
5 android:layout_height="match_parent" 5 android:layout_height="match_parent"
6 - android:background="@color/cos_grey_light"> 6 + android:background="@color/custom_grey_light">
7 7
8 <ScrollView 8 <ScrollView
9 android:id="@+id/coupon_scrollview" 9 android:id="@+id/coupon_scrollview"
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
46 android:layout_height="wrap_content" 46 android:layout_height="wrap_content"
47 android:includeFontPadding="false" 47 android:includeFontPadding="false"
48 android:text="@string/demo_offer" 48 android:text="@string/demo_offer"
49 - android:textColor="@color/black4" 49 + android:textColor="@color/custom_black4"
50 android:textSize="16sp" /> 50 android:textSize="16sp" />
51 </LinearLayout> 51 </LinearLayout>
52 </LinearLayout> 52 </LinearLayout>
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
90 android:layout_height="wrap_content" 90 android:layout_height="wrap_content"
91 android:includeFontPadding="false" 91 android:includeFontPadding="false"
92 android:text="@string/demo_more" 92 android:text="@string/demo_more"
93 - android:textColor="@color/black4" 93 + android:textColor="@color/custom_black4"
94 android:textSize="11sp" /> 94 android:textSize="11sp" />
95 </LinearLayout> 95 </LinearLayout>
96 </androidx.constraintlayout.widget.ConstraintLayout> 96 </androidx.constraintlayout.widget.ConstraintLayout>
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
126 android:layout_height="wrap_content" 126 android:layout_height="wrap_content"
127 android:includeFontPadding="false" 127 android:includeFontPadding="false"
128 android:maxLines="1" 128 android:maxLines="1"
129 - android:textColor="@color/pink2" 129 + android:textColor="@color/custom_pink2"
130 android:textSize="23sp" 130 android:textSize="23sp"
131 tools:text="@string/demo_more" /> 131 tools:text="@string/demo_more" />
132 132
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
139 android:includeFontPadding="false" 139 android:includeFontPadding="false"
140 android:maxLines="1" 140 android:maxLines="1"
141 android:text="@string/demo_purchases" 141 android:text="@string/demo_purchases"
142 - android:textColor="@color/black5" 142 + android:textColor="@color/custom_black5"
143 android:textSize="17sp" /> 143 android:textSize="17sp" />
144 </LinearLayout> 144 </LinearLayout>
145 145
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
171 android:layout_height="wrap_content" 171 android:layout_height="wrap_content"
172 android:layout_marginTop="14dp" 172 android:layout_marginTop="14dp"
173 android:includeFontPadding="false" 173 android:includeFontPadding="false"
174 - android:textColor="@color/black5" 174 + android:textColor="@color/custom_black5"
175 android:textSize="13sp" 175 android:textSize="13sp"
176 tools:text="@string/demo_purchases" /> 176 tools:text="@string/demo_purchases" />
177 177
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
183 android:ellipsize="end" 183 android:ellipsize="end"
184 android:lineSpacingExtra="2dp" 184 android:lineSpacingExtra="2dp"
185 android:maxLines="4" 185 android:maxLines="4"
186 - android:textColor="@color/black5" 186 + android:textColor="@color/custom_black5"
187 android:textSize="17sp" 187 android:textSize="17sp"
188 tools:text="Πάρτε τα πακέτα κινητής στη μισή τιμή μόνο αυτό το μήνα. Απεριόριστα λεπτά προς όλα τα δίκτυα, SMS και 50GB δεδομένα υψηλής ταχύτητας. Ισχύει για νέους συνδρομητές και ανανεώσεις συμβολαίων. Δωρεάν ενεργοποίηση και τεχνική υποστήριξη." /> 188 tools:text="Πάρτε τα πακέτα κινητής στη μισή τιμή μόνο αυτό το μήνα. Απεριόριστα λεπτά προς όλα τα δίκτυα, SMS και 50GB δεδομένα υψηλής ταχύτητας. Ισχύει για νέους συνδρομητές και ανανεώσεις συμβολαίων. Δωρεάν ενεργοποίηση και τεχνική υποστήριξη." />
189 189
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
194 android:layout_gravity="end" 194 android:layout_gravity="end"
195 android:layout_marginTop="2dp" 195 android:layout_marginTop="2dp"
196 android:text="@string/demo_more" 196 android:text="@string/demo_more"
197 - android:textColor="@color/skyblue" 197 + android:textColor="@color/custom_skyblue"
198 android:textSize="15sp" 198 android:textSize="15sp"
199 android:visibility="gone" /> 199 android:visibility="gone" />
200 200
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
203 android:layout_width="match_parent" 203 android:layout_width="match_parent"
204 android:layout_height="wrap_content" 204 android:layout_height="wrap_content"
205 android:layout_marginTop="32dp" 205 android:layout_marginTop="32dp"
206 - android:background="@drawable/shape_cos_white" 206 + android:background="@drawable/shape_rectangle_rounded_white"
207 android:orientation="vertical" 207 android:orientation="vertical"
208 android:padding="16dp"> 208 android:padding="16dp">
209 209
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
220 android:layout_height="wrap_content" 220 android:layout_height="wrap_content"
221 android:layout_weight="1" 221 android:layout_weight="1"
222 android:text="@string/demo_coupon_code" 222 android:text="@string/demo_coupon_code"
223 - android:textColor="@color/black2" 223 + android:textColor="@color/custom_black2"
224 android:textSize="15sp" /> 224 android:textSize="15sp" />
225 225
226 <ImageView 226 <ImageView
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
247 android:layout_marginEnd="12dp" 247 android:layout_marginEnd="12dp"
248 android:includeFontPadding="false" 248 android:includeFontPadding="false"
249 android:text="test_coupon_code" 249 android:text="test_coupon_code"
250 - android:textColor="@color/black2" 250 + android:textColor="@color/custom_black2"
251 android:textSize="23sp" /> 251 android:textSize="23sp" />
252 252
253 <ImageView 253 <ImageView
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
263 android:layout_width="match_parent" 263 android:layout_width="match_parent"
264 android:layout_height="wrap_content" 264 android:layout_height="wrap_content"
265 android:layout_marginTop="16dp" 265 android:layout_marginTop="16dp"
266 - android:background="@drawable/shape_cos_white" 266 + android:background="@drawable/shape_rectangle_rounded_white"
267 android:orientation="vertical" 267 android:orientation="vertical"
268 android:padding="16dp"> 268 android:padding="16dp">
269 269
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
280 android:layout_height="wrap_content" 280 android:layout_height="wrap_content"
281 android:layout_weight="1" 281 android:layout_weight="1"
282 android:text="@string/demo_qr_code" 282 android:text="@string/demo_qr_code"
283 - android:textColor="@color/black2" 283 + android:textColor="@color/custom_black2"
284 android:textSize="15sp" /> 284 android:textSize="15sp" />
285 285
286 <ImageView 286 <ImageView
...@@ -329,7 +329,7 @@ ...@@ -329,7 +329,7 @@
329 android:layout_width="wrap_content" 329 android:layout_width="wrap_content"
330 android:layout_height="wrap_content" 330 android:layout_height="wrap_content"
331 android:text="@string/demo_terms" 331 android:text="@string/demo_terms"
332 - android:textColor="@color/black2" 332 + android:textColor="@color/custom_black2"
333 android:textSize="15sp"/> 333 android:textSize="15sp"/>
334 334
335 <ImageView 335 <ImageView
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
356 android:layout_marginBottom="8dp" 356 android:layout_marginBottom="8dp"
357 android:lineSpacingExtra="4dp" 357 android:lineSpacingExtra="4dp"
358 android:text="@string/demo_lorem_ipsum" 358 android:text="@string/demo_lorem_ipsum"
359 - android:textColor="@color/black2" 359 + android:textColor="@color/custom_black2"
360 android:textSize="15sp" /> 360 android:textSize="15sp" />
361 </LinearLayout> 361 </LinearLayout>
362 </LinearLayout> 362 </LinearLayout>
...@@ -392,7 +392,7 @@ ...@@ -392,7 +392,7 @@
392 android:layout_width="wrap_content" 392 android:layout_width="wrap_content"
393 android:layout_height="wrap_content" 393 android:layout_height="wrap_content"
394 android:text="@string/demo_website" 394 android:text="@string/demo_website"
395 - android:textColor="@color/black2" 395 + android:textColor="@color/custom_black2"
396 android:textSize="15sp" 396 android:textSize="15sp"
397 android:textStyle="bold" /> 397 android:textStyle="bold" />
398 </LinearLayout> 398 </LinearLayout>
......
1 -<?xml version="1.0" encoding="utf-8"?>
2 -
3 -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
4 - android:id="@+id/rl_option"
5 - android:layout_width="wrap_content"
6 - android:layout_height="wrap_content">
7 - <ImageView
8 - android:id="@+id/option_icon"
9 - android:layout_width="50dp"
10 - android:layout_height="50dp"
11 - android:layout_centerVertical="true"
12 - android:src="@drawable/phone_option"/>
13 -
14 - <TextView
15 - android:id="@+id/option_text"
16 - android:layout_width="wrap_content"
17 - android:layout_height="wrap_content"
18 - android:text="1"
19 - android:layout_marginLeft="30dp"
20 - android:layout_marginTop="14dp"/>
21 -</RelativeLayout>
22 -
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
52 android:layout_width="0dp" 52 android:layout_width="0dp"
53 android:layout_height="wrap_content" 53 android:layout_height="wrap_content"
54 android:maxLines="1" 54 android:maxLines="1"
55 - android:textColor="@color/black2" 55 + android:textColor="@color/custom_black2"
56 android:textSize="21sp" 56 android:textSize="21sp"
57 app:layout_constraintEnd_toStartOf="@+id/gl_vertical_70" 57 app:layout_constraintEnd_toStartOf="@+id/gl_vertical_70"
58 app:layout_constraintStart_toStartOf="parent" 58 app:layout_constraintStart_toStartOf="parent"
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
65 android:layout_width="0dp" 65 android:layout_width="0dp"
66 android:layout_height="wrap_content" 66 android:layout_height="wrap_content"
67 android:maxLines="2" 67 android:maxLines="2"
68 - android:textColor="@color/black3" 68 + android:textColor="@color/custom_black3"
69 android:textSize="15sp" 69 android:textSize="15sp"
70 app:layout_constraintEnd_toStartOf="@+id/gl_vertical_70" 70 app:layout_constraintEnd_toStartOf="@+id/gl_vertical_70"
71 app:layout_constraintStart_toStartOf="parent" 71 app:layout_constraintStart_toStartOf="parent"
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
81 android:layout_centerVertical="true" 81 android:layout_centerVertical="true"
82 android:layout_marginTop="24dp" 82 android:layout_marginTop="24dp"
83 android:maxLines="1" 83 android:maxLines="1"
84 - android:textColor="@color/black3" 84 + android:textColor="@color/custom_black3"
85 android:textSize="12sp" 85 android:textSize="12sp"
86 app:layout_constraintStart_toStartOf="parent" 86 app:layout_constraintStart_toStartOf="parent"
87 app:layout_constraintBottom_toBottomOf="parent" 87 app:layout_constraintBottom_toBottomOf="parent"
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
56 android:layout_width="0dp" 56 android:layout_width="0dp"
57 android:layout_height="wrap_content" 57 android:layout_height="wrap_content"
58 android:maxLines="1" 58 android:maxLines="1"
59 - android:textColor="@color/black2" 59 + android:textColor="@color/custom_black2"
60 android:textSize="16sp" 60 android:textSize="16sp"
61 app:layout_constraintEnd_toStartOf="@+id/gl_vertical_70" 61 app:layout_constraintEnd_toStartOf="@+id/gl_vertical_70"
62 app:layout_constraintStart_toStartOf="parent" 62 app:layout_constraintStart_toStartOf="parent"
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
70 android:layout_height="wrap_content" 70 android:layout_height="wrap_content"
71 android:layout_marginTop="2dp" 71 android:layout_marginTop="2dp"
72 android:maxLines="2" 72 android:maxLines="2"
73 - android:textColor="@color/black3" 73 + android:textColor="@color/custom_black3"
74 android:textSize="13sp" 74 android:textSize="13sp"
75 app:layout_constraintEnd_toStartOf="@+id/gl_vertical_70" 75 app:layout_constraintEnd_toStartOf="@+id/gl_vertical_70"
76 app:layout_constraintStart_toStartOf="parent" 76 app:layout_constraintStart_toStartOf="parent"
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
86 android:layout_centerVertical="true" 86 android:layout_centerVertical="true"
87 android:layout_marginTop="12dp" 87 android:layout_marginTop="12dp"
88 android:maxLines="1" 88 android:maxLines="1"
89 - android:textColor="@color/black3" 89 + android:textColor="@color/custom_black3"
90 android:textSize="12sp" 90 android:textSize="12sp"
91 app:layout_constraintStart_toStartOf="parent" 91 app:layout_constraintStart_toStartOf="parent"
92 app:layout_constraintBottom_toBottomOf="parent" 92 app:layout_constraintBottom_toBottomOf="parent"
......
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <resources> 2 <resources>
3 - <!-- Used in drawables --> 3 + <color name="custom_cyan">#A3F2DA</color>
4 - <color name="cos_cyan">#A3F2DA</color> 4 + <color name="custom_grey_dark">#787878</color>
5 - <color name="cos_grey_dark">#787878</color> 5 + <color name="custom_grey_light">#F2F2F2</color>
6 - <color name="cos_grey_light">#F2F2F2</color> 6 + <color name="custom_green12">#0EA600</color>
7 - <color name="cos_green12">#0EA600</color> 7 + <color name="custom_green6_tr">#660EA600</color>
8 - <color name="cos_green6_tr">#660EA600</color> 8 + <color name="custom_orange">#FF9933</color>
9 - <color name="cos_orange">#FF9933</color> 9 + <color name="custom_skyblue2">#22A9B5</color>
10 - 10 + <color name="custom_blue_dark">#3A5266</color>
11 - <!-- Used in layouts -->
12 - <color name="cos_skyblue2">#22A9B5</color>
13 - <color name="blue_dark">#3A5266</color>
14 <color name="white">#FFFFFF</color> 11 <color name="white">#FFFFFF</color>
15 <color name="white_tr">#66FFFFFF</color> 12 <color name="white_tr">#66FFFFFF</color>
16 - <color name="cos_green5">#79BF14</color> 13 + <color name="custom_green5">#79BF14</color>
17 - <color name="black2">#000F1E</color> 14 + <color name="custom_black2">#000F1E</color>
18 - <color name="black2_tr">#66000F1E</color> 15 + <color name="custom_black2_tr">#66000F1E</color>
19 - <color name="black3">#00111B</color> 16 + <color name="custom_black3">#00111B</color>
20 - <color name="grey">#CCCCCC</color> 17 + <color name="custom_grey">#CCCCCC</color>
21 - <color name="pink">#EE417D</color> 18 + <color name="custom_pink">#EE417D</color>
22 - <color name="black4">#0D1B29</color> 19 + <color name="custom_black4">#0D1B29</color>
23 - <color name="black5">#020E1C</color> 20 + <color name="custom_black5">#020E1C</color>
24 - <color name="pink2">#F2709D</color> 21 + <color name="custom_pink2">#F2709D</color>
25 - <color name="skyblue">#00A3E0</color> 22 + <color name="custom_skyblue">#00A3E0</color>
26 - <color name="grey2">#D8D8D8</color> 23 + <color name="custom_grey2">#D8D8D8</color>
27 - <color name="pink3">#EE437E</color> 24 + <color name="custom_pink3">#EE437E</color>
28 - 25 + <color name="custom_light_blue">#00A5E3</color>
29 - <!-- Used in styles -->
30 - <color name="cos_light_blue">#00A5E3</color>
31 </resources> 26 </resources>
......
1 <resources> 1 <resources>
2 <string name="webview_permission_title">Demo App</string> 2 <string name="webview_permission_title">Demo App</string>
3 <string name="webview_permission_message">Το Demo App ζητάει πρόσβαση στην τοποθεσία σας.</string> 3 <string name="webview_permission_message">Το Demo App ζητάει πρόσβαση στην τοποθεσία σας.</string>
4 - <string name="lbl_take_photo_accept">Οκ</string> 4 + <string name="lbl_ok">Οκ</string>
5 - <string name="lbl_take_photo_decline">Άκυρο</string> 5 + <string name="lbl_cancel">Άκυρο</string>
6 - <string name="welcome_user">Γεια σου %1$s !</string> 6 + <string name="welcome_user">User</string>
7 - <string name="cos_hint">GUID</string>
8 - <string name="cos_login_text">Σύνδεση</string>
9 - <string name="cos_logout_text">Αποσύνδεση</string>
10 <string name="menu_home">Αρχική</string> 7 <string name="menu_home">Αρχική</string>
11 - <string name="demo_sm_flow">Open SM Flow</string> 8 + <string name="demo_home">Αρχική οθόνη</string>
12 - <string name="demo_sm_map">Open SM Map</string>
13 <string name="demo_all">Όλα</string> 9 <string name="demo_all">Όλα</string>
14 <string name="demo_offer">Προσφορά</string> 10 <string name="demo_offer">Προσφορά</string>
15 <string name="demo_more">Περισσότερα</string> 11 <string name="demo_more">Περισσότερα</string>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
5 </style> 5 </style>
6 6
7 <style name="SDKAppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar"> 7 <style name="SDKAppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
8 - <item name="android:statusBarColor">@color/cos_grey_light</item> 8 + <item name="android:statusBarColor">@color/custom_grey_light</item>
9 <item name="android:windowLightStatusBar">true</item> 9 <item name="android:windowLightStatusBar">true</item>
10 <item name="android:forceDarkAllowed" tools:targetApi="q">false</item> 10 <item name="android:forceDarkAllowed" tools:targetApi="q">false</item>
11 </style> 11 </style>
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
23 </style> 23 </style>
24 24
25 <style name="progressBarGreen" parent="@style/Theme.AppCompat"> 25 <style name="progressBarGreen" parent="@style/Theme.AppCompat">
26 - <item name="colorAccent">@color/cos_green12</item> 26 + <item name="colorAccent">@color/custom_green12</item>
27 </style> 27 </style>
28 28
29 <style name="progressBarBlue" parent="@style/Theme.AppCompat"> 29 <style name="progressBarBlue" parent="@style/Theme.AppCompat">
30 - <item name="colorAccent">@color/cos_light_blue</item> 30 + <item name="colorAccent">@color/custom_light_blue</item>
31 </style> 31 </style>
32 </resources> 32 </resources>
......