Showing
17 changed files
with
179 additions
and
52 deletions
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> | 
| 2 | <project version="4"> | 2 | <project version="4"> | 
| 3 | <component name="deploymentTargetDropDown"> | 3 | <component name="deploymentTargetDropDown"> | 
| 4 | - <targetSelectedWithDropDown> | 4 | + <value> | 
| 5 | - <Target> | 5 | + <entry key="app"> | 
| 6 | - <type value="QUICK_BOOT_TARGET" /> | 6 | + <State /> | 
| 7 | - <deviceKey> | 7 | + </entry> | 
| 8 | - <Key> | 8 | + </value> | 
| 9 | - <type value="VIRTUAL_DEVICE_PATH" /> | ||
| 10 | - <value value="$USER_HOME$/.android/avd/Pixel_6a_API_29.avd" /> | ||
| 11 | - </Key> | ||
| 12 | - </deviceKey> | ||
| 13 | - </Target> | ||
| 14 | - </targetSelectedWithDropDown> | ||
| 15 | - <timeTargetWasSelectedWithDropDown value="2023-11-28T10:41:57.588318Z" /> | ||
| 16 | </component> | 9 | </component> | 
| 17 | </project> | 10 | </project> | 
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... | 
| ... | @@ -4,11 +4,9 @@ | ... | @@ -4,11 +4,9 @@ | 
| 4 | <component name="GradleSettings"> | 4 | <component name="GradleSettings"> | 
| 5 | <option name="linkedExternalProjectsSettings"> | 5 | <option name="linkedExternalProjectsSettings"> | 
| 6 | <GradleProjectSettings> | 6 | <GradleProjectSettings> | 
| 7 | - <option name="testRunner" value="GRADLE" /> | ||
| 8 | - <option name="distributionType" value="DEFAULT_WRAPPED" /> | ||
| 9 | <option name="externalProjectPath" value="$PROJECT_DIR$" /> | 7 | <option name="externalProjectPath" value="$PROJECT_DIR$" /> | 
| 10 | <option name="gradleHome" value="$PROJECT_DIR$/../../../../../../gradle-6.6.1" /> | 8 | <option name="gradleHome" value="$PROJECT_DIR$/../../../../../../gradle-6.6.1" /> | 
| 11 | - <option name="gradleJvm" value="jbr-17" /> | 9 | + <option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" /> | 
| 12 | <option name="modules"> | 10 | <option name="modules"> | 
| 13 | <set> | 11 | <set> | 
| 14 | <option value="$PROJECT_DIR$" /> | 12 | <option value="$PROJECT_DIR$" /> | 
| ... | @@ -16,6 +14,7 @@ | ... | @@ -16,6 +14,7 @@ | 
| 16 | <option value="$PROJECT_DIR$/warply_android_sdk" /> | 14 | <option value="$PROJECT_DIR$/warply_android_sdk" /> | 
| 17 | </set> | 15 | </set> | 
| 18 | </option> | 16 | </option> | 
| 17 | + <option name="resolveExternalAnnotations" value="false" /> | ||
| 19 | </GradleProjectSettings> | 18 | </GradleProjectSettings> | 
| 20 | </option> | 19 | </option> | 
| 21 | </component> | 20 | </component> | ... | ... | 
| ... | @@ -3,7 +3,7 @@ | ... | @@ -3,7 +3,7 @@ | 
| 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 f83dfde1145e4c2da69793abb2f579af | 4 | # dev f83dfde1145e4c2da69793abb2f579af | 
| 5 | # prod 0086a2088301440792091b9f814c2267 | 5 | # prod 0086a2088301440792091b9f814c2267 | 
| 6 | -Uuid=f83dfde1145e4c2da69793abb2f579af | 6 | +Uuid=0086a2088301440792091b9f814c2267 | 
| 7 | 7 | ||
| 8 | # If we need to see logs in Logcat | 8 | # If we need to see logs in Logcat | 
| 9 | Debug=false | 9 | Debug=false | 
| ... | @@ -11,7 +11,7 @@ Debug=false | ... | @@ -11,7 +11,7 @@ Debug=false | 
| 11 | # Production or Development environment of the engage server | 11 | # Production or Development environment of the engage server | 
| 12 | # Production: https://engage.warp.ly | 12 | # Production: https://engage.warp.ly | 
| 13 | # Development: https://engage-stage.warp.ly | 13 | # Development: https://engage-stage.warp.ly | 
| 14 | -BaseURL=https://engage-stage.warp.ly | 14 | +BaseURL=https://engage.warp.ly | 
| 15 | 15 | ||
| 16 | # For Verify Ticket request | 16 | # For Verify Ticket request | 
| 17 | VerifyURL=/partners/cosmote/verify | 17 | VerifyURL=/partners/cosmote/verify | ... | ... | 
| ... | @@ -36,7 +36,7 @@ public class SplashActivity extends BaseActivity { | ... | @@ -36,7 +36,7 @@ public class SplashActivity extends BaseActivity { | 
| 36 | public void onWarplyReady() { | 36 | public void onWarplyReady() { | 
| 37 | if (!WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) { | 37 | if (!WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) { | 
| 38 | WarplyManager.getCosmoteUser(new WarplyCosmoteUserRequest() | 38 | WarplyManager.getCosmoteUser(new WarplyCosmoteUserRequest() | 
| 39 | - .setGuid("7000000833"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990, prod 6005892749, live 3000184910,prod 7000070282 | 39 | + .setGuid("6010490808"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990, prod 6005892749, live 3000184910,prod 7000070282 | 
| 40 | mLoginReceiver); | 40 | mLoginReceiver); | 
| 41 | } else { | 41 | } else { | 
| 42 | startNextActivity(); | 42 | startNextActivity(); | ... | ... | 
| ... | @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' | ... | @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' | 
| 2 | 2 | ||
| 3 | ext { | 3 | ext { | 
| 4 | PUBLISH_GROUP_ID = 'ly.warp' | 4 | PUBLISH_GROUP_ID = 'ly.warp' | 
| 5 | - PUBLISH_VERSION = '4.5.5.4r4' | 5 | + PUBLISH_VERSION = '4.5.5.4r5' | 
| 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 
| 7 | } | 7 | } | 
| 8 | 8 | ... | ... | 
| ... | @@ -60,7 +60,7 @@ public class LoyaltyAnalysisActivity extends Activity implements View.OnClickLis | ... | @@ -60,7 +60,7 @@ public class LoyaltyAnalysisActivity extends Activity implements View.OnClickLis | 
| 60 | private SharedCouponAdapter mAdapterSharedCoupons; | 60 | private SharedCouponAdapter mAdapterSharedCoupons; | 
| 61 | private LinearLayout mLlExpiredTab, mLlSharedTab, mLlShowMoreExpired, mLlShowMoreShared; | 61 | private LinearLayout mLlExpiredTab, mLlSharedTab, mLlShowMoreExpired, mLlShowMoreShared; | 
| 62 | private RelativeLayout mRlExpiredView; | 62 | private RelativeLayout mRlExpiredView; | 
| 63 | - private CardView mRlSharedView; | 63 | + private CardView mRlSharedView, mCvExpiredInnerTitle; | 
| 64 | private SharingList mSharedCoupons = new SharingList(); | 64 | private SharingList mSharedCoupons = new SharingList(); | 
| 65 | private int mTimer = 0; | 65 | private int mTimer = 0; | 
| 66 | private Handler mSecondsHandler; | 66 | private Handler mSecondsHandler; | 
| ... | @@ -87,6 +87,7 @@ public class LoyaltyAnalysisActivity extends Activity implements View.OnClickLis | ... | @@ -87,6 +87,7 @@ public class LoyaltyAnalysisActivity extends Activity implements View.OnClickLis | 
| 87 | mTvExpiredEmpty = findViewById(R.id.tv_expired_empty); | 87 | mTvExpiredEmpty = findViewById(R.id.tv_expired_empty); | 
| 88 | mLlShowMoreExpired = findViewById(R.id.ll_show_more_expired); | 88 | mLlShowMoreExpired = findViewById(R.id.ll_show_more_expired); | 
| 89 | mLlShowMoreShared = findViewById(R.id.ll_show_more_shared); | 89 | mLlShowMoreShared = findViewById(R.id.ll_show_more_shared); | 
| 90 | + mCvExpiredInnerTitle = findViewById(R.id.cv_expired_coupons_inner_title); | ||
| 90 | 91 | ||
| 91 | initViews(); | 92 | initViews(); | 
| 92 | } | 93 | } | 
| ... | @@ -282,6 +283,7 @@ public class LoyaltyAnalysisActivity extends Activity implements View.OnClickLis | ... | @@ -282,6 +283,7 @@ public class LoyaltyAnalysisActivity extends Activity implements View.OnClickLis | 
| 282 | mAdapterExpiredCoupons = new ExpiredCouponAdapter(this, WarplyManagerHelper.getCouponExpiredList()); | 283 | mAdapterExpiredCoupons = new ExpiredCouponAdapter(this, WarplyManagerHelper.getCouponExpiredList()); | 
| 283 | mRvExpiredCoupons.setAdapter(mAdapterExpiredCoupons); | 284 | mRvExpiredCoupons.setAdapter(mAdapterExpiredCoupons); | 
| 284 | } else { | 285 | } else { | 
| 286 | + mCvExpiredInnerTitle.setVisibility(View.GONE); | ||
| 285 | mTvExpiredEmpty.setVisibility(View.VISIBLE); | 287 | mTvExpiredEmpty.setVisibility(View.VISIBLE); | 
| 286 | } | 288 | } | 
| 287 | } | 289 | } | ... | ... | 
| ... | @@ -60,7 +60,7 @@ public class LoyaltyMarketAnalysisActivity extends Activity implements View.OnCl | ... | @@ -60,7 +60,7 @@ public class LoyaltyMarketAnalysisActivity extends Activity implements View.OnCl | 
| 60 | private SharedCouponAdapter mAdapterSharedCoupons; | 60 | private SharedCouponAdapter mAdapterSharedCoupons; | 
| 61 | private LinearLayout mLlExpiredTab, mLlSharedTab, mLlShowMoreExpired, mLlShowMoreShared; | 61 | private LinearLayout mLlExpiredTab, mLlSharedTab, mLlShowMoreExpired, mLlShowMoreShared; | 
| 62 | private RelativeLayout mRlExpiredView; | 62 | private RelativeLayout mRlExpiredView; | 
| 63 | - private CardView mRlSharedView; | 63 | + private CardView mRlSharedView, mCvExpiredInfoView; | 
| 64 | private SharingList mSharedCoupons = new SharingList(); | 64 | private SharingList mSharedCoupons = new SharingList(); | 
| 65 | private int mTimer = 0; | 65 | private int mTimer = 0; | 
| 66 | private Handler mSecondsHandler; | 66 | private Handler mSecondsHandler; | 
| ... | @@ -87,6 +87,7 @@ public class LoyaltyMarketAnalysisActivity extends Activity implements View.OnCl | ... | @@ -87,6 +87,7 @@ public class LoyaltyMarketAnalysisActivity extends Activity implements View.OnCl | 
| 87 | mTvExpiredEmpty = findViewById(R.id.tv_expired_empty); | 87 | mTvExpiredEmpty = findViewById(R.id.tv_expired_empty); | 
| 88 | mLlShowMoreExpired = findViewById(R.id.ll_show_more_expired); | 88 | mLlShowMoreExpired = findViewById(R.id.ll_show_more_expired); | 
| 89 | mLlShowMoreShared = findViewById(R.id.ll_show_more_shared); | 89 | mLlShowMoreShared = findViewById(R.id.ll_show_more_shared); | 
| 90 | + mCvExpiredInfoView = findViewById(R.id.cv_expired_coupons_inner_title); | ||
| 90 | if (WarplyManagerHelper.getMarketCoupons() != null && WarplyManagerHelper.getMarketCoupons().size() > 0) { | 91 | if (WarplyManagerHelper.getMarketCoupons() != null && WarplyManagerHelper.getMarketCoupons().size() > 0) { | 
| 91 | final ExecutorService executor = Executors.newFixedThreadPool(1); | 92 | final ExecutorService executor = Executors.newFixedThreadPool(1); | 
| 92 | executor.submit(() -> { | 93 | executor.submit(() -> { | 
| ... | @@ -283,6 +284,7 @@ public class LoyaltyMarketAnalysisActivity extends Activity implements View.OnCl | ... | @@ -283,6 +284,7 @@ public class LoyaltyMarketAnalysisActivity extends Activity implements View.OnCl | 
| 283 | mAdapterExpiredCoupons = new ExpiredCouponAdapter(this, mExpiredMarketCoupons, true); | 284 | mAdapterExpiredCoupons = new ExpiredCouponAdapter(this, mExpiredMarketCoupons, true); | 
| 284 | mRvExpiredCoupons.setAdapter(mAdapterExpiredCoupons); | 285 | mRvExpiredCoupons.setAdapter(mAdapterExpiredCoupons); | 
| 285 | } else { | 286 | } else { | 
| 287 | + mCvExpiredInfoView.setVisibility(View.GONE); | ||
| 286 | mTvExpiredEmpty.setVisibility(View.VISIBLE); | 288 | mTvExpiredEmpty.setVisibility(View.VISIBLE); | 
| 287 | } | 289 | } | 
| 288 | } | 290 | } | ... | ... | 
| ... | @@ -61,7 +61,8 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | ... | @@ -61,7 +61,8 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | 
| 61 | private TextView mTvUsername, mTvDealsValue, mTvDealsValueAll, | 61 | private TextView mTvUsername, mTvDealsValue, mTvDealsValueAll, | 
| 62 | mTvUserBadge, mTvGiftsValue, mTvGiftsValueAll, mTvActiveCode, mTvActiveDate, | 62 | mTvUserBadge, mTvGiftsValue, mTvGiftsValueAll, mTvActiveCode, mTvActiveDate, | 
| 63 | mTvActiveTitle, mTvActiveCouponsHeader, mTvMarketValue, mTvMarketAll, mTvFavValue, | 63 | mTvActiveTitle, mTvActiveCouponsHeader, mTvMarketValue, mTvMarketAll, mTvFavValue, | 
| 64 | - mTvFavValueAll, mTvDealsCountBadge, mTvUnifiedCountBadge, mTvGiftsCountBadge; | 64 | + mTvFavValueAll, mTvDealsCountBadge, mTvUnifiedCountBadge, mTvGiftsCountBadge, | 
| 65 | + mTvVouchersDisabledTitle, mTvVouchersDisabledSubtitle, mTvVouchersTitle, mTvVouchersSubtitle; | ||
| 65 | private ConstraintLayout mClDealsBanner, mClDealsView, | 66 | private ConstraintLayout mClDealsBanner, mClDealsView, | 
| 66 | mClGiftsBanner, mClToolbar, mClMarket; | 67 | mClGiftsBanner, mClToolbar, mClMarket; | 
| 67 | private LinearLayout mLlQuestionnaire, mLlUserBadge, mLlEmptyWallet, mLlDeals, mLlGifts, | 68 | private LinearLayout mLlQuestionnaire, mLlUserBadge, mLlEmptyWallet, mLlDeals, mLlGifts, | 
| ... | @@ -152,6 +153,10 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | ... | @@ -152,6 +153,10 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | 
| 152 | mLlVouchersSpinner = findViewById(R.id.ll_vouchers_spinner); | 153 | mLlVouchersSpinner = findViewById(R.id.ll_vouchers_spinner); | 
| 153 | mSeparator = findViewById(R.id.v_separator_vouchers); | 154 | mSeparator = findViewById(R.id.v_separator_vouchers); | 
| 154 | mSeparatorDisabled = findViewById(R.id.v_separator_vouchers_disabled); | 155 | mSeparatorDisabled = findViewById(R.id.v_separator_vouchers_disabled); | 
| 156 | + mTvVouchersDisabledTitle = findViewById(R.id.tv_vouchers_title_disabled); | ||
| 157 | + mTvVouchersDisabledSubtitle = findViewById(R.id.tv_vouchers_info_title_disabled); | ||
| 158 | + mTvVouchersTitle = findViewById(R.id.tv_vouchers_title); | ||
| 159 | + mTvVouchersSubtitle = findViewById(R.id.tv_vouchers_info_title); | ||
| 155 | 160 | ||
| 156 | /** Deals Badge */ | 161 | /** Deals Badge */ | 
| 157 | // if (WarplyManagerHelper.getActiveDFYCoupons() != null) { | 162 | // if (WarplyManagerHelper.getActiveDFYCoupons() != null) { | 
| ... | @@ -1007,6 +1012,13 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | ... | @@ -1007,6 +1012,13 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | 
| 1007 | /** Hide spinner and hide empty view and show vouchers and hide disabled vouchers */ | 1012 | /** Hide spinner and hide empty view and show vouchers and hide disabled vouchers */ | 
| 1008 | mLlVouchersSpinner.setVisibility(View.GONE); | 1013 | mLlVouchersSpinner.setVisibility(View.GONE); | 
| 1009 | mLlEmptyWallet.setVisibility(View.GONE); | 1014 | mLlEmptyWallet.setVisibility(View.GONE); | 
| 1015 | + if (TextUtils.isEmpty(WarpUtils.getLanguage(this)) || WarpUtils.getLanguage(this).equals("el")) { | ||
| 1016 | + mTvVouchersTitle.setText(getString(R.string.cos_vouchers_title)); | ||
| 1017 | + mTvVouchersSubtitle.setText(getString(R.string.cos_vouchers_info_title)); | ||
| 1018 | + } else { | ||
| 1019 | + mTvVouchersTitle.setText(getString(R.string.cos_vouchers_title_en)); | ||
| 1020 | + mTvVouchersSubtitle.setText(getString(R.string.cos_vouchers_info_title_en)); | ||
| 1021 | + } | ||
| 1010 | mLlVouchers.setVisibility(View.VISIBLE); | 1022 | mLlVouchers.setVisibility(View.VISIBLE); | 
| 1011 | mLlVouchersDisabled.setVisibility(View.GONE); | 1023 | mLlVouchersDisabled.setVisibility(View.GONE); | 
| 1012 | mSeparatorDisabled.setVisibility(View.VISIBLE); | 1024 | mSeparatorDisabled.setVisibility(View.VISIBLE); | 
| ... | @@ -1027,6 +1039,13 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | ... | @@ -1027,6 +1039,13 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie | 
| 1027 | mLlEmptyWallet.setVisibility(View.GONE); | 1039 | mLlEmptyWallet.setVisibility(View.GONE); | 
| 1028 | mLlVouchers.setVisibility(View.GONE); | 1040 | mLlVouchers.setVisibility(View.GONE); | 
| 1029 | mSeparator.setVisibility(View.VISIBLE); | 1041 | mSeparator.setVisibility(View.VISIBLE); | 
| 1042 | + if (TextUtils.isEmpty(WarpUtils.getLanguage(this)) || WarpUtils.getLanguage(this).equals("el")) { | ||
| 1043 | + mTvVouchersDisabledTitle.setText(getString(R.string.cos_vouchers_title)); | ||
| 1044 | + mTvVouchersDisabledSubtitle.setText(getString(R.string.cos_vouchers_info_title_disabled)); | ||
| 1045 | + } else { | ||
| 1046 | + mTvVouchersDisabledTitle.setText(getString(R.string.cos_vouchers_title_en)); | ||
| 1047 | + mTvVouchersDisabledSubtitle.setText(getString(R.string.cos_vouchers_info_title_disabled_en)); | ||
| 1048 | + } | ||
| 1030 | mLlVouchersDisabled.setVisibility(View.VISIBLE); | 1049 | mLlVouchersDisabled.setVisibility(View.VISIBLE); | 
| 1031 | mSeparatorDisabled.setVisibility(View.VISIBLE); | 1050 | mSeparatorDisabled.setVisibility(View.VISIBLE); | 
| 1032 | if ((WarplyManagerHelper.getActiveDFYCoupons() != null && WarplyManagerHelper.getActiveDFYCoupons().size() == 0) | 1051 | if ((WarplyManagerHelper.getActiveDFYCoupons() != null && WarplyManagerHelper.getActiveDFYCoupons().size() == 0) | ... | ... | 
| ... | @@ -10,13 +10,14 @@ public class CustomerStateModel { | ... | @@ -10,13 +10,14 @@ public class CustomerStateModel { | 
| 10 | private boolean nonTelco = false; | 10 | private boolean nonTelco = false; | 
| 11 | private boolean acceptedConsent = false; | 11 | private boolean acceptedConsent = false; | 
| 12 | private ArrayList<String> msisdnList = new ArrayList<>(); | 12 | private ArrayList<String> msisdnList = new ArrayList<>(); | 
| 13 | - private String guid = ""; | 13 | + private String guid = "", language = ""; | 
| 14 | 14 | ||
| 15 | public CustomerStateModel() { | 15 | public CustomerStateModel() { | 
| 16 | this.nonTelco = false; | 16 | this.nonTelco = false; | 
| 17 | this.acceptedConsent = false; | 17 | this.acceptedConsent = false; | 
| 18 | this.msisdnList = new ArrayList<>(); | 18 | this.msisdnList = new ArrayList<>(); | 
| 19 | this.guid = ""; | 19 | this.guid = ""; | 
| 20 | + this.language = ""; | ||
| 20 | } | 21 | } | 
| 21 | 22 | ||
| 22 | public boolean isNonTelco() { | 23 | public boolean isNonTelco() { | 
| ... | @@ -50,4 +51,12 @@ public class CustomerStateModel { | ... | @@ -50,4 +51,12 @@ public class CustomerStateModel { | 
| 50 | public void setGuid(String guid) { | 51 | public void setGuid(String guid) { | 
| 51 | this.guid = guid; | 52 | this.guid = guid; | 
| 52 | } | 53 | } | 
| 54 | + | ||
| 55 | + public String getLanguage() { | ||
| 56 | + return language; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + public void setLanguage(String language) { | ||
| 60 | + this.language = language; | ||
| 61 | + } | ||
| 53 | } | 62 | } | ... | ... | 
| ... | @@ -40,7 +40,7 @@ public class WarplyIntegrationRequest { | ... | @@ -40,7 +40,7 @@ public class WarplyIntegrationRequest { | 
| 40 | private long mCacheUpdateInterval = 0; | 40 | private long mCacheUpdateInterval = 0; | 
| 41 | private boolean mIsNonTelco = false; | 41 | private boolean mIsNonTelco = false; | 
| 42 | private boolean mHasAcceptedConsent = false; | 42 | private boolean mHasAcceptedConsent = false; | 
| 43 | - private String mGuid = ""; | 43 | + private String mGuid = "", mLanguage = ""; | 
| 44 | private ArrayList<String> mPhoneList = new ArrayList<>(); | 44 | private ArrayList<String> mPhoneList = new ArrayList<>(); | 
| 45 | 45 | ||
| 46 | // =========================================================== | 46 | // =========================================================== | 
| ... | @@ -56,6 +56,7 @@ public class WarplyIntegrationRequest { | ... | @@ -56,6 +56,7 @@ public class WarplyIntegrationRequest { | 
| 56 | this.mHasAcceptedConsent = false; | 56 | this.mHasAcceptedConsent = false; | 
| 57 | this.mGuid = ""; | 57 | this.mGuid = ""; | 
| 58 | this.mPhoneList = new ArrayList<>(); | 58 | this.mPhoneList = new ArrayList<>(); | 
| 59 | + this.mLanguage = ""; | ||
| 59 | } | 60 | } | 
| 60 | 61 | ||
| 61 | public WarplyIntegrationRequest(WarplyIntegrationRequest copy) { | 62 | public WarplyIntegrationRequest(WarplyIntegrationRequest copy) { | 
| ... | @@ -111,6 +112,15 @@ public class WarplyIntegrationRequest { | ... | @@ -111,6 +112,15 @@ public class WarplyIntegrationRequest { | 
| 111 | return this; | 112 | return this; | 
| 112 | } | 113 | } | 
| 113 | 114 | ||
| 115 | + public WarplyIntegrationRequest setLanguage(String language) { | ||
| 116 | + this.mLanguage = language; | ||
| 117 | + return this; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + public String getLanguage() { | ||
| 121 | + return mLanguage; | ||
| 122 | + } | ||
| 123 | + | ||
| 114 | /** | 124 | /** | 
| 115 | * Call this to get how often the cached data will be updated. | 125 | * Call this to get how often the cached data will be updated. | 
| 116 | * | 126 | * | 
| ... | @@ -179,6 +189,7 @@ public class WarplyIntegrationRequest { | ... | @@ -179,6 +189,7 @@ public class WarplyIntegrationRequest { | 
| 179 | data.putOpt("acceptedConsent", mHasAcceptedConsent); | 189 | data.putOpt("acceptedConsent", mHasAcceptedConsent); | 
| 180 | data.putOpt("msisdnList", new JSONArray(mPhoneList)); | 190 | data.putOpt("msisdnList", new JSONArray(mPhoneList)); | 
| 181 | data.putOpt("guid", mGuid); | 191 | data.putOpt("guid", mGuid); | 
| 192 | + data.putOpt("language", mLanguage); | ||
| 182 | 193 | ||
| 183 | extraJson.putOpt(KEY_DATA, data); | 194 | extraJson.putOpt(KEY_DATA, data); | 
| 184 | bodyJsonObject.putOpt(KEY_MAPP, extraJson); | 195 | bodyJsonObject.putOpt(KEY_MAPP, extraJson); | ... | ... | 
| ... | @@ -147,6 +147,8 @@ public class WarpUtils { | ... | @@ -147,6 +147,8 @@ public class WarpUtils { | 
| 147 | + "steps_meters_counter"; | 147 | + "steps_meters_counter"; | 
| 148 | private static final String PREFERENCES_TRACKERS_ENABLED = PREFERENCES_PREFIX | 148 | private static final String PREFERENCES_TRACKERS_ENABLED = PREFERENCES_PREFIX | 
| 149 | + "trackers_enabled"; | 149 | + "trackers_enabled"; | 
| 150 | + private static final String PREFERENCES_KEY_LANGUAGE = PREFERENCES_PREFIX | ||
| 151 | + + "language"; | ||
| 150 | 152 | ||
| 151 | private static SharedPreferences _prefs; | 153 | private static SharedPreferences _prefs; | 
| 152 | 154 | ||
| ... | @@ -162,6 +164,16 @@ public class WarpUtils { | ... | @@ -162,6 +164,16 @@ public class WarpUtils { | 
| 162 | editor.apply(); | 164 | editor.apply(); | 
| 163 | } | 165 | } | 
| 164 | 166 | ||
| 167 | + public static String getLanguage(Context context) { | ||
| 168 | + return getPreferences(context).getString(PREFERENCES_KEY_LANGUAGE, "el"); | ||
| 169 | + } | ||
| 170 | + | ||
| 171 | + public static void setLanguage(Context context, String userTag) { | ||
| 172 | + SharedPreferences.Editor editor = getPreferences(context).edit(); | ||
| 173 | + editor.putString(PREFERENCES_KEY_LANGUAGE, userTag); | ||
| 174 | + editor.apply(); | ||
| 175 | + } | ||
| 176 | + | ||
| 165 | public static boolean getUserNonTelco(Context context) { | 177 | public static boolean getUserNonTelco(Context context) { | 
| 166 | return getPreferences(context).getBoolean(PREFERENCES_KEY_USER_NON_TELCO, false); | 178 | return getPreferences(context).getBoolean(PREFERENCES_KEY_USER_NON_TELCO, false); | 
| 167 | } | 179 | } | ... | ... | 
| ... | @@ -1112,12 +1112,14 @@ public class WarplyManagerHelper { | ... | @@ -1112,12 +1112,14 @@ public class WarplyManagerHelper { | 
| 1112 | */ | 1112 | */ | 
| 1113 | public static void saveCustomerState(CustomerStateModel customerState) { | 1113 | public static void saveCustomerState(CustomerStateModel customerState) { | 
| 1114 | mCustomerStateModel = customerState; | 1114 | mCustomerStateModel = customerState; | 
| 1115 | + WarpUtils.setLanguage(Warply.getWarplyContext(), customerState.getLanguage()); | ||
| 1115 | 1116 | ||
| 1116 | WarplyIntegrationRequest request = new WarplyIntegrationRequest(); | 1117 | WarplyIntegrationRequest request = new WarplyIntegrationRequest(); | 
| 1117 | request.setIsNoTelco(customerState.isNonTelco()) | 1118 | request.setIsNoTelco(customerState.isNonTelco()) | 
| 1118 | .setHasAcceptedConsent(customerState.isAcceptedConsent()) | 1119 | .setHasAcceptedConsent(customerState.isAcceptedConsent()) | 
| 1119 | .setGuid(customerState.getGuid()) | 1120 | .setGuid(customerState.getGuid()) | 
| 1120 | - .setMsisdnList(customerState.getMsisdnList()); | 1121 | + .setMsisdnList(customerState.getMsisdnList()) | 
| 1122 | + .setLanguage(customerState.getLanguage()); | ||
| 1121 | WarplyManager.consumerIntegration(request, new CallbackReceiver<JSONObject>() { | 1123 | WarplyManager.consumerIntegration(request, new CallbackReceiver<JSONObject>() { | 
| 1122 | @Override | 1124 | @Override | 
| 1123 | public void onSuccess(JSONObject result) { | 1125 | public void onSuccess(JSONObject result) { | ... | ... | 
| ... | @@ -1651,6 +1651,77 @@ public class WarplyManager { | ... | @@ -1651,6 +1651,77 @@ public class WarplyManager { | 
| 1651 | public void onSuccess(JSONObject result) { | 1651 | public void onSuccess(JSONObject result) { | 
| 1652 | int status = result.optInt("status", 2); | 1652 | int status = result.optInt("status", 2); | 
| 1653 | if (status == 1) { | 1653 | if (status == 1) { | 
| 1654 | +// JSONObject profMetadata = new JSONObject(); | ||
| 1655 | +// try { | ||
| 1656 | +// profMetadata.putOpt("language", request.getLanguage()); | ||
| 1657 | +// } catch (JSONException e) { | ||
| 1658 | +// throw new RuntimeException(e); | ||
| 1659 | +// } | ||
| 1660 | +// WarplyEditConsumerRequest editConsumerRequest = new WarplyEditConsumerRequest() | ||
| 1661 | +// .setHasProfileMetadata(true) | ||
| 1662 | +// .setProfileMetadata(profMetadata); | ||
| 1663 | +// editConsumer(editConsumerRequest, new CallbackReceiver<JSONObject>() { | ||
| 1664 | +// @Override | ||
| 1665 | +// public void onSuccess(JSONObject result) { | ||
| 1666 | +// int status = result.optInt("status", 2); | ||
| 1667 | +// if (status == 1) { | ||
| 1668 | +// getConsumer(new WarplyConsumerRequest(), new CallbackReceiver<Consumer>() { | ||
| 1669 | +// @Override | ||
| 1670 | +// public void onSuccess(Consumer result) { | ||
| 1671 | +// WarplyManagerHelper.setConsumerInternal(result); | ||
| 1672 | +// | ||
| 1673 | +//// if (result != null) { | ||
| 1674 | +//// JSONObject profMetadata = WarpJSONParser.getJSONFromString(result.getProfileMetadata()); | ||
| 1675 | +//// if (profMetadata != null && profMetadata.has("nonTelco")) { | ||
| 1676 | +//// WarpUtils.setUserNonTelco(Warply.getWarplyContext(), profMetadata.optBoolean("nonTelco")); | ||
| 1677 | +//// } else { | ||
| 1678 | +//// WarpUtils.setUserNonTelco(Warply.getWarplyContext(), false); | ||
| 1679 | +//// } | ||
| 1680 | +//// } | ||
| 1681 | +//// | ||
| 1682 | +//// if (result != null) { | ||
| 1683 | +//// JSONObject profMetadata = WarpJSONParser.getJSONFromString(result.getProfileMetadata()); | ||
| 1684 | +//// if (profMetadata != null) { | ||
| 1685 | +//// if (profMetadata.has("badge")) { | ||
| 1686 | +//// WarpUtils.setUserTag(Warply.getWarplyContext(), profMetadata.optString("badge")); | ||
| 1687 | +//// } | ||
| 1688 | +//// | ||
| 1689 | +//// if (profMetadata.has("steps_enabled") && profMetadata.optBoolean("steps_enabled")) { | ||
| 1690 | +//// if (!isMyServiceRunning(WarplyHealthService.class)) { | ||
| 1691 | +//// Intent stepsServiceIntent = new Intent(Warply.getWarplyContext(), WarplyHealthService.class); | ||
| 1692 | +//// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { | ||
| 1693 | +//// AlarmManager mgr = (AlarmManager) Warply.getWarplyContext().getSystemService(Context.ALARM_SERVICE); | ||
| 1694 | +//// PendingIntent pi = PendingIntent.getService(Warply.getWarplyContext(), 2002, stepsServiceIntent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_MUTABLE); | ||
| 1695 | +//// mgr.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime() + 1000, pi); | ||
| 1696 | +//// } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { | ||
| 1697 | +//// Warply.getWarplyContext().startForegroundService(stepsServiceIntent); | ||
| 1698 | +//// } else { | ||
| 1699 | +//// Warply.getWarplyContext().startService(stepsServiceIntent); | ||
| 1700 | +//// } | ||
| 1701 | +//// | ||
| 1702 | +//// WarplyPacingEventModel pacingVisible = new WarplyPacingEventModel(); | ||
| 1703 | +//// pacingVisible.setVisible(true); | ||
| 1704 | +//// EventBus.getDefault().post(new WarplyEventBusManager(pacingVisible)); | ||
| 1705 | +//// } | ||
| 1706 | +//// } | ||
| 1707 | +//// } | ||
| 1708 | +//// } | ||
| 1709 | +// } | ||
| 1710 | +// | ||
| 1711 | +// @Override | ||
| 1712 | +// public void onFailure(int errorCode) { | ||
| 1713 | +// | ||
| 1714 | +// } | ||
| 1715 | +// }); | ||
| 1716 | +// } | ||
| 1717 | +// } | ||
| 1718 | +// | ||
| 1719 | +// @Override | ||
| 1720 | +// public void onFailure(int errorCode) { | ||
| 1721 | +// | ||
| 1722 | +// } | ||
| 1723 | +// }); | ||
| 1724 | + | ||
| 1654 | LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | 1725 | LoyaltySDKDynatraceEventModel dynatraceEvent = new LoyaltySDKDynatraceEventModel(); | 
| 1655 | dynatraceEvent.setEventName("custom_success_customer_state_loyalty"); | 1726 | dynatraceEvent.setEventName("custom_success_customer_state_loyalty"); | 
| 1656 | EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | 1727 | EventBus.getDefault().post(new WarplyEventBusManager(dynatraceEvent)); | ... | ... | 
| ... | @@ -115,6 +115,7 @@ | ... | @@ -115,6 +115,7 @@ | 
| 115 | </androidx.cardview.widget.CardView> | 115 | </androidx.cardview.widget.CardView> | 
| 116 | 116 | ||
| 117 | <androidx.cardview.widget.CardView | 117 | <androidx.cardview.widget.CardView | 
| 118 | + android:id="@+id/cv_expired_coupons_inner_title" | ||
| 118 | android:layout_width="match_parent" | 119 | android:layout_width="match_parent" | 
| 119 | android:layout_height="wrap_content" | 120 | android:layout_height="wrap_content" | 
| 120 | android:layout_below="@+id/cv_expired_coupons_title" | 121 | android:layout_below="@+id/cv_expired_coupons_title" | 
| ... | @@ -184,21 +185,21 @@ | ... | @@ -184,21 +185,21 @@ | 
| 184 | android:src="@drawable/ic_down_dark_new" /> | 185 | android:src="@drawable/ic_down_dark_new" /> | 
| 185 | </LinearLayout> | 186 | </LinearLayout> | 
| 186 | </LinearLayout> | 187 | </LinearLayout> | 
| 187 | - | ||
| 188 | - <TextView | ||
| 189 | - android:id="@+id/tv_expired_empty" | ||
| 190 | - fontPath="fonts/PeridotPE-Regular.ttf" | ||
| 191 | - android:layout_width="wrap_content" | ||
| 192 | - android:layout_height="wrap_content" | ||
| 193 | - android:layout_below="@+id/tv_expired_title" | ||
| 194 | - android:layout_centerHorizontal="true" | ||
| 195 | - android:layout_marginTop="56dp" | ||
| 196 | - android:text="@string/cos_empty_expired_coupons" | ||
| 197 | - android:textColor="@color/cos_light_black" | ||
| 198 | - android:textSize="16sp" | ||
| 199 | - android:visibility="gone" /> | ||
| 200 | </RelativeLayout> | 188 | </RelativeLayout> | 
| 201 | </androidx.cardview.widget.CardView> | 189 | </androidx.cardview.widget.CardView> | 
| 190 | + | ||
| 191 | + <TextView | ||
| 192 | + android:id="@+id/tv_expired_empty" | ||
| 193 | + fontPath="fonts/PeridotPE-Regular.ttf" | ||
| 194 | + android:layout_width="wrap_content" | ||
| 195 | + android:layout_height="wrap_content" | ||
| 196 | + android:layout_below="@+id/cv_expired_coupons_title" | ||
| 197 | + android:layout_centerHorizontal="true" | ||
| 198 | + android:layout_marginTop="56dp" | ||
| 199 | + android:text="@string/cos_empty_expired_coupons" | ||
| 200 | + android:textColor="@color/cos_light_black" | ||
| 201 | + android:textSize="16sp" | ||
| 202 | + android:visibility="gone" /> | ||
| 202 | </RelativeLayout> | 203 | </RelativeLayout> | 
| 203 | 204 | ||
| 204 | <androidx.cardview.widget.CardView | 205 | <androidx.cardview.widget.CardView | ... | ... | 
| ... | @@ -115,6 +115,7 @@ | ... | @@ -115,6 +115,7 @@ | 
| 115 | </androidx.cardview.widget.CardView> | 115 | </androidx.cardview.widget.CardView> | 
| 116 | 116 | ||
| 117 | <androidx.cardview.widget.CardView | 117 | <androidx.cardview.widget.CardView | 
| 118 | + android:id="@+id/cv_expired_coupons_inner_title" | ||
| 118 | android:layout_width="match_parent" | 119 | android:layout_width="match_parent" | 
| 119 | android:layout_height="wrap_content" | 120 | android:layout_height="wrap_content" | 
| 120 | android:layout_below="@+id/cv_expired_coupons_title" | 121 | android:layout_below="@+id/cv_expired_coupons_title" | 
| ... | @@ -185,21 +186,21 @@ | ... | @@ -185,21 +186,21 @@ | 
| 185 | android:src="@drawable/ic_down_dark_new" /> | 186 | android:src="@drawable/ic_down_dark_new" /> | 
| 186 | </LinearLayout> | 187 | </LinearLayout> | 
| 187 | </LinearLayout> | 188 | </LinearLayout> | 
| 188 | - | ||
| 189 | - <TextView | ||
| 190 | - android:id="@+id/tv_expired_empty" | ||
| 191 | - fontPath="fonts/PeridotPE-Regular.ttf" | ||
| 192 | - android:layout_width="wrap_content" | ||
| 193 | - android:layout_height="wrap_content" | ||
| 194 | - android:layout_below="@+id/tv_expired_title" | ||
| 195 | - android:layout_centerHorizontal="true" | ||
| 196 | - android:layout_marginTop="56dp" | ||
| 197 | - android:text="@string/cos_empty_expired_coupons" | ||
| 198 | - android:textColor="@color/cos_light_black" | ||
| 199 | - android:textSize="16sp" | ||
| 200 | - android:visibility="gone" /> | ||
| 201 | </RelativeLayout> | 189 | </RelativeLayout> | 
| 202 | </androidx.cardview.widget.CardView> | 190 | </androidx.cardview.widget.CardView> | 
| 191 | + | ||
| 192 | + <TextView | ||
| 193 | + android:id="@+id/tv_expired_empty" | ||
| 194 | + fontPath="fonts/PeridotPE-Regular.ttf" | ||
| 195 | + android:layout_width="wrap_content" | ||
| 196 | + android:layout_height="wrap_content" | ||
| 197 | + android:layout_below="@+id/cv_expired_coupons_title" | ||
| 198 | + android:layout_centerHorizontal="true" | ||
| 199 | + android:layout_marginTop="56dp" | ||
| 200 | + android:text="@string/cos_empty_expired_coupons" | ||
| 201 | + android:textColor="@color/cos_light_black" | ||
| 202 | + android:textSize="16sp" | ||
| 203 | + android:visibility="gone" /> | ||
| 203 | </RelativeLayout> | 204 | </RelativeLayout> | 
| 204 | 205 | ||
| 205 | <androidx.cardview.widget.CardView | 206 | <androidx.cardview.widget.CardView | ... | ... | 
| ... | @@ -510,6 +510,7 @@ | ... | @@ -510,6 +510,7 @@ | 
| 510 | 510 | ||
| 511 | <TextView | 511 | <TextView | 
| 512 | fontPath="fonts/PeridotPE-SemiBold.ttf" | 512 | fontPath="fonts/PeridotPE-SemiBold.ttf" | 
| 513 | + android:id="@+id/tv_vouchers_title" | ||
| 513 | android:layout_width="wrap_content" | 514 | android:layout_width="wrap_content" | 
| 514 | android:layout_height="wrap_content" | 515 | android:layout_height="wrap_content" | 
| 515 | android:layout_marginTop="24dp" | 516 | android:layout_marginTop="24dp" | 
| ... | @@ -583,7 +584,7 @@ | ... | @@ -583,7 +584,7 @@ | 
| 583 | android:layout_marginTop="32dp" | 584 | android:layout_marginTop="32dp" | 
| 584 | android:orientation="vertical" | 585 | android:orientation="vertical" | 
| 585 | android:visibility="gone" | 586 | android:visibility="gone" | 
| 586 | - tools:visibility="visible"> | 587 | + tools:visibility="gone"> | 
| 587 | 588 | ||
| 588 | <View | 589 | <View | 
| 589 | android:id="@+id/v_separator_vouchers_disabled" | 590 | android:id="@+id/v_separator_vouchers_disabled" | 
| ... | @@ -593,6 +594,7 @@ | ... | @@ -593,6 +594,7 @@ | 
| 593 | 594 | ||
| 594 | <TextView | 595 | <TextView | 
| 595 | fontPath="fonts/PeridotPE-SemiBold.ttf" | 596 | fontPath="fonts/PeridotPE-SemiBold.ttf" | 
| 597 | + android:id="@+id/tv_vouchers_title_disabled" | ||
| 596 | android:layout_width="wrap_content" | 598 | android:layout_width="wrap_content" | 
| 597 | android:layout_height="wrap_content" | 599 | android:layout_height="wrap_content" | 
| 598 | android:layout_marginTop="24dp" | 600 | android:layout_marginTop="24dp" | ... | ... | 
| ... | @@ -201,7 +201,9 @@ | ... | @@ -201,7 +201,9 @@ | 
| 201 | <string name="cos_dlg_negative_button4">Όχι</string> | 201 | <string name="cos_dlg_negative_button4">Όχι</string> | 
| 202 | <string name="cos_dlg_positive_button3">Ναι</string> | 202 | <string name="cos_dlg_positive_button3">Ναι</string> | 
| 203 | <string name="cos_vouchers_title">Υπόλοιπο επιδότησης</string> | 203 | <string name="cos_vouchers_title">Υπόλοιπο επιδότησης</string> | 
| 204 | + <string name="cos_vouchers_title_en">Subsidy balance</string> | ||
| 204 | <string name="cos_vouchers_info_title">Δες το διαθέσιμο υπόλοιπο</string> | 205 | <string name="cos_vouchers_info_title">Δες το διαθέσιμο υπόλοιπο</string> | 
| 206 | + <string name="cos_vouchers_info_title_en">Check the available balance</string> | ||
| 205 | <string name="cos_loyalty_history">Ιστορικό</string> | 207 | <string name="cos_loyalty_history">Ιστορικό</string> | 
| 206 | <string name="cos_redeemed_coupons_loyalty_title">Εξαργυρωμένα κουπόνια</string> | 208 | <string name="cos_redeemed_coupons_loyalty_title">Εξαργυρωμένα κουπόνια</string> | 
| 207 | <string name="cos_history_info_text">Δες αναλυτικά το συνολικό όφελός σου έως τώρα από κουπόνια</string> | 209 | <string name="cos_history_info_text">Δες αναλυτικά το συνολικό όφελός σου έως τώρα από κουπόνια</string> | 
| ... | @@ -209,6 +211,7 @@ | ... | @@ -209,6 +211,7 @@ | 
| 209 | <string name="cos_dlg_service_unavailable">Προσωρινά μη διαθέσιμη πληροφορία.\nΠαρακαλούμε δοκίμασε ξανά σε λίγο.</string> | 211 | <string name="cos_dlg_service_unavailable">Προσωρινά μη διαθέσιμη πληροφορία.\nΠαρακαλούμε δοκίμασε ξανά σε λίγο.</string> | 
| 210 | <string name="cos_dlg_return">Επιστροφή</string> | 212 | <string name="cos_dlg_return">Επιστροφή</string> | 
| 211 | <string name="cos_vouchers_info_title_disabled">Διαθέσιμο υπόλοιπο</string> | 213 | <string name="cos_vouchers_info_title_disabled">Διαθέσιμο υπόλοιπο</string> | 
| 214 | + <string name="cos_vouchers_info_title_disabled_en">Available balance</string> | ||
| 212 | 215 | ||
| 213 | <string-array name="coupons_array"> | 216 | <string-array name="coupons_array"> | 
| 214 | <item>Κουπόνια</item> | 217 | <item>Κουπόνια</item> | ... | ... | 
- 
Please register or login to post a comment
