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-06-29 15:36:38 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fef8d3b5779a5f1516331a16b95b123fe10096e4
fef8d3b5
1 parent
74a2a81e
fixes
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
91 additions
and
7 deletions
warply_android_sdk/build.gradle
warply_android_sdk/src/main/java/ly/warp/sdk/activities/GiftsForYouActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/LoyaltyContextualOfferModel.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
warply_android_sdk/build.gradle
View file @
fef8d3b
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.4-cosbeta
19
'
PUBLISH_VERSION
=
'4.5.4-cosbeta
20
'
PUBLISH_ARTIFACT_ID
=
'warply-android-sdk'
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/GiftsForYouActivity.java
View file @
fef8d3b
...
...
@@ -110,13 +110,17 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
try
{
String
key
=
WarpJSONParser
.
getJSONFromString
(
dataItem
.
getCampaign
().
getExtraFields
()).
keys
().
next
();
if
(!
TextUtils
.
isEmpty
(
key
)
&&
key
.
equals
(
"loyaltyCampaignId"
))
{
String
value
=
WarpJSONParser
.
getJSONFromString
(
dataItem
.
getCampaign
().
getExtraFields
()).
optString
(
"loyaltyCampaignId"
);
for
(
LoyaltyContextualOfferModel
ccms
:
WarplyManagerHelper
.
getCCMSLoyaltyCampaigns
())
{
if
(
ccms
.
getLoyaltyCampaignId
().
equals
(
value
))
{
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCcmsUrl
(
dataItem
.
getCampaign
(),
ccms
)));
return
;
if
(!
TextUtils
.
isEmpty
(
key
)
&&
key
.
equals
(
"ccms_offer"
))
{
String
value
=
WarpJSONParser
.
getJSONFromString
(
dataItem
.
getCampaign
().
getExtraFields
()).
optString
(
key
);
if
(!
TextUtils
.
isEmpty
(
value
)
&&
value
.
equals
(
"true"
))
{
for
(
LoyaltyContextualOfferModel
ccms
:
WarplyManagerHelper
.
getCCMSLoyaltyCampaigns
())
{
if
(
ccms
.
getLoyaltyCampaignId
().
equals
(
dataItem
.
getCampaign
().
getSessionUUID
()))
{
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCcmsUrl
(
dataItem
.
getCampaign
(),
ccms
)));
return
;
}
}
}
else
{
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
())));
}
}
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
())));
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/LoyaltyContextualOfferModel.java
View file @
fef8d3b
...
...
@@ -26,6 +26,14 @@ public class LoyaltyContextualOfferModel {
private
String
postpayProduct
;
private
String
notificationMessage
;
private
String
loyaltyCampaignId
;
private
String
businessService
;
private
String
UACIOfferTrackingCode
;
private
String
offerCode1
;
private
String
score
;
private
String
zone
;
private
String
wave
;
private
String
validity
;
private
String
offerAudienceLevel
;
public
LoyaltyContextualOfferModel
()
{
...
...
@@ -48,6 +56,14 @@ public class LoyaltyContextualOfferModel {
this
.
postpayProduct
=
""
;
this
.
notificationMessage
=
""
;
this
.
loyaltyCampaignId
=
""
;
this
.
businessService
=
""
;
this
.
UACIOfferTrackingCode
=
""
;
this
.
offerCode1
=
""
;
this
.
score
=
""
;
this
.
zone
=
""
;
this
.
wave
=
""
;
this
.
validity
=
""
;
this
.
offerAudienceLevel
=
""
;
}
public
String
getSessionId
()
{
...
...
@@ -201,4 +217,68 @@ public class LoyaltyContextualOfferModel {
public
void
setLoyaltyCampaignId
(
String
loyaltyCampaignId
)
{
this
.
loyaltyCampaignId
=
loyaltyCampaignId
;
}
public
String
getBusinessService
()
{
return
businessService
;
}
public
void
setBusinessService
(
String
businessService
)
{
this
.
businessService
=
businessService
;
}
public
String
getUACIOfferTrackingCode
()
{
return
UACIOfferTrackingCode
;
}
public
void
setUACIOfferTrackingCode
(
String
UACIOfferTrackingCode
)
{
this
.
UACIOfferTrackingCode
=
UACIOfferTrackingCode
;
}
public
String
getOfferCode1
()
{
return
offerCode1
;
}
public
void
setOfferCode1
(
String
offerCode1
)
{
this
.
offerCode1
=
offerCode1
;
}
public
String
getScore
()
{
return
score
;
}
public
void
setScore
(
String
score
)
{
this
.
score
=
score
;
}
public
String
getZone
()
{
return
zone
;
}
public
void
setZone
(
String
zone
)
{
this
.
zone
=
zone
;
}
public
String
getWave
()
{
return
wave
;
}
public
void
setWave
(
String
wave
)
{
this
.
wave
=
wave
;
}
public
String
getValidity
()
{
return
validity
;
}
public
void
setValidity
(
String
validity
)
{
this
.
validity
=
validity
;
}
public
String
getOfferAudienceLevel
()
{
return
offerAudienceLevel
;
}
public
void
setOfferAudienceLevel
(
String
offerAudienceLevel
)
{
this
.
offerAudienceLevel
=
offerAudienceLevel
;
}
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
View file @
fef8d3b
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment