Showing
58 changed files
with
245 additions
and
1318 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 | ... | ... |

18.9 KB
app/src/main/res/drawable-xhdpi/ic_logo.webp
0 → 100644
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)) { | 633 | + object.putOpt("app_version", info.versionName); |
634 | - object.putOpt("app_version", info.versionName); | 634 | + object.putOpt("sdk_version", WarpConstants.SDK_VERSION); |
635 | - object.putOpt("sdk_version", WarpConstants.SDK_VERSION); | 635 | + object.putOpt("app_build", info.versionCode); |
636 | - 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 | ... | ... |
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/LoyaltySDKDynatraceEventModel.java
deleted
100644 → 0
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 | -} |
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/LoyaltySDKFirebaseEventModel.java
deleted
100644 → 0
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") | ... | ... |
warply_android_sdk/src/main/java/ly/warp/sdk/services/EventRewardsCouponsService.java
deleted
100644 → 0
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 | -} |
... | @@ -25,26 +25,13 @@ | ... | @@ -25,26 +25,13 @@ |
25 | 25 | ||
26 | package ly.warp.sdk.utils; | 26 | package ly.warp.sdk.utils; |
27 | 27 | ||
28 | -import android.content.BroadcastReceiver; | ||
29 | import android.content.Context; | 28 | import android.content.Context; |
30 | -import android.content.Intent; | ||
31 | -import android.content.IntentFilter; | ||
32 | import android.content.SharedPreferences; | 29 | import android.content.SharedPreferences; |
33 | import android.content.SharedPreferences.Editor; | 30 | import android.content.SharedPreferences.Editor; |
34 | -import android.content.pm.ActivityInfo; | ||
35 | import android.content.pm.PackageInfo; | 31 | import android.content.pm.PackageInfo; |
36 | -import android.content.pm.PackageManager; | ||
37 | import android.content.pm.PackageManager.NameNotFoundException; | 32 | import android.content.pm.PackageManager.NameNotFoundException; |
38 | -import android.content.pm.ResolveInfo; | ||
39 | -import android.os.Build; | ||
40 | import android.util.Log; | 33 | import android.util.Log; |
41 | 34 | ||
42 | -import java.util.HashSet; | ||
43 | -import java.util.List; | ||
44 | -import java.util.Set; | ||
45 | - | ||
46 | -import ly.warp.sdk.utils.constants.GCMConstants; | ||
47 | - | ||
48 | 35 | ||
49 | /** | 36 | /** |
50 | * Utilities for device registration. | 37 | * Utilities for device registration. |
... | @@ -55,164 +42,10 @@ import ly.warp.sdk.utils.constants.GCMConstants; | ... | @@ -55,164 +42,10 @@ import ly.warp.sdk.utils.constants.GCMConstants; |
55 | public final class GCMRegistrar { | 42 | public final class GCMRegistrar { |
56 | 43 | ||
57 | private static final String TAG = "GCMRegistrar"; | 44 | private static final String TAG = "GCMRegistrar"; |
58 | - private static final String BACKOFF_MS = "backoff_ms"; | ||
59 | - private static final String GSF_PACKAGE = "com.google.android.gsf"; | ||
60 | private static final String PREFERENCES = "com.google.android.gcm"; | 45 | private static final String PREFERENCES = "com.google.android.gcm"; |
61 | - private static final int DEFAULT_BACKOFF_MS = 3000; | ||
62 | private static final String PROPERTY_REG_ID = "regId"; | 46 | private static final String PROPERTY_REG_ID = "regId"; |
63 | private static final String PROPERTY_APP_VERSION = "appVersion"; | 47 | private static final String PROPERTY_APP_VERSION = "appVersion"; |
64 | - private static final String PROPERTY_ON_SERVER = "onServer"; | ||
65 | - | ||
66 | - /** | ||
67 | - * Checks if the device has the proper dependencies installed. | ||
68 | - * <p/> | ||
69 | - * This method should be called when the application starts to verify that | ||
70 | - * the device supports GCM. | ||
71 | - * | ||
72 | - * @param context application context. | ||
73 | - * @throws UnsupportedOperationException if the device does not support GCM. | ||
74 | - */ | ||
75 | - public static void checkDevice(Context context) { | ||
76 | - int version = Build.VERSION.SDK_INT; | ||
77 | - if (version < 8) { | ||
78 | - throw new UnsupportedOperationException("Device must be at least " | ||
79 | - + "API Level 8 (instead of " + version + ")"); | ||
80 | - } | ||
81 | - PackageManager packageManager = context.getPackageManager(); | ||
82 | - try { | ||
83 | - packageManager.getPackageInfo(GSF_PACKAGE, 0); | ||
84 | - } catch (NameNotFoundException e) { | ||
85 | - throw new UnsupportedOperationException( | ||
86 | - "Device does not have package " + GSF_PACKAGE); | ||
87 | - } | ||
88 | - } | ||
89 | - | ||
90 | - /** | ||
91 | - * Checks that the application manifest is properly configured. | ||
92 | - * <p/> | ||
93 | - * A proper configuration means: | ||
94 | - * <ol> | ||
95 | - * <li>It creates a custom permission called | ||
96 | - * {@code PACKAGE_NAME.permission.C2D_MESSAGE}. | ||
97 | - * <li>It defines at least one {@link BroadcastReceiver} with category | ||
98 | - * {@code PACKAGE_NAME}. | ||
99 | - * <li>The {@link BroadcastReceiver}(s) uses the | ||
100 | - * {@value ly.warp.sdk.utils.constants.GCMConstants#PERMISSION_GCM_INTENTS} permission. | ||
101 | - * <li>The {@link BroadcastReceiver}(s) handles the 3 GCM intents ( | ||
102 | - * {@value ly.warp.sdk.utils.constants.GCMConstants#INTENT_FROM_GCM_MESSAGE}, | ||
103 | - * {@value ly.warp.sdk.utils.constants.GCMConstants#INTENT_FROM_GCM_REGISTRATION_CALLBACK}, and | ||
104 | - * {@value ly.warp.sdk.utils.constants.GCMConstants#INTENT_FROM_GCM_LIBRARY_RETRY}). | ||
105 | - * </ol> | ||
106 | - * ...where {@code PACKAGE_NAME} is the application package. | ||
107 | - * <p/> | ||
108 | - * This method should be used during development time to verify that the | ||
109 | - * manifest is properly set up, but it doesn't need to be called once the | ||
110 | - * application is deployed to the users' devices. | ||
111 | - * | ||
112 | - * @param context application context. | ||
113 | - * @throws IllegalStateException if any of the conditions above is not met. | ||
114 | - */ | ||
115 | - public static void checkManifest(Context context) { | ||
116 | - PackageManager packageManager = context.getPackageManager(); | ||
117 | - String packageName = context.getPackageName(); | ||
118 | - String permissionName = packageName + ".permission.C2D_MESSAGE"; | ||
119 | - // check permission | ||
120 | - try { | ||
121 | - packageManager.getPermissionInfo(permissionName, | ||
122 | - PackageManager.GET_PERMISSIONS); | ||
123 | - } catch (NameNotFoundException e) { | ||
124 | - throw new IllegalStateException( | ||
125 | - "Application does not define permission " + permissionName); | ||
126 | - } | ||
127 | - // check receivers | ||
128 | - PackageInfo receiversInfo; | ||
129 | - try { | ||
130 | - receiversInfo = packageManager.getPackageInfo(packageName, | ||
131 | - PackageManager.GET_RECEIVERS); | ||
132 | - } catch (NameNotFoundException e) { | ||
133 | - throw new IllegalStateException( | ||
134 | - "Could not get receivers for package " + packageName); | ||
135 | - } | ||
136 | - ActivityInfo[] receivers = receiversInfo.receivers; | ||
137 | - if (receivers == null || receivers.length == 0) { | ||
138 | - throw new IllegalStateException("No receiver for package " | ||
139 | - + packageName); | ||
140 | - } | ||
141 | - if (Log.isLoggable(TAG, Log.VERBOSE)) { | ||
142 | - Log.v(TAG, "number of receivers for " + packageName + ": " | ||
143 | - + receivers.length); | ||
144 | - } | ||
145 | - Set<String> allowedReceivers = new HashSet<String>(); | ||
146 | - for (ActivityInfo receiver : receivers) { | ||
147 | - if (GCMConstants.PERMISSION_GCM_INTENTS.equals(receiver.permission)) { | ||
148 | - allowedReceivers.add(receiver.name); | ||
149 | - } | ||
150 | - } | ||
151 | - if (allowedReceivers.isEmpty()) { | ||
152 | - throw new IllegalStateException("No receiver allowed to receive " | ||
153 | - + GCMConstants.PERMISSION_GCM_INTENTS); | ||
154 | - } | ||
155 | - checkReceiver(context, allowedReceivers, | ||
156 | - GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK); | ||
157 | - checkReceiver(context, allowedReceivers, | ||
158 | - GCMConstants.INTENT_FROM_GCM_MESSAGE); | ||
159 | - } | ||
160 | 48 | ||
161 | - private static void checkReceiver(Context context, | ||
162 | - Set<String> allowedReceivers, String action) { | ||
163 | - PackageManager pm = context.getPackageManager(); | ||
164 | - String packageName = context.getPackageName(); | ||
165 | - Intent intent = new Intent(action); | ||
166 | - intent.setPackage(packageName); | ||
167 | - List<ResolveInfo> receivers = pm.queryBroadcastReceivers(intent, | ||
168 | - PackageManager.GET_INTENT_FILTERS); | ||
169 | - if (receivers.isEmpty()) { | ||
170 | - throw new IllegalStateException("No receivers for action " + action); | ||
171 | - } | ||
172 | - if (Log.isLoggable(TAG, Log.VERBOSE)) { | ||
173 | - Log.v(TAG, "Found " + receivers.size() + " receivers for action " | ||
174 | - + action); | ||
175 | - } | ||
176 | - // make sure receivers match | ||
177 | - for (ResolveInfo receiver : receivers) { | ||
178 | - String name = receiver.activityInfo.name; | ||
179 | - if (!allowedReceivers.contains(name)) { | ||
180 | - throw new IllegalStateException("Receiver " + name | ||
181 | - + " is not set with permission " | ||
182 | - + GCMConstants.PERMISSION_GCM_INTENTS); | ||
183 | - } | ||
184 | - } | ||
185 | - } | ||
186 | - | ||
187 | - /** | ||
188 | - * Initiate messaging registration for the current application. | ||
189 | - * <p/> | ||
190 | - * The result will be returned as an | ||
191 | - * {@link GCMConstants#INTENT_FROM_GCM_REGISTRATION_CALLBACK} intent with | ||
192 | - * either a {@link GCMConstants#EXTRA_REGISTRATION_ID} or | ||
193 | - * {@link GCMConstants#EXTRA_ERROR}. | ||
194 | - * | ||
195 | - * @param context application context. | ||
196 | - * @param senderIds Google Project ID of the accounts authorized to send messages | ||
197 | - * to this application. | ||
198 | - * @throws IllegalStateException if device does not have all GCM dependencies installed. | ||
199 | - */ | ||
200 | - public static void register(Context context, String... senderIds) { | ||
201 | -// setRetryBroadcastReceiver(context); | ||
202 | - GCMRegistrar.resetBackoff(context); | ||
203 | -// internalRegister(context, senderIds); | ||
204 | - } | ||
205 | - | ||
206 | - /** | ||
207 | - * Unregister the application. | ||
208 | - * <p/> | ||
209 | - * The result will be returned as an | ||
210 | - * {@link GCMConstants#INTENT_FROM_GCM_REGISTRATION_CALLBACK} intent with an | ||
211 | - * {@link GCMConstants#EXTRA_UNREGISTERED} extra. | ||
212 | - */ | ||
213 | - public static void unregister(Context context) { | ||
214 | - GCMRegistrar.resetBackoff(context); | ||
215 | - } | ||
216 | 49 | ||
217 | /** | 50 | /** |
218 | * Gets the current registration id for application on GCM service. | 51 | * Gets the current registration id for application on GCM service. |
... | @@ -239,14 +72,6 @@ public final class GCMRegistrar { | ... | @@ -239,14 +72,6 @@ public final class GCMRegistrar { |
239 | } | 72 | } |
240 | 73 | ||
241 | /** | 74 | /** |
242 | - * Checks whether the application was successfully registered on GCM | ||
243 | - * service. | ||
244 | - */ | ||
245 | - public static boolean isRegistered(Context context) { | ||
246 | - return getRegistrationId(context).length() > 0; | ||
247 | - } | ||
248 | - | ||
249 | - /** | ||
250 | * Clears the registration id in the persistence store. | 75 | * Clears the registration id in the persistence store. |
251 | * | 76 | * |
252 | * @param context application's context. | 77 | * @param context application's context. |
... | @@ -275,27 +100,6 @@ public final class GCMRegistrar { | ... | @@ -275,27 +100,6 @@ public final class GCMRegistrar { |
275 | } | 100 | } |
276 | 101 | ||
277 | /** | 102 | /** |
278 | - * Sets whether the device was successfully registered in the server side. | ||
279 | - */ | ||
280 | - public static void setRegisteredOnServer(Context context, boolean flag) { | ||
281 | - final SharedPreferences prefs = getGCMPreferences(context); | ||
282 | - Log.v(TAG, "Setting registered on server status as: " + flag); | ||
283 | - Editor editor = prefs.edit(); | ||
284 | - editor.putBoolean(PROPERTY_ON_SERVER, flag); | ||
285 | - editor.commit(); | ||
286 | - } | ||
287 | - | ||
288 | - /** | ||
289 | - * Checks whether the device was successfully registered in the server side. | ||
290 | - */ | ||
291 | - public static boolean isRegisteredOnServer(Context context) { | ||
292 | - final SharedPreferences prefs = getGCMPreferences(context); | ||
293 | - boolean isRegistered = prefs.getBoolean(PROPERTY_ON_SERVER, false); | ||
294 | - Log.v(TAG, "Is registered on server: " + isRegistered); | ||
295 | - return isRegistered; | ||
296 | - } | ||
297 | - | ||
298 | - /** | ||
299 | * Gets the application version. | 103 | * Gets the application version. |
300 | */ | 104 | */ |
301 | private static int getAppVersion(Context context) { | 105 | private static int getAppVersion(Context context) { |
... | @@ -309,45 +113,6 @@ public final class GCMRegistrar { | ... | @@ -309,45 +113,6 @@ public final class GCMRegistrar { |
309 | } | 113 | } |
310 | } | 114 | } |
311 | 115 | ||
312 | - /** | ||
313 | - * Resets the backoff counter. | ||
314 | - * <p/> | ||
315 | - * This method should be called after a GCM call succeeds. | ||
316 | - * | ||
317 | - * @param context application's context. | ||
318 | - */ | ||
319 | - public static void resetBackoff(Context context) { | ||
320 | - Log.d(TAG, "resetting backoff for " + context.getPackageName()); | ||
321 | - setBackoff(context, DEFAULT_BACKOFF_MS); | ||
322 | - } | ||
323 | - | ||
324 | - /** | ||
325 | - * Gets the current backoff counter. | ||
326 | - * | ||
327 | - * @param context application's context. | ||
328 | - * @return current backoff counter, in milliseconds. | ||
329 | - */ | ||
330 | - public static int getBackoff(Context context) { | ||
331 | - final SharedPreferences prefs = getGCMPreferences(context); | ||
332 | - return prefs.getInt(BACKOFF_MS, DEFAULT_BACKOFF_MS); | ||
333 | - } | ||
334 | - | ||
335 | - /** | ||
336 | - * Sets the backoff counter. | ||
337 | - * <p/> | ||
338 | - * This method should be called after a GCM call fails, passing an | ||
339 | - * exponential value. | ||
340 | - * | ||
341 | - * @param context application's context. | ||
342 | - * @param backoff new backoff counter, in milliseconds. | ||
343 | - */ | ||
344 | - public static void setBackoff(Context context, int backoff) { | ||
345 | - final SharedPreferences prefs = getGCMPreferences(context); | ||
346 | - Editor editor = prefs.edit(); | ||
347 | - editor.putInt(BACKOFF_MS, backoff); | ||
348 | - editor.commit(); | ||
349 | - } | ||
350 | - | ||
351 | private static SharedPreferences getGCMPreferences(Context context) { | 116 | private static SharedPreferences getGCMPreferences(Context context) { |
352 | return context.getSharedPreferences(PREFERENCES, Context.MODE_PRIVATE); | 117 | return context.getSharedPreferences(PREFERENCES, Context.MODE_PRIVATE); |
353 | } | 118 | } | ... | ... |
... | @@ -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)) { | 75 | + jObj.putOpt("platform", "android"); |
76 | - jObj.putOpt("platform", "android"); | 76 | + jObj.putOpt("manufacturer", getDeviceManufacturer()); |
77 | - jObj.putOpt("manufacturer", getDeviceManufacturer()); | 77 | + jObj.putOpt("android_phone_model", getDeviceModel()); |
78 | - jObj.putOpt("android_phone_model", getDeviceModel()); | 78 | + jObj.putOpt("os_version", getOsVersion()); |
79 | - jObj.putOpt("os_version", getOsVersion()); | 79 | + jObj.putOpt("app_version", getAppVersion()); |
80 | - 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)) { | 91 | + jObj.putOpt("platform", "android"); |
95 | - jObj.putOpt("platform", "android"); | 92 | + jObj.putOpt("manufacturer", getDeviceManufacturer()); |
96 | - jObj.putOpt("manufacturer", getDeviceManufacturer()); | 93 | + jObj.putOpt("android_phone_model", getDeviceModel()); |
97 | - jObj.putOpt("android_phone_model", getDeviceModel()); | 94 | + jObj.putOpt("os_version", getOsVersion()); |
98 | - jObj.putOpt("os_version", getOsVersion()); | 95 | + jObj.putOpt("app_version", getAppVersion()); |
99 | - 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)) { | 119 | + jObj.putOpt("platform", "android"); |
126 | - jObj.putOpt("platform", "android"); | 120 | + jObj.putOpt("manufacturer", getDeviceManufacturer()); |
127 | - jObj.putOpt("manufacturer", getDeviceManufacturer()); | 121 | + jObj.putOpt("android_phone_model", getDeviceModel()); |
128 | - jObj.putOpt("android_phone_model", getDeviceModel()); | 122 | + jObj.putOpt("os_version", getOsVersion()); |
129 | - jObj.putOpt("os_version", getOsVersion()); | 123 | + jObj.putOpt("app_version", getAppVersion()); |
130 | - 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)) { | 134 | + jObj.putOpt("platform", "android"); |
144 | - jObj.putOpt("platform", "android"); | 135 | + jObj.putOpt("manufacturer", getDeviceManufacturer()); |
145 | - jObj.putOpt("manufacturer", getDeviceManufacturer()); | 136 | + jObj.putOpt("android_phone_model", getDeviceModel()); |
146 | - jObj.putOpt("android_phone_model", getDeviceModel()); | 137 | + jObj.putOpt("os_version", getOsVersion()); |
147 | - jObj.putOpt("os_version", getOsVersion()); | 138 | + jObj.putOpt("app_version", getAppVersion()); |
148 | - 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 | } | ... | ... |
... | @@ -32,8 +32,6 @@ import android.text.format.DateFormat; | ... | @@ -32,8 +32,6 @@ import android.text.format.DateFormat; |
32 | import android.util.ArrayMap; | 32 | import android.util.ArrayMap; |
33 | 33 | ||
34 | import androidx.annotation.NonNull; | 34 | import androidx.annotation.NonNull; |
35 | -import androidx.work.OneTimeWorkRequest; | ||
36 | -import androidx.work.WorkManager; | ||
37 | 35 | ||
38 | import com.google.common.util.concurrent.FutureCallback; | 36 | import com.google.common.util.concurrent.FutureCallback; |
39 | import com.google.common.util.concurrent.Futures; | 37 | import com.google.common.util.concurrent.Futures; |
... | @@ -42,7 +40,6 @@ import com.google.common.util.concurrent.ListeningExecutorService; | ... | @@ -42,7 +40,6 @@ import com.google.common.util.concurrent.ListeningExecutorService; |
42 | import com.google.common.util.concurrent.MoreExecutors; | 40 | import com.google.common.util.concurrent.MoreExecutors; |
43 | import com.google.common.util.concurrent.SettableFuture; | 41 | import com.google.common.util.concurrent.SettableFuture; |
44 | 42 | ||
45 | -import org.greenrobot.eventbus.EventBus; | ||
46 | import org.json.JSONArray; | 43 | import org.json.JSONArray; |
47 | import org.json.JSONException; | 44 | import org.json.JSONException; |
48 | import org.json.JSONObject; | 45 | import org.json.JSONObject; |
... | @@ -62,13 +59,11 @@ import ly.warp.sdk.io.callbacks.CallbackReceiver; | ... | @@ -62,13 +59,11 @@ import ly.warp.sdk.io.callbacks.CallbackReceiver; |
62 | import ly.warp.sdk.io.models.Campaign; | 59 | import ly.warp.sdk.io.models.Campaign; |
63 | import ly.warp.sdk.io.models.Coupon; | 60 | import ly.warp.sdk.io.models.Coupon; |
64 | import ly.warp.sdk.io.models.CouponList; | 61 | import ly.warp.sdk.io.models.CouponList; |
65 | -import ly.warp.sdk.io.models.LoyaltySDKDynatraceEventModel; | ||
66 | import ly.warp.sdk.io.models.NewCampaign; | 62 | import ly.warp.sdk.io.models.NewCampaign; |
67 | import ly.warp.sdk.io.models.RedeemedSMHistoryModel; | 63 | import ly.warp.sdk.io.models.RedeemedSMHistoryModel; |
68 | import ly.warp.sdk.io.request.WarplyRefreshTokenRequest; | 64 | import ly.warp.sdk.io.request.WarplyRefreshTokenRequest; |
69 | import ly.warp.sdk.io.volley.ApiClient; | 65 | import ly.warp.sdk.io.volley.ApiClient; |
70 | import ly.warp.sdk.io.volley.ApiService; | 66 | import ly.warp.sdk.io.volley.ApiService; |
71 | -import ly.warp.sdk.services.EventRewardsCouponsService; | ||
72 | import ly.warp.sdk.utils.WarpJSONParser; | 67 | import ly.warp.sdk.utils.WarpJSONParser; |
73 | import ly.warp.sdk.utils.WarpUtils; | 68 | import ly.warp.sdk.utils.WarpUtils; |
74 | import ly.warp.sdk.utils.WarplyDeviceInfoCollector; | 69 | import ly.warp.sdk.utils.WarplyDeviceInfoCollector; |
... | @@ -104,32 +99,18 @@ public class WarplyManager { | ... | @@ -104,32 +99,18 @@ public class WarplyManager { |
104 | try { | 99 | try { |
105 | newResult.putOpt("status", 1); | 100 | newResult.putOpt("status", 1); |
106 | newResult.putOpt("message", "Success"); | 101 | newResult.putOpt("message", "Success"); |
107 | - | ||
108 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
109 | - dynatraceEvent.setEventName("custom_success_refresh_token_loyalty"); | ||
110 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
111 | - | ||
112 | receiver.onSuccess(newResult); | 102 | receiver.onSuccess(newResult); |
113 | } catch (JSONException e) { | 103 | } catch (JSONException e) { |
114 | e.printStackTrace(); | 104 | e.printStackTrace(); |
115 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
116 | - dynatraceEvent.setEventName("custom_error_refresh_token_loyalty"); | ||
117 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
118 | receiver.onFailure(2); | 105 | receiver.onFailure(2); |
119 | } | 106 | } |
120 | } else { | 107 | } else { |
121 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
122 | - dynatraceEvent.setEventName("custom_error_refresh_token_loyalty"); | ||
123 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
124 | receiver.onFailure(2); | 108 | receiver.onFailure(2); |
125 | } | 109 | } |
126 | } | 110 | } |
127 | 111 | ||
128 | @Override | 112 | @Override |
129 | public void onFailure(int errorCode) { | 113 | public void onFailure(int errorCode) { |
130 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
131 | - dynatraceEvent.setEventName("custom_error_refresh_token_loyalty"); | ||
132 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
133 | if (errorCode == 401) { | 114 | if (errorCode == 401) { |
134 | WarplyDBHelper.getInstance(Warply.getWarplyContext()).deleteAuth(); | 115 | WarplyDBHelper.getInstance(Warply.getWarplyContext()).deleteAuth(); |
135 | WarplyDBHelper.getInstance(Warply.getWarplyContext()).deleteClient(); | 116 | WarplyDBHelper.getInstance(Warply.getWarplyContext()).deleteClient(); |
... | @@ -143,25 +124,20 @@ public class WarplyManager { | ... | @@ -143,25 +124,20 @@ public class WarplyManager { |
143 | WarpUtils.log("************* WARPLY Logout ********************"); | 124 | WarpUtils.log("************* WARPLY Logout ********************"); |
144 | WarpUtils.log("[WARP Trace] WARPLY Logout is active"); | 125 | WarpUtils.log("[WARP Trace] WARPLY Logout is active"); |
145 | WarpUtils.log("**************************************************"); | 126 | WarpUtils.log("**************************************************"); |
146 | - | ||
147 | ApiService service = ApiClient.getRetrofitInstance().create(ApiService.class); | 127 | ApiService service = ApiClient.getRetrofitInstance().create(ApiService.class); |
148 | - | ||
149 | String timeStamp = DateFormat.format("yyyy-MM-dd hh:mm:ss", System.currentTimeMillis()).toString(); | 128 | String timeStamp = DateFormat.format("yyyy-MM-dd hh:mm:ss", System.currentTimeMillis()).toString(); |
150 | String apiKey = WarpUtils.getApiKey(Warply.getWarplyContext()); | 129 | String apiKey = WarpUtils.getApiKey(Warply.getWarplyContext()); |
151 | String webId = WarpUtils.getWebId(Warply.getWarplyContext()); | 130 | String webId = WarpUtils.getWebId(Warply.getWarplyContext()); |
152 | - | ||
153 | Map<String, Object> jsonParams = new ArrayMap<>(); | 131 | Map<String, Object> jsonParams = new ArrayMap<>(); |
154 | - if (WarpUtils.isJWTEnabled(Warply.getWarplyContext())) { | 132 | +// if (WarpUtils.isJWTEnabled(Warply.getWarplyContext())) { |
155 | - jsonParams.put("access_token", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("access_token")); | 133 | + jsonParams.put("access_token", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("access_token")); |
156 | - jsonParams.put("refresh_token", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("refresh_token")); | 134 | + jsonParams.put("refresh_token", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("refresh_token")); |
157 | - } else { | 135 | +// } else { |
158 | - jsonParams.put("token", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("access_token")); | 136 | + jsonParams.put("token", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getAuthValue("access_token")); |
159 | - jsonParams.put("client_id", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_id")); | 137 | + jsonParams.put("client_id", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_id")); |
160 | - jsonParams.put("client_secret", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_secret")); | 138 | + jsonParams.put("client_secret", WarplyDBHelper.getInstance(Warply.getWarplyContext()).getClientValue("client_secret")); |
161 | - } | 139 | +// } |
162 | - | ||
163 | RequestBody loginRequest = RequestBody.create(MediaType.get("application/json; charset=utf-8"), (new JSONObject(jsonParams)).toString()); | 140 | RequestBody loginRequest = RequestBody.create(MediaType.get("application/json; charset=utf-8"), (new JSONObject(jsonParams)).toString()); |
164 | - | ||
165 | Call<ResponseBody> logoutCall = WarpUtils.isJWTEnabled(Warply.getWarplyContext()) | 141 | Call<ResponseBody> logoutCall = WarpUtils.isJWTEnabled(Warply.getWarplyContext()) |
166 | ? service.logoutUserJwt( | 142 | ? service.logoutUserJwt( |
167 | WarplyProperty.getAppUuid(Warply.getWarplyContext()), | 143 | WarplyProperty.getAppUuid(Warply.getWarplyContext()), |
... | @@ -182,53 +158,36 @@ public class WarplyManager { | ... | @@ -182,53 +158,36 @@ public class WarplyManager { |
182 | webId, | 158 | webId, |
183 | WarpUtils.produceSignature(apiKey + timeStamp) | 159 | WarpUtils.produceSignature(apiKey + timeStamp) |
184 | ); | 160 | ); |
185 | - | ||
186 | logoutCall.enqueue(new Callback<ResponseBody>() { | 161 | logoutCall.enqueue(new Callback<ResponseBody>() { |
187 | @Override | 162 | @Override |
188 | public void onResponse(@NonNull Call<ResponseBody> call, @NonNull Response<ResponseBody> response) { | 163 | public void onResponse(@NonNull Call<ResponseBody> call, @NonNull Response<ResponseBody> response) { |
189 | if (response.code() == 200 && response.body() != null) { | 164 | if (response.code() == 200 && response.body() != null) { |
190 | - WarpUtils.setUserNonTelco(Warply.getWarplyContext(), false); | ||
191 | - WarpUtils.setUserTag(Warply.getWarplyContext(), ""); | ||
192 | - | ||
193 | WarplyDBHelper.getInstance(Warply.getWarplyContext()).deleteAuth(); | 165 | WarplyDBHelper.getInstance(Warply.getWarplyContext()).deleteAuth(); |
194 | WarplyDBHelper.getInstance(Warply.getWarplyContext()).deleteClient(); | 166 | WarplyDBHelper.getInstance(Warply.getWarplyContext()).deleteClient(); |
195 | - | ||
196 | JSONObject newResult = new JSONObject(); | 167 | JSONObject newResult = new JSONObject(); |
197 | try { | 168 | try { |
198 | newResult.putOpt("status", 1); | 169 | newResult.putOpt("status", 1); |
199 | newResult.putOpt("message", "Success"); | 170 | newResult.putOpt("message", "Success"); |
200 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
201 | - dynatraceEvent.setEventName("custom_success_logout_loyalty"); | ||
202 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
203 | receiver.onSuccess(newResult); | 171 | receiver.onSuccess(newResult); |
204 | } catch (JSONException e) { | 172 | } catch (JSONException e) { |
205 | e.printStackTrace(); | 173 | e.printStackTrace(); |
206 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
207 | - dynatraceEvent.setEventName("custom_error_logout_loyalty"); | ||
208 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
209 | receiver.onFailure(2); | 174 | receiver.onFailure(2); |
210 | } | 175 | } |
211 | } else { | 176 | } else { |
212 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
213 | - dynatraceEvent.setEventName("custom_error_logout_loyalty"); | ||
214 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
215 | receiver.onFailure(response.code()); | 177 | receiver.onFailure(response.code()); |
216 | } | 178 | } |
217 | } | 179 | } |
218 | 180 | ||
219 | @Override | 181 | @Override |
220 | public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) { | 182 | public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) { |
221 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
222 | - dynatraceEvent.setEventName("custom_error_logout_loyalty"); | ||
223 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
224 | receiver.onFailure(2); | 183 | receiver.onFailure(2); |
225 | } | 184 | } |
226 | }); | 185 | }); |
227 | } | 186 | } |
228 | 187 | ||
229 | - public static void getDehUser(String guid, final CallbackReceiver<JSONObject> receiver) { | 188 | + public static void getDehUser(String email, final CallbackReceiver<JSONObject> receiver) { |
230 | - WarpUtils.log("************* WARPLY Cosmote User Request ********************"); | 189 | + WarpUtils.log("************* WARPLY Deh User Request ********************"); |
231 | - WarpUtils.log("[WARP Trace] WARPLY Cosmote User Request is active"); | 190 | + WarpUtils.log("[WARP Trace] WARPLY Deh User Request is active"); |
232 | WarpUtils.log("**************************************************"); | 191 | WarpUtils.log("**************************************************"); |
233 | 192 | ||
234 | if (WarplyDBHelper.getInstance(Warply.getWarplyContext()).isTableNotEmpty("auth")) { | 193 | if (WarplyDBHelper.getInstance(Warply.getWarplyContext()).isTableNotEmpty("auth")) { |
... | @@ -251,20 +210,18 @@ public class WarplyManager { | ... | @@ -251,20 +210,18 @@ public class WarplyManager { |
251 | String webId = WarpUtils.getWebId(Warply.getWarplyContext()); | 210 | String webId = WarpUtils.getWebId(Warply.getWarplyContext()); |
252 | 211 | ||
253 | Map<String, Object> jsonParams = new ArrayMap<>(); | 212 | Map<String, Object> jsonParams = new ArrayMap<>(); |
254 | - jsonParams.put("user_identifier", guid); | 213 | + jsonParams.put("email", email); |
255 | 214 | ||
256 | RequestBody loginRequest = RequestBody.create(MediaType.get("application/json; charset=utf-8"), (new JSONObject(jsonParams)).toString()); | 215 | RequestBody loginRequest = RequestBody.create(MediaType.get("application/json; charset=utf-8"), (new JSONObject(jsonParams)).toString()); |
257 | 216 | ||
258 | - Call<ResponseBody> loginCall = service.cosmoteUser( | 217 | + Call<ResponseBody> loginCall = service.dehUser( |
259 | - WarplyProperty.getAppUuid(Warply.getWarplyContext()), | ||
260 | loginRequest, | 218 | loginRequest, |
261 | timeStamp, | 219 | timeStamp, |
262 | "android:" + Warply.getWarplyContext().getPackageName(), | 220 | "android:" + Warply.getWarplyContext().getPackageName(), |
263 | new WarplyDeviceInfoCollector(Warply.getWarplyContext()).getUniqueDeviceId(), | 221 | new WarplyDeviceInfoCollector(Warply.getWarplyContext()).getUniqueDeviceId(), |
264 | "mobile", | 222 | "mobile", |
265 | webId, | 223 | webId, |
266 | - WarpUtils.produceSignature(apiKey + timeStamp), | 224 | + WarpUtils.produceSignature(apiKey + timeStamp) |
267 | - "Basic MVBQNFhCQzhFYTJBaUdCNkJWZGFGUERlTTNLQ3kzMjU6YzViMzAyZDY5N2FiNGY3NzhiNThhMTg0YzBkZWRmNGU=" | ||
268 | ); | 225 | ); |
269 | 226 | ||
270 | loginCall.enqueue(new Callback<ResponseBody>() { | 227 | loginCall.enqueue(new Callback<ResponseBody>() { |
... | @@ -320,24 +277,14 @@ public class WarplyManager { | ... | @@ -320,24 +277,14 @@ public class WarplyManager { |
320 | try { | 277 | try { |
321 | newResult.putOpt("status", 1); | 278 | newResult.putOpt("status", 1); |
322 | newResult.putOpt("message", "Success"); | 279 | newResult.putOpt("message", "Success"); |
323 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
324 | - dynatraceEvent.setEventName("custom_success_login_loyalty"); | ||
325 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
326 | receiver.onSuccess(newResult); | 280 | receiver.onSuccess(newResult); |
327 | } catch (JSONException e) { | 281 | } catch (JSONException e) { |
328 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
329 | - dynatraceEvent.setEventName("custom_error_login_loyalty"); | ||
330 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
331 | - | ||
332 | e.printStackTrace(); | 282 | e.printStackTrace(); |
333 | receiver.onFailure(2); | 283 | receiver.onFailure(2); |
334 | } | 284 | } |
335 | return; | 285 | return; |
336 | } | 286 | } |
337 | 287 | ||
338 | - WarpUtils.setUserNonTelco(Warply.getWarplyContext(), false); | ||
339 | - WarpUtils.setUserTag(Warply.getWarplyContext(), ""); | ||
340 | - | ||
341 | ApiService service = ApiClient.getRetrofitInstance().create(ApiService.class); | 288 | ApiService service = ApiClient.getRetrofitInstance().create(ApiService.class); |
342 | 289 | ||
343 | String timeStamp = DateFormat.format("yyyy-MM-dd hh:mm:ss", System.currentTimeMillis()).toString(); | 290 | String timeStamp = DateFormat.format("yyyy-MM-dd hh:mm:ss", System.currentTimeMillis()).toString(); |
... | @@ -383,43 +330,24 @@ public class WarplyManager { | ... | @@ -383,43 +330,24 @@ public class WarplyManager { |
383 | try { | 330 | try { |
384 | newResult.putOpt("status", 1); | 331 | newResult.putOpt("status", 1); |
385 | newResult.putOpt("message", "Success"); | 332 | newResult.putOpt("message", "Success"); |
386 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
387 | - dynatraceEvent.setEventName("custom_success_login_loyalty"); | ||
388 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
389 | receiver.onSuccess(newResult); | 333 | receiver.onSuccess(newResult); |
390 | } catch (JSONException e) { | 334 | } catch (JSONException e) { |
391 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
392 | - dynatraceEvent.setEventName("custom_error_login_loyalty"); | ||
393 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
394 | - | ||
395 | e.printStackTrace(); | 335 | e.printStackTrace(); |
396 | receiver.onFailure(2); | 336 | receiver.onFailure(2); |
397 | } | 337 | } |
398 | } else { | 338 | } else { |
399 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
400 | - dynatraceEvent.setEventName("custom_error_login_loyalty"); | ||
401 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
402 | receiver.onFailure(2); | 339 | receiver.onFailure(2); |
403 | } | 340 | } |
404 | } else { | 341 | } else { |
405 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
406 | - dynatraceEvent.setEventName("custom_error_login_loyalty"); | ||
407 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
408 | receiver.onFailure(2); | 342 | receiver.onFailure(2); |
409 | } | 343 | } |
410 | } else { | 344 | } else { |
411 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
412 | - dynatraceEvent.setEventName("custom_error_login_loyalty"); | ||
413 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
414 | receiver.onFailure(response.code()); | 345 | receiver.onFailure(response.code()); |
415 | } | 346 | } |
416 | } | 347 | } |
417 | 348 | ||
418 | @Override | 349 | @Override |
419 | public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) { | 350 | public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) { |
420 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
421 | - dynatraceEvent.setEventName("custom_error_login_loyalty"); | ||
422 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
423 | receiver.onFailure(2); | 351 | receiver.onFailure(2); |
424 | } | 352 | } |
425 | }); | 353 | }); |
... | @@ -571,10 +499,6 @@ public class WarplyManager { | ... | @@ -571,10 +499,6 @@ public class WarplyManager { |
571 | } | 499 | } |
572 | 500 | ||
573 | if (jobjCampaignsResponse != null && jobjCampaignsResponse.has("status") && jobjCampaignsResponse.optString("status", "2").equals("1")) { | 501 | if (jobjCampaignsResponse != null && jobjCampaignsResponse.has("status") && jobjCampaignsResponse.optString("status", "2").equals("1")) { |
574 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
575 | - dynatraceEvent.setEventName("custom_success_campaigns_loyalty"); | ||
576 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
577 | - | ||
578 | JSONArray jCampaignsBody = null; | 502 | JSONArray jCampaignsBody = null; |
579 | try { | 503 | try { |
580 | jCampaignsBody = jobjCampaignsResponse.optJSONObject("context").optJSONObject("MAPP_CAMPAIGNING").optJSONArray("campaigns"); | 504 | jCampaignsBody = jobjCampaignsResponse.optJSONObject("context").optJSONObject("MAPP_CAMPAIGNING").optJSONArray("campaigns"); |
... | @@ -652,16 +576,10 @@ public class WarplyManager { | ... | @@ -652,16 +576,10 @@ public class WarplyManager { |
652 | }); | 576 | }); |
653 | } | 577 | } |
654 | } else { | 578 | } else { |
655 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
656 | - dynatraceEvent.setEventName("custom_error_campaigns_loyalty"); | ||
657 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
658 | // receiver.onFailure(2); | 579 | // receiver.onFailure(2); |
659 | future.set(new ArrayList<Campaign>()); | 580 | future.set(new ArrayList<Campaign>()); |
660 | } | 581 | } |
661 | } else { | 582 | } else { |
662 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
663 | - dynatraceEvent.setEventName("custom_error_campaigns_loyalty"); | ||
664 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
665 | // receiver.onFailure(response.code()); | 583 | // receiver.onFailure(response.code()); |
666 | // future.set(new ArrayList<Campaign>()); | 584 | // future.set(new ArrayList<Campaign>()); |
667 | future.setException(new Throwable()); | 585 | future.setException(new Throwable()); |
... | @@ -670,9 +588,6 @@ public class WarplyManager { | ... | @@ -670,9 +588,6 @@ public class WarplyManager { |
670 | 588 | ||
671 | @Override | 589 | @Override |
672 | public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) { | 590 | public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) { |
673 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
674 | - dynatraceEvent.setEventName("custom_error_campaigns_loyalty"); | ||
675 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
676 | // receiver.onFailure(2); | 591 | // receiver.onFailure(2); |
677 | // future.set(new ArrayList<Campaign>()); | 592 | // future.set(new ArrayList<Campaign>()); |
678 | future.setException(new Throwable()); | 593 | future.setException(new Throwable()); |
... | @@ -710,10 +625,6 @@ public class WarplyManager { | ... | @@ -710,10 +625,6 @@ public class WarplyManager { |
710 | } | 625 | } |
711 | 626 | ||
712 | if (jobjCampaignsResponse != null && jobjCampaignsResponse.has("status") && jobjCampaignsResponse.optString("status", "2").equals("1")) { | 627 | if (jobjCampaignsResponse != null && jobjCampaignsResponse.has("status") && jobjCampaignsResponse.optString("status", "2").equals("1")) { |
713 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
714 | - dynatraceEvent.setEventName("custom_success_campaigns_loyalty"); | ||
715 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
716 | - | ||
717 | JSONArray jCampaignsBody = null; | 628 | JSONArray jCampaignsBody = null; |
718 | try { | 629 | try { |
719 | jCampaignsBody = jobjCampaignsResponse.optJSONObject("context").optJSONObject("MAPP_CAMPAIGNING").optJSONArray("campaigns"); | 630 | jCampaignsBody = jobjCampaignsResponse.optJSONObject("context").optJSONObject("MAPP_CAMPAIGNING").optJSONArray("campaigns"); |
... | @@ -791,9 +702,6 @@ public class WarplyManager { | ... | @@ -791,9 +702,6 @@ public class WarplyManager { |
791 | }); | 702 | }); |
792 | } | 703 | } |
793 | } else { | 704 | } else { |
794 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
795 | - dynatraceEvent.setEventName("custom_error_campaigns_personalized_loyalty"); | ||
796 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
797 | // receiver.onFailure(2); | 705 | // receiver.onFailure(2); |
798 | future.set(new ArrayList<Campaign>()); | 706 | future.set(new ArrayList<Campaign>()); |
799 | } | 707 | } |
... | @@ -827,9 +735,6 @@ public class WarplyManager { | ... | @@ -827,9 +735,6 @@ public class WarplyManager { |
827 | } | 735 | } |
828 | }); | 736 | }); |
829 | } else { | 737 | } else { |
830 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
831 | - dynatraceEvent.setEventName("custom_error_campaigns_personalized_loyalty"); | ||
832 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
833 | // receiver.onFailure(response.code()); | 738 | // receiver.onFailure(response.code()); |
834 | // future.set(new ArrayList<Campaign>()); | 739 | // future.set(new ArrayList<Campaign>()); |
835 | future.setException(new Throwable()); | 740 | future.setException(new Throwable()); |
... | @@ -838,9 +743,6 @@ public class WarplyManager { | ... | @@ -838,9 +743,6 @@ public class WarplyManager { |
838 | 743 | ||
839 | @Override | 744 | @Override |
840 | public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) { | 745 | public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) { |
841 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
842 | - dynatraceEvent.setEventName("custom_error_campaigns_personalized_loyalty"); | ||
843 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
844 | // receiver.onFailure(2); | 746 | // receiver.onFailure(2); |
845 | // future.set(new ArrayList<Campaign>()); | 747 | // future.set(new ArrayList<Campaign>()); |
846 | future.setException(new Throwable()); | 748 | future.setException(new Throwable()); |
... | @@ -882,10 +784,6 @@ public class WarplyManager { | ... | @@ -882,10 +784,6 @@ public class WarplyManager { |
882 | } | 784 | } |
883 | 785 | ||
884 | if (jobjCampaignsAvailabilityResponse != null && jobjCampaignsAvailabilityResponse.has("status") && jobjCampaignsAvailabilityResponse.optString("status", "2").equals("1")) { | 786 | if (jobjCampaignsAvailabilityResponse != null && jobjCampaignsAvailabilityResponse.has("status") && jobjCampaignsAvailabilityResponse.optString("status", "2").equals("1")) { |
885 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
886 | - dynatraceEvent.setEventName("custom_success_available_coupons"); | ||
887 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
888 | - | ||
889 | final ExecutorService executorCampaignsAvailability = Executors.newFixedThreadPool(1); | 787 | final ExecutorService executorCampaignsAvailability = Executors.newFixedThreadPool(1); |
890 | final JSONObject finalJobjCampaignsAvailabilityResponse = jobjCampaignsAvailabilityResponse; | 788 | final JSONObject finalJobjCampaignsAvailabilityResponse = jobjCampaignsAvailabilityResponse; |
891 | executorCampaignsAvailability.submit(() -> { | 789 | executorCampaignsAvailability.submit(() -> { |
... | @@ -902,15 +800,9 @@ public class WarplyManager { | ... | @@ -902,15 +800,9 @@ public class WarplyManager { |
902 | } | 800 | } |
903 | }); | 801 | }); |
904 | } else { | 802 | } else { |
905 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
906 | - dynatraceEvent.setEventName("custom_error_available_coupons"); | ||
907 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
908 | future.set(new JSONObject()); | 803 | future.set(new JSONObject()); |
909 | } | 804 | } |
910 | } else { | 805 | } else { |
911 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
912 | - dynatraceEvent.setEventName("custom_error_available_coupons"); | ||
913 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
914 | // future.set(new JSONObject()); | 806 | // future.set(new JSONObject()); |
915 | future.setException(new Throwable()); | 807 | future.setException(new Throwable()); |
916 | } | 808 | } |
... | @@ -918,9 +810,6 @@ public class WarplyManager { | ... | @@ -918,9 +810,6 @@ public class WarplyManager { |
918 | 810 | ||
919 | @Override | 811 | @Override |
920 | public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) { | 812 | public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) { |
921 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
922 | - dynatraceEvent.setEventName("custom_error_available_coupons"); | ||
923 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
924 | // future.set(new JSONObject()); | 813 | // future.set(new JSONObject()); |
925 | future.setException(new Throwable()); | 814 | future.setException(new Throwable()); |
926 | } | 815 | } |
... | @@ -960,9 +849,6 @@ public class WarplyManager { | ... | @@ -960,9 +849,6 @@ public class WarplyManager { |
960 | e.printStackTrace(); | 849 | e.printStackTrace(); |
961 | } | 850 | } |
962 | if (jobjCouponsResponse != null && jobjCouponsResponse.has("status") && jobjCouponsResponse.optString("status", "2").equals("1")) { | 851 | if (jobjCouponsResponse != null && jobjCouponsResponse.has("status") && jobjCouponsResponse.optString("status", "2").equals("1")) { |
963 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
964 | - dynatraceEvent.setEventName("custom_success_user_sm_coupons_loyalty"); | ||
965 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
966 | JSONArray jCouponsBody = null; | 852 | JSONArray jCouponsBody = null; |
967 | try { | 853 | try { |
968 | jCouponsBody = jobjCouponsResponse.optJSONArray("result"); | 854 | jCouponsBody = jobjCouponsResponse.optJSONArray("result"); |
... | @@ -994,15 +880,9 @@ public class WarplyManager { | ... | @@ -994,15 +880,9 @@ public class WarplyManager { |
994 | future.set(redeemedSMHistoryModel); | 880 | future.set(redeemedSMHistoryModel); |
995 | }); | 881 | }); |
996 | } else { | 882 | } else { |
997 | - LoyaltySDKDynatraceEventModel dynatraceEventElse = new LoyaltySDKDynatraceEventModel(); | ||
998 | - dynatraceEventElse.setEventName("custom_error_user_sm_coupons_loyalty"); | ||
999 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEventElse)); | ||
1000 | future.set(new RedeemedSMHistoryModel()); | 883 | future.set(new RedeemedSMHistoryModel()); |
1001 | } | 884 | } |
1002 | } else { | 885 | } else { |
1003 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
1004 | - dynatraceEvent.setEventName("custom_error_user_sm_coupons_loyalty"); | ||
1005 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
1006 | future.set(new RedeemedSMHistoryModel()); | 886 | future.set(new RedeemedSMHistoryModel()); |
1007 | } | 887 | } |
1008 | } else if (response.code() == 401) { | 888 | } else if (response.code() == 401) { |
... | @@ -1035,9 +915,6 @@ public class WarplyManager { | ... | @@ -1035,9 +915,6 @@ public class WarplyManager { |
1035 | } | 915 | } |
1036 | }); | 916 | }); |
1037 | } else { | 917 | } else { |
1038 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
1039 | - dynatraceEvent.setEventName("custom_error_user_sm_coupons_loyalty"); | ||
1040 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
1041 | // future.set(new CouponList()); | 918 | // future.set(new CouponList()); |
1042 | future.setException(new Throwable()); | 919 | future.setException(new Throwable()); |
1043 | } | 920 | } |
... | @@ -1045,9 +922,6 @@ public class WarplyManager { | ... | @@ -1045,9 +922,6 @@ public class WarplyManager { |
1045 | 922 | ||
1046 | @Override | 923 | @Override |
1047 | public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) { | 924 | public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) { |
1048 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
1049 | - dynatraceEvent.setEventName("custom_error_user_sm_coupons_loyalty"); | ||
1050 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
1051 | // future.set(new CouponList()); | 925 | // future.set(new CouponList()); |
1052 | future.setException(new Throwable()); | 926 | future.setException(new Throwable()); |
1053 | } | 927 | } |
... | @@ -1094,10 +968,6 @@ public class WarplyManager { | ... | @@ -1094,10 +968,6 @@ public class WarplyManager { |
1094 | } | 968 | } |
1095 | 969 | ||
1096 | if (jobjCouponsResponse != null && jobjCouponsResponse.has("status") && jobjCouponsResponse.optString("status", "2").equals("1")) { | 970 | if (jobjCouponsResponse != null && jobjCouponsResponse.has("status") && jobjCouponsResponse.optString("status", "2").equals("1")) { |
1097 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
1098 | - dynatraceEvent.setEventName("custom_success_user_coupons_loyalty"); | ||
1099 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
1100 | - | ||
1101 | JSONArray jCouponsBody = null; | 971 | JSONArray jCouponsBody = null; |
1102 | try { | 972 | try { |
1103 | jCouponsBody = jobjCouponsResponse.optJSONArray("result"); | 973 | jCouponsBody = jobjCouponsResponse.optJSONArray("result"); |
... | @@ -1120,8 +990,6 @@ public class WarplyManager { | ... | @@ -1120,8 +990,6 @@ public class WarplyManager { |
1120 | } | 990 | } |
1121 | 991 | ||
1122 | WarplyManagerHelper.setCouponRedeemedList(mCouponRedeemedList); | 992 | WarplyManagerHelper.setCouponRedeemedList(mCouponRedeemedList); |
1123 | - OneTimeWorkRequest mywork = new OneTimeWorkRequest.Builder(EventRewardsCouponsService.class).build(); | ||
1124 | - WorkManager.getInstance(Warply.getWarplyContext()).enqueue(mywork); | ||
1125 | 993 | ||
1126 | Collections.sort(mCouponRedeemedList, (coupon1, coupon2) -> coupon1.getExpirationDate().compareTo(coupon2.getExpirationDate())); | 994 | Collections.sort(mCouponRedeemedList, (coupon1, coupon2) -> coupon1.getExpirationDate().compareTo(coupon2.getExpirationDate())); |
1127 | 995 | ||
... | @@ -1130,15 +998,9 @@ public class WarplyManager { | ... | @@ -1130,15 +998,9 @@ public class WarplyManager { |
1130 | future.set(mCouponRedeemedList); | 998 | future.set(mCouponRedeemedList); |
1131 | }); | 999 | }); |
1132 | } else { | 1000 | } else { |
1133 | - LoyaltySDKDynatraceEventModel dynatraceEventElse = new LoyaltySDKDynatraceEventModel(); | ||
1134 | - dynatraceEventElse.setEventName("custom_error_user_coupons_loyalty"); | ||
1135 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEventElse)); | ||
1136 | future.set(new CouponList()); | 1001 | future.set(new CouponList()); |
1137 | } | 1002 | } |
1138 | } else { | 1003 | } else { |
1139 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
1140 | - dynatraceEvent.setEventName("custom_error_user_coupons_loyalty"); | ||
1141 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
1142 | future.set(new CouponList()); | 1004 | future.set(new CouponList()); |
1143 | } | 1005 | } |
1144 | } else if (response.code() == 401) { | 1006 | } else if (response.code() == 401) { |
... | @@ -1171,9 +1033,6 @@ public class WarplyManager { | ... | @@ -1171,9 +1033,6 @@ public class WarplyManager { |
1171 | } | 1033 | } |
1172 | }); | 1034 | }); |
1173 | } else { | 1035 | } else { |
1174 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
1175 | - dynatraceEvent.setEventName("custom_error_user_coupons_loyalty"); | ||
1176 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
1177 | // future.set(new CouponList()); | 1036 | // future.set(new CouponList()); |
1178 | future.setException(new Throwable()); | 1037 | future.setException(new Throwable()); |
1179 | } | 1038 | } |
... | @@ -1181,9 +1040,6 @@ public class WarplyManager { | ... | @@ -1181,9 +1040,6 @@ public class WarplyManager { |
1181 | 1040 | ||
1182 | @Override | 1041 | @Override |
1183 | public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) { | 1042 | public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) { |
1184 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | ||
1185 | - dynatraceEvent.setEventName("custom_error_user_coupons_loyalty"); | ||
1186 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
1187 | // future.set(new CouponList()); | 1043 | // future.set(new CouponList()); |
1188 | future.setException(new Throwable()); | 1044 | future.setException(new Throwable()); |
1189 | } | 1045 | } |
... | @@ -1202,17 +1058,13 @@ public class WarplyManager { | ... | @@ -1202,17 +1058,13 @@ public class WarplyManager { |
1202 | Warply.INSTANCE.getSingleCampaign(null, url, new CallbackReceiver<JSONObject>() { | 1058 | Warply.INSTANCE.getSingleCampaign(null, url, new CallbackReceiver<JSONObject>() { |
1203 | @Override | 1059 | @Override |
1204 | public void onSuccess(JSONObject result) { | 1060 | public void onSuccess(JSONObject result) { |
1205 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | 1061 | + |
1206 | - dynatraceEvent.setEventName("custom_success_read_campaign_loyalty"); | ||
1207 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
1208 | } | 1062 | } |
1209 | 1063 | ||
1210 | @Override | 1064 | @Override |
1211 | public void onFailure(int errorCode) { | 1065 | public void onFailure(int errorCode) { |
1212 | if (errorCode == 301 || errorCode == 302 || errorCode == 307 || errorCode == 308) { | 1066 | if (errorCode == 301 || errorCode == 302 || errorCode == 307 || errorCode == 308) { |
1213 | - LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | 1067 | + |
1214 | - dynatraceEvent.setEventName("custom_success_read_campaign_loyalty"); | ||
1215 | - EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ||
1216 | } | 1068 | } |
1217 | } | 1069 | } |
1218 | }, null); | 1070 | }, null); | ... | ... |
... | @@ -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 | } | ... | ... |

17.1 KB
No preview for this file type

7.82 KB

3.94 KB

7.35 KB

6.75 KB

27.2 KB

6.42 KB
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 | ... | ... |
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 |
... | @@ -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" | ... | ... |
... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
4 | xmlns:tools="http://schemas.android.com/tools" | 4 | xmlns:tools="http://schemas.android.com/tools" |
5 | android:layout_width="match_parent" | 5 | android:layout_width="match_parent" |
6 | android:layout_height="match_parent" | 6 | android:layout_height="match_parent" |
7 | - android:background="@color/cos_skyblue2"> | 7 | + android:background="@color/white"> |
8 | 8 | ||
9 | <RelativeLayout | 9 | <RelativeLayout |
10 | android:layout_width="match_parent" | 10 | android:layout_width="match_parent" |
... | @@ -16,13 +16,13 @@ | ... | @@ -16,13 +16,13 @@ |
16 | android:layout_height="wrap_content" | 16 | android:layout_height="wrap_content" |
17 | android:background="@android:color/white" | 17 | android:background="@android:color/white" |
18 | android:paddingHorizontal="16dp" | 18 | android:paddingHorizontal="16dp" |
19 | - android:paddingTop="8dp"> | 19 | + android:paddingVertical="16dp"> |
20 | 20 | ||
21 | <ImageView | 21 | <ImageView |
22 | android:id="@+id/user_img" | 22 | android:id="@+id/user_img" |
23 | android:layout_width="60dp" | 23 | android:layout_width="60dp" |
24 | android:layout_height="60dp" | 24 | android:layout_height="60dp" |
25 | - android:src="@drawable/profile_photo" | 25 | + android:src="@drawable/demo_logo_small" |
26 | app:layout_constraintStart_toStartOf="parent" | 26 | app:layout_constraintStart_toStartOf="parent" |
27 | app:layout_constraintTop_toTopOf="parent" /> | 27 | app:layout_constraintTop_toTopOf="parent" /> |
28 | 28 | ||
... | @@ -31,7 +31,7 @@ | ... | @@ -31,7 +31,7 @@ |
31 | android:layout_width="0dp" | 31 | android:layout_width="0dp" |
32 | android:layout_height="match_parent" | 32 | android:layout_height="match_parent" |
33 | android:orientation="vertical" | 33 | android:orientation="vertical" |
34 | - android:paddingLeft="10dp" | 34 | + android:paddingHorizontal="10dp" |
35 | app:layout_constraintEnd_toStartOf="@+id/iv_settings" | 35 | app:layout_constraintEnd_toStartOf="@+id/iv_settings" |
36 | app:layout_constraintStart_toEndOf="@+id/user_img" | 36 | app:layout_constraintStart_toEndOf="@+id/user_img" |
37 | app:layout_constraintTop_toTopOf="@+id/user_img"> | 37 | app:layout_constraintTop_toTopOf="@+id/user_img"> |
... | @@ -43,172 +43,47 @@ | ... | @@ -43,172 +43,47 @@ |
43 | android:layout_marginBottom="8dp" | 43 | android:layout_marginBottom="8dp" |
44 | android:maxLines="1" | 44 | android:maxLines="1" |
45 | android:scrollHorizontally="true" | 45 | android:scrollHorizontally="true" |
46 | - android:textColor="#415564" | 46 | + android:textColor="@color/custom_black2" |
47 | - tools:text="@string/welcome_user" /> | 47 | + android:text="@string/welcome_user" /> |
48 | - | ||
49 | - <ImageView | ||
50 | - android:id="@+id/cosmote_one" | ||
51 | - android:layout_width="100dp" | ||
52 | - android:layout_height="30dp" | ||
53 | - android:layout_below="@+id/welcome_user_txt" | ||
54 | - android:layout_marginTop="0dp" | ||
55 | - android:src="@drawable/cosmote_one" /> | ||
56 | - | ||
57 | - <LinearLayout | ||
58 | - android:layout_width="wrap_content" | ||
59 | - android:layout_height="wrap_content" | ||
60 | - android:layout_below="@+id/cosmote_one"> | ||
61 | - | ||
62 | - <include | ||
63 | - android:id="@+id/info_button" | ||
64 | - layout="@layout/button_with_image" | ||
65 | - android:layout_width="wrap_content" | ||
66 | - android:layout_height="wrap_content" /> | ||
67 | - | ||
68 | - <include | ||
69 | - android:id="@+id/info_button2" | ||
70 | - layout="@layout/button_with_image" | ||
71 | - android:layout_width="wrap_content" | ||
72 | - android:layout_height="wrap_content" | ||
73 | - android:layout_marginLeft="5dp" /> | ||
74 | - | ||
75 | - <include | ||
76 | - android:id="@+id/info_button3" | ||
77 | - layout="@layout/button_with_image" | ||
78 | - android:layout_width="wrap_content" | ||
79 | - android:layout_height="wrap_content" | ||
80 | - android:layout_marginLeft="5dp" /> | ||
81 | - </LinearLayout> | ||
82 | </RelativeLayout> | 48 | </RelativeLayout> |
83 | 49 | ||
84 | <ImageView | 50 | <ImageView |
85 | android:id="@+id/iv_settings" | 51 | android:id="@+id/iv_settings" |
86 | android:layout_width="25dp" | 52 | android:layout_width="25dp" |
87 | android:layout_height="25dp" | 53 | android:layout_height="25dp" |
88 | - android:src="@drawable/filters_icon" | 54 | + android:src="@drawable/vc_logout" |
89 | app:layout_constraintEnd_toEndOf="parent" | 55 | app:layout_constraintEnd_toEndOf="parent" |
90 | app:layout_constraintTop_toTopOf="@+id/user_img" /> | 56 | app:layout_constraintTop_toTopOf="@+id/user_img" /> |
91 | </androidx.constraintlayout.widget.ConstraintLayout> | 57 | </androidx.constraintlayout.widget.ConstraintLayout> |
92 | 58 | ||
93 | <RelativeLayout | 59 | <RelativeLayout |
94 | - android:id="@+id/rl_auth" | 60 | + android:id="@+id/pb_loading" |
95 | - android:layout_width="wrap_content" | 61 | + android:layout_width="match_parent" |
96 | - android:layout_height="wrap_content" | 62 | + android:layout_height="match_parent" |
97 | - android:layout_below="@+id/rl_header" | 63 | + android:layout_centerInParent="true" |
98 | - android:background="@color/cos_skyblue2" | 64 | + android:background="@android:color/transparent" |
99 | - android:paddingVertical="16dp"> | 65 | + android:translationZ="100dp" |
100 | - | 66 | + android:visibility="gone" |
101 | - <RelativeLayout | 67 | + tools:visibility="visible"> |
102 | - android:id="@+id/rl_auth_view" | 68 | + |
103 | - android:layout_width="match_parent" | 69 | + <ProgressBar |
104 | - android:layout_height="70dp" | 70 | + android:layout_width="48dp" |
105 | - android:layout_marginHorizontal="8dp" | 71 | + android:layout_height="48dp" |
106 | - android:layout_marginTop="24dp" | ||
107 | - android:layout_marginBottom="16dp" | ||
108 | - android:background="@drawable/shape_cos_white"> | ||
109 | - | ||
110 | - <EditText | ||
111 | - android:id="@+id/et_login" | ||
112 | - android:layout_width="180dp" | ||
113 | - android:layout_height="wrap_content" | ||
114 | - android:layout_alignParentStart="true" | ||
115 | - android:layout_centerVertical="true" | ||
116 | - android:layout_marginStart="16dp" | ||
117 | - android:hint="@string/cos_hint" | ||
118 | - android:inputType="number" | ||
119 | - android:textColor="@color/blue_dark" | ||
120 | - android:textSize="20sp" | ||
121 | - android:textStyle="bold" | ||
122 | - android:visibility="gone" | ||
123 | - tools:visibility="visible" /> | ||
124 | - | ||
125 | - <TextView | ||
126 | - android:id="@+id/tv_login" | ||
127 | - android:layout_width="wrap_content" | ||
128 | - android:layout_height="wrap_content" | ||
129 | - android:layout_alignParentStart="true" | ||
130 | - android:layout_centerVertical="true" | ||
131 | - android:layout_marginStart="16dp" | ||
132 | - android:textColor="@color/blue_dark" | ||
133 | - android:textSize="20sp" | ||
134 | - android:visibility="gone" /> | ||
135 | - | ||
136 | - <LinearLayout | ||
137 | - android:id="@+id/ll_auth_login" | ||
138 | - android:layout_width="140dp" | ||
139 | - android:layout_height="45dp" | ||
140 | - android:layout_alignParentEnd="true" | ||
141 | - android:layout_centerVertical="true" | ||
142 | - android:layout_marginEnd="16dp" | ||
143 | - android:background="@drawable/selector_button_green" | ||
144 | - android:gravity="center" | ||
145 | - android:orientation="horizontal" | ||
146 | - android:visibility="gone"> | ||
147 | - | ||
148 | - <TextView | ||
149 | - android:id="@+id/button_login" | ||
150 | - android:layout_width="wrap_content" | ||
151 | - android:layout_height="wrap_content" | ||
152 | - android:gravity="center" | ||
153 | - android:includeFontPadding="false" | ||
154 | - android:text="@string/cos_login_text" | ||
155 | - android:textColor="@color/white" | ||
156 | - android:textSize="16sp" /> | ||
157 | - </LinearLayout> | ||
158 | - | ||
159 | - <LinearLayout | ||
160 | - android:id="@+id/ll_auth_logout" | ||
161 | - android:layout_width="140dp" | ||
162 | - android:layout_height="45dp" | ||
163 | - android:layout_alignParentEnd="true" | ||
164 | - android:layout_centerVertical="true" | ||
165 | - android:layout_marginEnd="16dp" | ||
166 | - android:background="@drawable/selector_button_green" | ||
167 | - android:gravity="center" | ||
168 | - android:orientation="horizontal" | ||
169 | - android:visibility="gone"> | ||
170 | - | ||
171 | - <TextView | ||
172 | - android:id="@+id/button_logout" | ||
173 | - android:layout_width="wrap_content" | ||
174 | - android:layout_height="wrap_content" | ||
175 | - android:gravity="center" | ||
176 | - android:includeFontPadding="false" | ||
177 | - android:text="@string/cos_logout_text" | ||
178 | - android:textColor="@color/white" | ||
179 | - android:textSize="16sp" /> | ||
180 | - </LinearLayout> | ||
181 | - </RelativeLayout> | ||
182 | - | ||
183 | - <RelativeLayout | ||
184 | - android:id="@+id/pb_loading" | ||
185 | - android:layout_width="match_parent" | ||
186 | - android:layout_height="match_parent" | ||
187 | android:layout_centerInParent="true" | 72 | android:layout_centerInParent="true" |
188 | - android:background="@android:color/transparent" | 73 | + android:indeterminate="true" |
189 | - android:translationZ="100dp" | 74 | + android:indeterminateTint="@color/custom_light_blue" |
190 | - android:visibility="gone" | 75 | + android:indeterminateTintMode="src_atop" /> |
191 | - tools:visibility="visible"> | ||
192 | - | ||
193 | - <ProgressBar | ||
194 | - android:layout_width="48dp" | ||
195 | - android:layout_height="48dp" | ||
196 | - android:layout_centerInParent="true" | ||
197 | - android:indeterminate="true" | ||
198 | - android:indeterminateTint="@color/cos_green5" | ||
199 | - android:indeterminateTintMode="src_atop" /> | ||
200 | - </RelativeLayout> | ||
201 | </RelativeLayout> | 76 | </RelativeLayout> |
202 | 77 | ||
203 | <RelativeLayout | 78 | <RelativeLayout |
204 | android:id="@+id/rl_sm_view" | 79 | android:id="@+id/rl_sm_view" |
205 | android:layout_width="match_parent" | 80 | android:layout_width="match_parent" |
206 | android:layout_height="70dp" | 81 | android:layout_height="70dp" |
207 | - android:layout_below="@+id/rl_auth" | 82 | + android:layout_below="@+id/rl_header" |
208 | android:layout_marginHorizontal="8dp" | 83 | android:layout_marginHorizontal="8dp" |
209 | android:layout_marginTop="24dp" | 84 | android:layout_marginTop="24dp" |
210 | android:layout_marginBottom="16dp" | 85 | android:layout_marginBottom="16dp" |
211 | - android:background="@drawable/shape_cos_white"> | 86 | + android:background="@drawable/shape_rectangle_rounded_white"> |
212 | 87 | ||
213 | <LinearLayout | 88 | <LinearLayout |
214 | android:id="@+id/ll_sm_flow" | 89 | android:id="@+id/ll_sm_flow" |
... | @@ -217,28 +92,7 @@ | ... | @@ -217,28 +92,7 @@ |
217 | android:layout_alignParentStart="true" | 92 | android:layout_alignParentStart="true" |
218 | android:layout_centerVertical="true" | 93 | android:layout_centerVertical="true" |
219 | android:layout_marginStart="16dp" | 94 | android:layout_marginStart="16dp" |
220 | - android:background="@drawable/selector_button_green" | 95 | + android:background="@drawable/selector_button_light_blue" |
221 | - android:gravity="center" | ||
222 | - android:orientation="horizontal"> | ||
223 | - | ||
224 | - <TextView | ||
225 | - android:layout_width="wrap_content" | ||
226 | - android:layout_height="wrap_content" | ||
227 | - android:gravity="center" | ||
228 | - android:includeFontPadding="false" | ||
229 | - android:text="@string/demo_sm_flow" | ||
230 | - android:textColor="@color/white" | ||
231 | - android:textSize="16sp" /> | ||
232 | - </LinearLayout> | ||
233 | - | ||
234 | - <LinearLayout | ||
235 | - android:id="@+id/ll_sm_map" | ||
236 | - android:layout_width="140dp" | ||
237 | - android:layout_height="45dp" | ||
238 | - android:layout_alignParentEnd="true" | ||
239 | - android:layout_centerVertical="true" | ||
240 | - android:layout_marginEnd="16dp" | ||
241 | - android:background="@drawable/selector_button_green" | ||
242 | android:gravity="center" | 96 | android:gravity="center" |
243 | android:orientation="horizontal"> | 97 | android:orientation="horizontal"> |
244 | 98 | ||
... | @@ -247,7 +101,7 @@ | ... | @@ -247,7 +101,7 @@ |
247 | android:layout_height="wrap_content" | 101 | android:layout_height="wrap_content" |
248 | android:gravity="center" | 102 | android:gravity="center" |
249 | android:includeFontPadding="false" | 103 | android:includeFontPadding="false" |
250 | - android:text="@string/demo_sm_map" | 104 | + android:text="@string/demo_home" |
251 | android:textColor="@color/white" | 105 | android:textColor="@color/white" |
252 | android:textSize="16sp" /> | 106 | android:textSize="16sp" /> |
253 | </LinearLayout> | 107 | </LinearLayout> | ... | ... |
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> | ... | ... |
-
Please register or login to post a comment