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-07-05 18:26:48 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1202881038089d8fabc05163603f01df90e45b89
12028810
1 parent
14a87e99
possible fixes
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
31 additions
and
8 deletions
app/src/main/assets/warply.properties
warply_android_sdk/build.gradle
warply_android_sdk/src/main/java/ly/warp/sdk/Warply.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyWallet.java
warply_android_sdk/src/main/java/ly/warp/sdk/db/WarplyDBHelper.java
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/PacingDetails.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
warply_android_sdk/src/main/res/layout/activity_loyalty_wallet.xml
app/src/main/assets/warply.properties
View file @
1202881
...
...
@@ -45,7 +45,7 @@ MerchantId=20113
# The login type must be one of the below:
# email, msisdn, username
LoginType
=
msisdn
LoginType
=
username
# The deeplink url scheme for react native campaigns:
# Example visit.greece.gr
...
...
warply_android_sdk/build.gradle
View file @
1202881
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.4-cosbeta2
5
'
PUBLISH_VERSION
=
'4.5.4-cosbeta2
6
'
PUBLISH_ARTIFACT_ID
=
'warply-android-sdk'
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/Warply.java
View file @
1202881
...
...
@@ -471,13 +471,13 @@ public enum Warply {
INSTANCE
.
getInboxInternal
(
new
CallbackReceiver
<
CampaignList
>()
{
@Override
public
void
onSuccess
(
CampaignList
result
)
{
WarplyManagerHelper
.
setUniqueCampaignList
(
result
);
if
(
result
.
size
()
>=
0
)
{
objectSerializer
.
serialize
(
result
,
File
.
separator
+
requestSignature
);
warplyPreferences
.
saveInboxLastCachedTimeStamp
(
requestSignature
,
System
.
currentTimeMillis
());
INSTANCE
.
mLastReceivedCampaigns
=
result
;
if
(
receiver
!=
null
)
{
WarplyManagerHelper
.
setUniqueCampaignList
(
result
);
receiver
.
onSuccess
(
result
);
}
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyWallet.java
View file @
1202881
...
...
@@ -31,6 +31,8 @@ import ly.warp.sdk.io.models.ActiveDFYCouponEventModel;
import
ly.warp.sdk.io.models.ActiveDFYCouponModel
;
import
ly.warp.sdk.io.models.Coupon
;
import
ly.warp.sdk.io.models.CouponList
;
import
ly.warp.sdk.io.models.Couponset
;
import
ly.warp.sdk.io.models.CouponsetsList
;
import
ly.warp.sdk.io.models.WarplyDealsAnalysisEventModel
;
import
ly.warp.sdk.utils.WarplyManagerHelper
;
import
ly.warp.sdk.utils.managers.WarplyEventBusManager
;
...
...
@@ -68,7 +70,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener {
setContentView
(
R
.
layout
.
activity_loyalty_wallet
);
mIvBack
=
findViewById
(
R
.
id
.
iv_back
);
mTvUsername
=
findViewById
(
R
.
id
.
tv_name
);
mTvUsername
=
findViewById
(
R
.
id
.
tv_
profile_
name
);
mLlQuestionnaire
=
findViewById
(
R
.
id
.
ll_user_questionnaire
);
mLlUserBadge
=
findViewById
(
R
.
id
.
ll_user_badge
);
mTvUserBadge
=
findViewById
(
R
.
id
.
tv_type
);
...
...
@@ -162,7 +164,23 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener {
// ===========================================================
private
void
initViews
()
{
if
(
WarplyManagerHelper
.
getCouponList
()
!=
null
)
{
CouponList
mCouponList
=
new
CouponList
();
CouponList
mCouponListInitial
=
new
CouponList
();
mCouponListInitial
.
addAll
(
WarplyManagerHelper
.
getCouponList
());
CouponsetsList
mCouponsetListInitial
=
new
CouponsetsList
();
mCouponsetListInitial
.
addAll
(
WarplyManagerHelper
.
getCouponsets
());
for
(
Coupon
coupon
:
mCouponListInitial
)
{
for
(
Couponset
couponset
:
mCouponsetListInitial
)
{
if
(
coupon
.
getCouponsetUuid
().
equals
(
couponset
.
getUuid
()))
{
coupon
.
setDescription
(
couponset
.
getShortDescription
());
coupon
.
setImage
(
couponset
.
getImgPreview
());
coupon
.
setName
(
couponset
.
getName
());
mCouponList
.
add
(
coupon
);
}
}
}
if
(
mCouponList
!=
null
)
{
mAdapterCoupons
=
new
ActiveCouponAdapter
(
this
,
WarplyManagerHelper
.
getCouponList
());
mRecyclerCoupons
.
setAdapter
(
mAdapterCoupons
);
mAdapterCoupons
.
getPositionClicks
()
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/db/WarplyDBHelper.java
View file @
1202881
...
...
@@ -244,7 +244,7 @@ public class WarplyDBHelper extends SQLiteOpenHelper {
public
synchronized
String
getAuthValue
(
String
columnName
)
{
String
columnValue
=
""
;
Cursor
cursor
=
getDb
().
query
(
TABLE_AUTH
,
new
String
[]{
columnName
},
null
,
null
,
null
,
null
,
null
);
if
(
cursor
!=
null
)
{
if
(
cursor
!=
null
&&
cursor
.
moveToFirst
()
)
{
cursor
.
moveToFirst
();
columnValue
=
cursor
.
getString
(
cursor
.
getColumnIndex
(
columnName
));
cursor
.
close
();
...
...
@@ -256,7 +256,7 @@ public class WarplyDBHelper extends SQLiteOpenHelper {
public
synchronized
String
getClientValue
(
String
columnName
)
{
String
columnValue
=
""
;
Cursor
cursor
=
getDb
().
query
(
TABLE_CLIENT
,
new
String
[]{
columnName
},
null
,
null
,
null
,
null
,
null
);
if
(
cursor
!=
null
)
{
if
(
cursor
!=
null
&&
cursor
.
moveToFirst
()
)
{
cursor
.
moveToFirst
();
columnValue
=
cursor
.
getString
(
cursor
.
getColumnIndex
(
columnName
));
cursor
.
close
();
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/PacingDetails.java
View file @
1202881
...
...
@@ -46,10 +46,12 @@ public class PacingDetails {
private
static
final
String
STEPS
=
"steps"
;
private
static
final
String
METERS
=
"meters"
;
private
static
final
String
RESULT
=
"result"
;
private
static
final
String
ENABLED
=
"enabled"
;
/* Member variables of the Campaign object */
private
PacingInner
steps
=
new
PacingInner
();
private
PacingInner
meters
=
new
PacingInner
();
private
boolean
enabled
=
false
;
/**
* Basic constructor used to create an object from a String, representing a
...
...
@@ -78,6 +80,7 @@ public class PacingDetails {
if
(
result
.
optJSONObject
(
METERS
)
!=
null
)
{
this
.
meters
=
new
PacingInner
(
result
.
optJSONObject
(
METERS
));
}
this
.
enabled
=
result
.
optBoolean
(
ENABLED
);
}
}
}
...
...
@@ -92,6 +95,7 @@ public class PacingDetails {
try
{
jObj
.
putOpt
(
STEPS
,
this
.
steps
);
jObj
.
putOpt
(
METERS
,
this
.
meters
);
jObj
.
putOpt
(
ENABLED
,
this
.
enabled
);
}
catch
(
JSONException
e
)
{
if
(
WarpConstants
.
DEBUG
)
{
e
.
printStackTrace
();
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
View file @
1202881
...
...
@@ -402,6 +402,7 @@ public class WarplyManagerHelper {
* Set the List with CCMS Campaigns
*/
public
static
void
setCCMSLoyaltyCampaigns
(
ArrayList
<
LoyaltyContextualOfferModel
>
list
)
{
mCCMSList
.
clear
();
mCCMSList
=
list
;
if
(
list
==
null
||
list
.
size
()
==
0
)
{
...
...
warply_android_sdk/src/main/res/layout/activity_loyalty_wallet.xml
View file @
1202881
...
...
@@ -104,7 +104,7 @@
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_name"
android:id=
"@+id/tv_
profile_
name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginVertical=
"6dp"
...
...
Please
register
or
login
to post a comment