Panagiotis Triantafyllou

new keys

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4.6rc4'
PUBLISH_VERSION = '4.5.4.6rc5'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......@@ -45,7 +45,8 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.cardview:cardview:1.0.0'
api "androidx.security:security-crypto:1.1.0-alpha03" // For minSDK 23 use 1.0.0, for minSDK 21 use 1.1.0 that is currently in alpha
api "androidx.security:security-crypto:1.1.0-alpha03"
// For minSDK 23 use 1.0.0, for minSDK 21 use 1.1.0 that is currently in alpha
api 'org.altbeacon:android-beacon-library:2.19.3'
api 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
implementation 'de.hdodenhof:circleimageview:3.1.0'
......@@ -59,12 +60,14 @@ dependencies {
//------------------------------ Firebase -----------------------------//
api platform('com.google.firebase:firebase-bom:29.0.3')
implementation 'com.google.firebase:firebase-messaging'
implementation('com.google.firebase:firebase-messaging') {
exclude group: 'com.google.android.gms', module: 'play-services-location'
}
//------------------------------ GMS -----------------------------//
api 'com.google.android.gms:play-services-base:18.1.0'
implementation 'com.google.android.gms:play-services-location:21.0.0'
implementation 'com.google.android.gms:play-services-maps:18.1.0'
implementation 'com.google.android.gms:play-services-location:19.0.1'
implementation 'com.google.android.gms:play-services-maps:18.0.2'
api 'com.google.maps.android:android-maps-utils:0.5'
//------------------------------ Work Manager -----------------------------//
......
......@@ -225,6 +225,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener
}
private void askActivateDialog() {
if (!isFinishing()) {
mAlertDialogAskActivate = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_activate_telco_title)
.setMessage(R.string.cos_dlg_activate_telco_subtitle)
......@@ -236,6 +237,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener
})
.show();
}
}
private void errorActivatingDialog() {
LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
......@@ -264,6 +266,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener
analyticsEvent.setParameter("successful", "true");
EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
if (!isFinishing()) {
mAlertDialogSuccessActivating = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_activate_success_title)
.setMessage(R.string.cos_dlg_activate_success_subtitle)
......@@ -272,6 +275,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener
})
.show();
}
}
// ===========================================================
// Inner and Anonymous Classes
......
......@@ -216,6 +216,7 @@ public class CouponShareActivity extends Activity implements View.OnClickListene
}
private void acceptSharingDialog() {
if (!isFinishing()) {
mAlertDialogSuccessSharing = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_success_title)
.setMessage(R.string.cos_dlg_positive_coupon_text)
......@@ -228,8 +229,10 @@ public class CouponShareActivity extends Activity implements View.OnClickListene
})
.show();
}
}
private void errorSharingDialog() {
if (!isFinishing()) {
mAlertDialogErrorSharing = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_error_title)
.setMessage(R.string.cos_dlg_error_subtitle)
......@@ -238,8 +241,10 @@ public class CouponShareActivity extends Activity implements View.OnClickListene
})
.show();
}
}
private void wrongNumberDialog(String message) {
if (!isFinishing()) {
mAlertDialogWrongNumberSharing = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_error_title)
.setMessage(message)
......@@ -248,8 +253,10 @@ public class CouponShareActivity extends Activity implements View.OnClickListene
})
.show();
}
}
private void errorSharingDialog2() {
if (!isFinishing()) {
mAlertDialogErrorSharing = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_error_title2)
.setMessage(R.string.cos_dlg_error_subtitle2)
......@@ -258,8 +265,10 @@ public class CouponShareActivity extends Activity implements View.OnClickListene
})
.show();
}
}
private void showNoAssetsDialog() {
if (!isFinishing()) {
mAlertDialogNoAssets = new AlertDialog.Builder(this)
.setTitle(R.string.cos_coupon_gift)
.setMessage(R.string.cos_share_no_assets)
......@@ -269,8 +278,10 @@ public class CouponShareActivity extends Activity implements View.OnClickListene
})
.show();
}
}
private void askSharingDialog() {
if (!isFinishing()) {
mAlertDialogCouponAskSharing = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_positive_coupon_title)
.setMessage(R.string.cos_dlg_positive_coupon_subtitle)
......@@ -295,6 +306,7 @@ public class CouponShareActivity extends Activity implements View.OnClickListene
})
.show();
}
}
private final CallbackReceiver<Consumer> mConsumerCallback = new CallbackReceiver<Consumer>() {
@Override
......
......@@ -236,6 +236,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
analyticsEvent.setParameter("successful", "true");
EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
if (!isFinishing()) {
mAlertDialogCouponset = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_success_couponset_title)
.setMessage(R.string.cos_dlg_success_couponset_subtitle)
......@@ -247,6 +248,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
}
})
.show();
}
} else {
LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
analyticsEvent.setEventName("loyalty_offer_activated");
......@@ -256,6 +258,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
if (status == 3) {
if (!isFinishing()) {
mAlertDialogCouponset = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_error_title)
.setMessage(R.string.cos_dlg_error_subtitle_non_buyable)
......@@ -263,7 +266,9 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
dialogPositive.dismiss();
})
.show();
}
} else if (status == 5) {
if (!isFinishing()) {
mAlertDialogCouponset = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_error_title)
.setMessage(R.string.cos_dlg_error_subtitle_no_points)
......@@ -271,7 +276,9 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
dialogPositive.dismiss();
})
.show();
}
} else if (status == 6) {
if (!isFinishing()) {
mAlertDialogCouponset = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_coupon_depleted_title)
.setMessage(R.string.cos_dlg_coupon_depleted_message)
......@@ -279,7 +286,9 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
dialogPositive.dismiss();
})
.show();
}
} else {
if (!isFinishing()) {
mAlertDialogCouponset = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_error_title)
.setMessage(R.string.cos_dlg_error_subtitle)
......@@ -290,8 +299,10 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
}
}
}
}
private void nonTelcoDialog() {
if (!isFinishing()) {
mAlertDialogNonTelco = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_non_telco_title)
.setMessage(R.string.cos_dlg_non_telco)
......@@ -302,6 +313,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
.setCancelable(false)
.show();
}
}
// ===========================================================
// Inner and Anonymous Classes
......
......@@ -514,6 +514,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
}
private void nonTelcoDialog() {
if (!isFinishing()) {
mAlertDialogNonTelco = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_non_telco_title)
.setMessage(R.string.cos_dlg_non_telco)
......@@ -524,6 +525,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
.setCancelable(false)
.show();
}
}
// ===========================================================
// Inner and Anonymous Classes
......
......@@ -265,6 +265,7 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe
// ===========================================================
private void showNoShopsAvailableDialog() {
if (!isFinishing()) {
mAlertDialogNoShopsAvailable = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_no_shops_title)
.setMessage(R.string.cos_dlg_no_shops)
......@@ -280,6 +281,7 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe
})
.show();
}
}
private void openWebsite() {
WarplyAnalyticsManager.logTrackersEvent(this, "click", "SeeShopWebsite");
......
......@@ -259,6 +259,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener {
}
private void askActivateDialog() {
if (!isFinishing()) {
mAlertDialogAskActivate = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_activate_telco_title)
.setMessage(R.string.cos_dlg_activate_telco_subtitle)
......@@ -270,6 +271,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener {
})
.show();
}
}
private void errorActivatingDialog() {
LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
......@@ -279,6 +281,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener {
analyticsEvent.setParameter("successful", "false");
EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
if (!isFinishing()) {
mAlertDialogErrorActivating = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_error_title)
.setMessage(R.string.cos_dlg_error_subtitle)
......@@ -287,6 +290,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener {
})
.show();
}
}
private void successActivatingDialog() {
LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
......@@ -296,6 +300,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener {
analyticsEvent.setParameter("successful", "true");
EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
if (!isFinishing()) {
mAlertDialogSuccessActivating = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_activate_success_title)
.setMessage(R.string.cos_dlg_activate_success_subtitle)
......@@ -304,6 +309,7 @@ public class TelcoActivity extends Activity implements View.OnClickListener {
})
.show();
}
}
// ===========================================================
// Inner and Anonymous Classes
......
......@@ -16,8 +16,8 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="16dp"
android:src="@drawable/ic_back"
android:scaleType="centerInside"
android:src="@drawable/ic_back"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......@@ -39,21 +39,17 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/cl_loyalty_wallet_header"
android:background="@android:color/white"
android:fillViewport="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white">
<!-- android:background="@drawable/shape_cos_loyalty_white"-->
<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
android:id="@+id/cl_loyalty_info_view_inner"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
android:layout_height="wrap_content"
android:background="@android:color/white"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingBottom="48dp">
<ImageView
android:id="@+id/imageView6"
......@@ -61,20 +57,8 @@
android:layout_height="253dp"
android:layout_marginTop="0.5dp"
android:scaleType="centerCrop"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@drawable/carousel_banner" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ic_line"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/imageView6">
</LinearLayout>
<TextView
android:id="@+id/textView13"
fontPath="fonts/pf_square_sans_pro_medium.ttf"
......@@ -85,10 +69,6 @@
android:paddingHorizontal="32dp"
android:textColor="#415564"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.509"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView6"
tools:text="Πάρε δωρεάν μηνιαία πακέτα με πάνες στα supermarket Σκλαβενίτης!" />
<TextView
......@@ -101,9 +81,6 @@
android:paddingHorizontal="32dp"
android:textColor="#415564"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView13"
tools:text="Χρησιμοποίησε τον παρακάτω κωδικό και πάρε δωρεάν πακέτο πάνες Pampers αποκλειστικά στα Supermarket Σκλαβενίτης" />
<LinearLayout
......@@ -111,13 +88,10 @@
android:layout_width="240dp"
android:layout_height="50dp"
android:layout_marginHorizontal="32dp"
android:layout_marginBottom="32dp"
android:layout_marginTop="@dimen/marginTop"
android:background="@drawable/selector_button_green"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/rl_terms"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
android:orientation="horizontal">
<TextView
fontPath="fonts/pf_square_sans_pro_medium.ttf"
......@@ -133,11 +107,8 @@
android:id="@+id/rl_terms"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginVertical="32dp"
android:gravity="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
android:layout_marginTop="32dp"
android:gravity="center">
<LinearLayout
android:id="@+id/ll_terms_inner"
......@@ -161,7 +132,6 @@
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_marginStart="6dp"
android:layout_marginTop="2dp"
android:src="@drawable/ic_down_dark_new" />
</LinearLayout>
......@@ -171,28 +141,32 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_terms_inner"
android:layout_marginTop="16dp"
android:layout_marginHorizontal="64dp"
android:layout_marginTop="16dp"
android:textColor="@color/grey"
android:visibility="gone"
tools:text="@string/cos_coupon_date"
tools:visibility="visible" />
tools:visibility="gone" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="48dp"
android:background="@drawable/ic_line">
</LinearLayout>
<ProgressBar
android:id="@+id/pb_loading"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_centerInParent="true"
android:indeterminate="true"
android:indeterminateTint="@color/cos_green5"
android:indeterminateTintMode="src_atop"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
......
<resources>
<dimen name="width_full">360dp</dimen>
<dimen name="height_carousel">240dp</dimen>
<dimen name="marginTop">52dp</dimen>
</resources>
......
<resources>
<dimen name="width_full">320dp</dimen>
<dimen name="height_carousel">220dp</dimen>
<dimen name="marginTop">140dp</dimen>
</resources>
......
<resources>
<dimen name="width_full">320dp</dimen>
<dimen name="height_carousel">220dp</dimen>
<dimen name="marginTop">240dp</dimen>
</resources>