Panagiotis Triantafyllou

new keys

......@@ -3,7 +3,7 @@
# The app uuid the warply sdk need to connect to the engage server
# dev f83dfde1145e4c2da69793abb2f579af
# prod 0086a2088301440792091b9f814c2267
Uuid=0086a2088301440792091b9f814c2267
Uuid=f83dfde1145e4c2da69793abb2f579af
# If we need to see logs in Logcat
Debug=true
......@@ -11,7 +11,7 @@ Debug=true
# Production or Development environment of the engage server
# Production: https://engage.warp.ly
# Development: https://engage-stage.warp.ly
BaseURL=https://engage.warp.ly
BaseURL=https://engage-stage.warp.ly
# For Verify Ticket request
VerifyURL=/partners/cosmote/verify
......
......@@ -36,7 +36,7 @@ public class SplashActivity extends BaseActivity {
public void onWarplyReady() {
if (!WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) {
WarplyManager.getCosmoteUser(new WarplyCosmoteUserRequest()
.setGuid("6006552990"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990
.setGuid("7000000831"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990
mLoginReceiver);
} else {
startNextActivity();
......
......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4-cosbeta88'
PUBLISH_VERSION = '4.5.4-cosbeta89'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -15,13 +15,13 @@ import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import io.github.inflationx.viewpump.ViewPumpContextWrapper;
import ly.warp.sdk.R;
import ly.warp.sdk.io.models.Coupon;
import ly.warp.sdk.io.models.CouponList;
import ly.warp.sdk.utils.WarplyManagerHelper;
import ly.warp.sdk.utils.managers.WarplyAnalyticsManager;
import ly.warp.sdk.views.adapters.ActiveCouponAdapter;
......@@ -51,50 +51,9 @@ public class ActiveCouponsActivity extends Activity implements View.OnClickListe
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_active_coupons);
if (getIntent().getExtras() != null && getIntent().getSerializableExtra("couponlist") != null) {
mCouponList = new CouponList(getIntent().getSerializableExtra("couponlist").toString(), true);
CouponList cpnlist = new CouponList();
for (Coupon cpn : mCouponList) {
if (cpn.getStatus() == 1) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm");
Date newDate = new Date();
try {
newDate = simpleDateFormat.parse(cpn.getExpiration());
} catch (ParseException e) {
e.printStackTrace();
}
cpn.setExpirationDate(newDate);
cpnlist.add(cpn);
}
}
Collections.sort(cpnlist, (coupon1, coupon2) -> coupon1.getExpirationDate().compareTo(coupon2.getExpirationDate()));
mCouponList.clear();
mCouponList.addAll(cpnlist);
}
mIvBack = findViewById(R.id.iv_coupons_close);
mTvEmptyCoupons = findViewById(R.id.tv_no_coupons);
if (mCouponList != null) {
mRecyclerCoupons = findViewById(R.id.rv_active_coupons);
mRecyclerCoupons.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
mAdapterCoupons = new ActiveCouponAdapter(this, mCouponList);
mRecyclerCoupons.setAdapter(mAdapterCoupons);
mAdapterCoupons.getPositionClicks()
.doOnNext(coupon -> {
WarplyAnalyticsManager.logTrackersEvent("click", ("Coupon").concat(":").concat(coupon.getName()));
Intent intent = new Intent(ActiveCouponsActivity.this, CouponInfoActivity.class);
intent.putExtra("coupon", (Serializable) coupon);
startActivity(intent);
})
.doOnError(error -> {
})
.subscribe();
} else {
mTvEmptyCoupons.setVisibility(View.VISIBLE);
}
mRecyclerCoupons = findViewById(R.id.rv_active_coupons);
initViews();
}
......@@ -103,6 +62,7 @@ public class ActiveCouponsActivity extends Activity implements View.OnClickListe
public void onResume() {
super.onResume();
WarplyAnalyticsManager.logTrackersEvent("screen", "ActiveCouponsScreen");
filterItems();
}
@Override
......@@ -125,6 +85,44 @@ public class ActiveCouponsActivity extends Activity implements View.OnClickListe
mIvBack.setOnClickListener(this);
}
private void filterItems() {
CouponList cpnlist = new CouponList();
for (Coupon cpn : WarplyManagerHelper.getCouponList()) {
if (cpn.getStatus() == 1) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm");
Date newDate = new Date();
try {
newDate = simpleDateFormat.parse(cpn.getExpiration());
} catch (ParseException e) {
e.printStackTrace();
}
cpn.setExpirationDate(newDate);
cpnlist.add(cpn);
}
}
Collections.sort(cpnlist, (coupon1, coupon2) -> coupon1.getExpirationDate().compareTo(coupon2.getExpirationDate()));
mCouponList.clear();
mCouponList.addAll(cpnlist);
if (mCouponList != null && mCouponList.size() > 0) {
mRecyclerCoupons.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
mAdapterCoupons = new ActiveCouponAdapter(this, mCouponList);
mRecyclerCoupons.setAdapter(mAdapterCoupons);
mAdapterCoupons.getPositionClicks()
.doOnNext(coupon -> {
WarplyAnalyticsManager.logTrackersEvent("click", ("Coupon").concat(":").concat(coupon.getName()));
Intent intent = new Intent(ActiveCouponsActivity.this, CouponInfoActivity.class);
intent.putExtra("coupon", (Serializable) coupon);
startActivity(intent);
})
.doOnError(error -> {
})
.subscribe();
} else {
mTvEmptyCoupons.setVisibility(View.VISIBLE);
}
}
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
......
......@@ -95,13 +95,8 @@ public class CouponShareActivity extends Activity implements View.OnClickListene
super.onResume();
WarplyAnalyticsManager.logTrackersEvent("screen", "CouponShareScreen");
new Thread(() -> {
if (!Thread.currentThread().isInterrupted()) {
WarplyManager.getConsumer(new WarplyConsumerRequest()
, mConsumerCallback);
}
Thread.currentThread().interrupt();
}).start();
WarplyManager.getConsumer(new WarplyConsumerRequest()
, mConsumerCallback);
}
@Override
......
......@@ -2,6 +2,7 @@ package ly.warp.sdk.activities;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.Html;
import android.text.TextUtils;
......@@ -241,6 +242,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
.setPositiveButton(R.string.cos_dlg_positive_button2, (dialogPositive, whichPositive) -> {
dialogPositive.dismiss();
if (success) {
// setResult(RESULT_OK, new Intent());
onBackPressed();
}
})
......
......@@ -114,44 +114,6 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
mSvLoyaltyWallet = findViewById(R.id.sv_loyalty_wallet);
mClToolbar = findViewById(R.id.cl_loyalty_wallet_header);
// ArrayList<ActiveDFYCouponModel> dlist = new ArrayList<>();
// ActiveDFYCouponModel model = new ActiveDFYCouponModel();
// model.setCode("123456789");
// model.setValue("10");
// model.setDate("2022-09-14 20:20");
// dlist.add(model);
// model = new ActiveDFYCouponModel();
// model.setCode("123456780");
// model.setValue("10");
// model.setDate("2022-09-14 20:20");
// dlist.add(model);
// model = new ActiveDFYCouponModel();
// model.setCode("123456781");
// model.setValue("10");
// model.setDate("2022-09-14 20:20");
// dlist.add(model);
// model = new ActiveDFYCouponModel();
// model.setCode("123456782");
// model.setValue("10");
// model.setDate("2022-09-14 20:20");
// dlist.add(model);
// model = new ActiveDFYCouponModel();
// model.setCode("123456783");
// model.setValue("10");
// model.setDate("2022-09-14 20:20");
// dlist.add(model);
// model = new ActiveDFYCouponModel();
// model.setCode("123456784");
// model.setValue("10");
// model.setDate("2022-09-14 20:20");
// dlist.add(model);
// model = new ActiveDFYCouponModel();
// model.setCode("123456785");
// model.setValue("10");
// model.setDate("2022-09-14 20:20");
// dlist.add(model);
// WarplyManagerHelper.setActiveDFYCoupons(dlist);
if (WarplyManagerHelper.getActiveDFYCoupons() != null) {
Collections.sort(WarplyManagerHelper.getActiveDFYCoupons(), new Comparator<ActiveDFYCouponModel>() {
public int compare(ActiveDFYCouponModel o1, ActiveDFYCouponModel o2) {
......
package ly.warp.sdk.io.request;
import android.text.TextUtils;
import android.util.Base64;
import org.json.JSONArray;
......@@ -171,7 +172,7 @@ public class WarplyGetCouponsetsRequest {
bodyJsonObject.putOpt(KEY_ACTION, KEY_ACTION_VALUE);
bodyJsonObject.putOpt(KEY_ACTIVE, mActive);
bodyJsonObject.putOpt(KEY_VISIBLE, mVisible);
bodyJsonObject.putOpt(KEY_LANGUAGE, mLanguage);
bodyJsonObject.putOpt(KEY_LANGUAGE, TextUtils.isEmpty(mLanguage) ? "el" : mLanguage);
if (mUuids != null && mUuids.size() > 0)
bodyJsonObject.putOpt(KEY_UUIDS, new JSONArray(mUuids));
} catch (JSONException e) {
......
......@@ -74,7 +74,7 @@ public class WarplyJsonArrayRequest extends JsonRequest<JSONObject> {
headers.put(WarpConstants.HEADER_LOYALTY_BUNDLE_ID, "android:" + context.getPackageName());
headers.put(WarpConstants.HEADER_DATE, timeStamp);
headers.put(WarpConstants.HEADER_UNIQUE_DEVICE_ID, new WarplyDeviceInfoCollector(context).getUniqueDeviceId());
headers.put(WarpConstants.HEADER_ADVERTISING_ID, new WarplyDeviceInfoCollector(context).getAdvertisementId());
// headers.put(WarpConstants.HEADER_ADVERTISING_ID, new WarplyDeviceInfoCollector(context).getAdvertisementId());
headers.put(WarpConstants.HEADER_CHANNEL, "mobile");
if (WarpUtils.isRegisteredWarply(context)) {
String apiKey = WarpUtils.getApiKey(context);
......
......@@ -58,7 +58,7 @@ public class WarplyJsonObjectRequest extends JsonObjectRequest {
headers.put(WarpConstants.HEADER_LOYALTY_BUNDLE_ID, "android:" + context.getPackageName());
headers.put(WarpConstants.HEADER_DATE, timeStamp);
headers.put(WarpConstants.HEADER_UNIQUE_DEVICE_ID, new WarplyDeviceInfoCollector(context).getUniqueDeviceId());
headers.put(WarpConstants.HEADER_ADVERTISING_ID, new WarplyDeviceInfoCollector(context).getAdvertisementId());
// headers.put(WarpConstants.HEADER_ADVERTISING_ID, new WarplyDeviceInfoCollector(context).getAdvertisementId());
headers.put(WarpConstants.HEADER_CHANNEL, "mobile");
if (WarpUtils.isRegisteredWarply(context)) {
String apiKey = WarpUtils.getApiKey(context);
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="428dp"
android:height="106dp"
android:viewportWidth="428"
android:viewportHeight="106">
<group>
<clip-path
android:pathData="M0,0h428v106h-428z"/>
<path
android:pathData="M0,98v-98h428v77.99L39,77.99a48.15,48.15 0,0 0,-39 20.01Z"
android:fillColor="#fff"/>
</group>
</vector>
......@@ -5,20 +5,22 @@
android:id="@+id/cl_bill_payment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:background="@color/cos_grey5"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_bill_header"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@android:color/white">
android:layout_height="64dp"
android:translationZ="10dp"
android:background="@drawable/ic_background_transparent_shadow">
<ImageView
android:id="@+id/iv_list_close"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="16dp"
android:layout_marginBottom="16dp"
android:scaleType="centerInside"
android:src="@drawable/ic_back"
app:layout_constraintBottom_toBottomOf="parent"
......@@ -32,6 +34,7 @@
android:gravity="center"
android:textColor="@color/grey"
android:textSize="17sp"
android:layout_marginBottom="16dp"
fontPath="fonts/pf_square_sans_pro_bold.ttf"
android:text="@string/cos_gifts_title"
app:layout_constraintBottom_toBottomOf="parent"
......@@ -43,7 +46,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/shape_cos_loyalty_no_border"
android:layout_marginTop="-18dp"
android:orientation="vertical">
<LinearLayout
......@@ -97,7 +100,6 @@
android:id="@+id/rv_merged_gifts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:clipToPadding="false"
android:orientation="vertical"
android:overScrollMode="never"
......
......@@ -4,21 +4,23 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:background="@color/cos_grey5"
android:fillViewport="true"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_more_header"
android:layout_width="match_parent"
android:layout_height="48dp"
app:layout_constraintTop_toTopOf="parent">
android:layout_height="64dp"
android:translationZ="10dp"
android:background="@drawable/ic_background_transparent_shadow">
<ImageView
android:id="@+id/iv_list_close"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="16dp"
android:layout_marginBottom="16dp"
android:scaleType="centerInside"
android:src="@drawable/ic_back"
app:layout_constraintBottom_toBottomOf="parent"
......@@ -30,6 +32,7 @@
fontPath="fonts/pf_square_sans_pro_bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:gravity="center"
android:text="@string/cos_more_title"
android:textColor="@color/grey"
......@@ -43,7 +46,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/shape_cos_loyalty_no_border"
android:layout_marginTop="-18dp"
android:orientation="vertical">
<ScrollView
......