Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_android_sdk_maven_plugin
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Panagiotis Triantafyllou
2022-11-04 13:50:43 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b41ff4b0cd543331984c8b04c311a132ca5d6e2b
b41ff4b0
1 parent
a79041fa
new keys
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
78 additions
and
57 deletions
warply_android_sdk/build.gradle
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ContextualActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponShareActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponsetInfoActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyWallet.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ShopsActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/TelcoActivity.java
warply_android_sdk/src/main/res/layout/activity_couponset_info.xml
warply_android_sdk/src/main/res/values-xhdpi/dimens.xml
warply_android_sdk/src/main/res/values-xxhdpi/dimens.xml
warply_android_sdk/src/main/res/values-xxxhdpi/dimens.xml
warply_android_sdk/build.gradle
View file @
b41ff4b
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.4.6rc
4
'
PUBLISH_VERSION
=
'4.5.4.6rc
5
'
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 -----------------------------//
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ContextualActivity.java
View file @
b41ff4b
...
...
@@ -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
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponShareActivity.java
View file @
b41ff4b
...
...
@@ -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
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponsetInfoActivity.java
View file @
b41ff4b
...
...
@@ -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
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyWallet.java
View file @
b41ff4b
...
...
@@ -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
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ShopsActivity.java
View file @
b41ff4b
...
...
@@ -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"
);
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/TelcoActivity.java
View file @
b41ff4b
...
...
@@ -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
...
...
warply_android_sdk/src/main/res/layout/activity_couponset_info.xml
View file @
b41ff4b
...
...
@@ -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=
"32d
p"
android:layout_marginTop=
"@dimen/marginTo
p"
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=
"visibl
e"
/>
tools:visibility=
"gon
e"
/>
</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>
...
...
warply_android_sdk/src/main/res/values-xhdpi/dimens.xml
View file @
b41ff4b
<resources>
<dimen
name=
"width_full"
>
360dp
</dimen>
<dimen
name=
"height_carousel"
>
240dp
</dimen>
<dimen
name=
"marginTop"
>
52dp
</dimen>
</resources>
...
...
warply_android_sdk/src/main/res/values-xxhdpi/dimens.xml
View file @
b41ff4b
<resources>
<dimen
name=
"width_full"
>
320dp
</dimen>
<dimen
name=
"height_carousel"
>
220dp
</dimen>
<dimen
name=
"marginTop"
>
140dp
</dimen>
</resources>
...
...
warply_android_sdk/src/main/res/values-xxxhdpi/dimens.xml
0 → 100644
View file @
b41ff4b
<resources>
<dimen
name=
"width_full"
>
320dp
</dimen>
<dimen
name=
"height_carousel"
>
220dp
</dimen>
<dimen
name=
"marginTop"
>
240dp
</dimen>
</resources>
Please
register
or
login
to post a comment