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-09-06 17:25:50 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
579ef8b5ebf454bb5e89600f811817c62475732d
579ef8b5
1 parent
dd9919df
carousel list
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
2 deletions
app/src/main/java/warp/ly/android_sdk/activities/SplashActivity.java
warply_android_sdk/build.gradle
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyManager.java
app/src/main/java/warp/ly/android_sdk/activities/SplashActivity.java
View file @
579ef8b
...
...
@@ -36,7 +36,7 @@ public class SplashActivity extends BaseActivity {
public
void
onWarplyReady
()
{
if
(!
WarplyDBHelper
.
getInstance
(
SplashActivity
.
this
).
isTableNotEmpty
(
"auth"
))
{
WarplyManager
.
getCosmoteUser
(
new
WarplyCosmoteUserRequest
()
.
setGuid
(
"
6012049139
"
),
//6012049321, 6012049322, 6012049323
.
setGuid
(
"
7000001025
"
),
//6012049321, 6012049322, 6012049323
mLoginReceiver
);
}
else
{
startNextActivity
();
...
...
warply_android_sdk/build.gradle
View file @
579ef8b
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.4-cosbeta5
7
'
PUBLISH_VERSION
=
'4.5.4-cosbeta5
8
'
PUBLISH_ARTIFACT_ID
=
'warply-android-sdk'
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
View file @
579ef8b
...
...
@@ -94,6 +94,7 @@ public class WarplyManagerHelper {
private
static
CustomerStateModel
mCustomerStateModel
=
new
CustomerStateModel
();
private
static
CampaignList
mCampaignList
=
new
CampaignList
();
private
static
CampaignList
mCampaignListAll
=
new
CampaignList
();
private
static
CampaignList
mCarouselList
=
new
CampaignList
();
private
static
ArrayList
<
ActiveDFYCouponModel
>
mDfyCoupons
=
new
ArrayList
();
private
static
ArrayList
<
LoyaltyGiftsForYouPackage
>
mSeasonalList
=
new
ArrayList
<>();
private
static
ArrayList
<
LoyaltyContextualOfferModel
>
mCCMSList
=
new
ArrayList
<>();
...
...
@@ -957,6 +958,15 @@ public class WarplyManagerHelper {
}
}
public
static
void
setCarouselList
(
CampaignList
carouselList
)
{
mCarouselList
.
clear
();
mCarouselList
.
addAll
(
carouselList
);
}
public
static
CampaignList
getCarouselList
()
{
return
mCarouselList
;
}
public
static
CampaignList
getCampaignList
()
{
return
mCampaignList
;
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyManager.java
View file @
579ef8b
...
...
@@ -1399,7 +1399,16 @@ public class WarplyManager {
Collections
.
sort
(
mNewCampaignList
,
(
obj1
,
obj2
)
->
Integer
.
compare
(
obj1
.
getSorting
(),
obj2
.
getSorting
()));
CampaignList
campaignLoyaltyList
=
new
CampaignList
();
campaignLoyaltyList
.
clear
();
CampaignList
campaignCarouselList
=
new
CampaignList
();
campaignCarouselList
.
clear
();
for
(
Campaign
camp
:
mNewCampaignList
)
{
JSONObject
campMetadata
=
WarpJSONParser
.
getJSONFromString
(
camp
.
getExtraFields
());
if
(
campMetadata
!=
null
)
{
if
(
campMetadata
.
has
(
"carousel"
))
{
campaignCarouselList
.
add
(
camp
);
}
}
if
(
camp
.
getOfferCategory
().
equals
(
"questionnaire"
))
{
if
(
WarplyManagerHelper
.
getConsumerInternal
()
!=
null
)
{
JSONObject
profMetadata
=
WarpJSONParser
.
getJSONFromString
(
WarplyManagerHelper
.
getConsumerInternal
().
getProfileMetadata
());
...
...
@@ -1454,6 +1463,7 @@ public class WarplyManager {
}
}
WarplyManagerHelper
.
setCampaignList
(
mNewCampaignList
);
WarplyManagerHelper
.
setCarouselList
(
campaignCarouselList
);
// ArrayList<LoyaltyContextualOfferModel> list = new ArrayList<>();
// JSONArray jArray = null;
...
...
Please
register
or
login
to post a comment