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
2023-07-20 17:51:29 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d20eea339bbdc1e943db24905ac59195debdf638
d20eea33
1 parent
a458c6ba
multiple click fix
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
39 deletions
warply_android_sdk/build.gradle
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponsetInfoActivity.java
warply_android_sdk/build.gradle
View file @
d20eea3
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.4.6rc6
6
'
PUBLISH_VERSION
=
'4.5.4.6rc6
7
'
PUBLISH_ARTIFACT_ID
=
'warply-android-sdk'
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponsetInfoActivity.java
View file @
d20eea3
...
...
@@ -61,7 +61,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
private
LinearLayout
mLlRedeem
,
mLlTerms
;
private
ProgressBar
mPbLoading
;
private
Coupon
mCoupon
;
private
boolean
mIsTermsPressed
=
false
;
private
boolean
mIsTermsPressed
=
false
,
mIsGiftPressed
=
false
;
private
AlertDialog
mAlertDialogCouponset
;
private
Campaign
mLoyalty
;
private
LoyaltyContextualOfferModel
mCcms
=
null
;
...
...
@@ -98,6 +98,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
public
void
onResume
()
{
super
.
onResume
();
WarplyAnalyticsManager
.
logTrackersEvent
(
this
,
"screen"
,
"CouponsetScreen"
);
mIsGiftPressed
=
false
;
}
@Override
...
...
@@ -107,44 +108,47 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
return
;
}
if
(
view
.
getId
()
==
R
.
id
.
ll_get_gift
)
{
mLlRedeem
.
setEnabled
(
false
);
mPbLoading
.
setVisibility
(
View
.
VISIBLE
);
WarplyAnalyticsManager
.
logTrackersEvent
(
this
,
"click"
,
(
"RetrieveCoupon"
)
.
concat
(
":"
)
.
concat
(
mCouponset
.
getUuid
()));
if
(
mCcms
==
null
)
{
WarplyManager
.
redeemCoupon
(
new
WarplyRedeemCouponRequest
()
.
setCouponsetUuid
(
mCouponset
.
getUuid
())
.
setCommunicationUuid
(
mLoyalty
.
getSessionUUID
()),
mRedeemCouponCallback
);
}
else
{
WarplyManager
.
redeemCoupon
(
new
WarplyRedeemCouponRequest
()
.
setCouponsetUuid
(
mCouponset
.
getUuid
())
.
setCommunicationUuid
(
mLoyalty
.
getSessionUUID
())
.
setHasContextualOffer
(
true
)
.
setSessionId
(
mCcms
.
getSessionId
())
.
setUserMsisdn
(
WarplyManagerHelper
.
getConsumer
().
getMsisdn
())
//TODO: where to find the msisdn??
.
setBusinessService
(
mCcms
.
getBusinessService
())
.
setOfferName
(
mCcms
.
getOfferName
())
.
setProductType
(
mCcms
.
getProductType
())
.
setProvDuration
(
mCcms
.
getProvDuration
())
.
setNoOfRecurrance
(
mCcms
.
getNoOfRecurrance
())
.
setPrice
(
mCcms
.
getPrice
())
.
setDiscount
(
mCcms
.
getDiscount
())
.
setVoiceCategory
(
mCcms
.
getVoiceCategory
())
.
setDataCategory
(
mCcms
.
getDataCategory
())
.
setMinsValue
(
mCcms
.
getMinsValue
())
.
setDataValue
(
mCcms
.
getDataValue
())
.
setProvStepValueMins
(
mCcms
.
getProvStepValueMins
())
.
setOfferAudienceLevel
(
mCcms
.
getOfferAudienceLevel
())
.
setUACIOfferTrackingCode
(
mCcms
.
getUACIOfferTrackingCode
())
.
setOfferCode1
(
mCcms
.
getOfferCode1
())
.
setScore
(
mCcms
.
getScore
())
.
setZone
(
mCcms
.
getZone
())
.
setWave
(
mCcms
.
getWave
())
.
setValidity
(
mCcms
.
getValidity
())
.
setTreatmentCode
(
mCcms
.
getTreatmentCode
()),
mRedeemCouponCallback
);
if
(!
mIsGiftPressed
)
{
mIsGiftPressed
=
true
;
mLlRedeem
.
setEnabled
(
false
);
mPbLoading
.
setVisibility
(
View
.
VISIBLE
);
WarplyAnalyticsManager
.
logTrackersEvent
(
this
,
"click"
,
(
"RetrieveCoupon"
)
.
concat
(
":"
)
.
concat
(
mCouponset
.
getUuid
()));
if
(
mCcms
==
null
)
{
WarplyManager
.
redeemCoupon
(
new
WarplyRedeemCouponRequest
()
.
setCouponsetUuid
(
mCouponset
.
getUuid
())
.
setCommunicationUuid
(
mLoyalty
.
getSessionUUID
()),
mRedeemCouponCallback
);
}
else
{
WarplyManager
.
redeemCoupon
(
new
WarplyRedeemCouponRequest
()
.
setCouponsetUuid
(
mCouponset
.
getUuid
())
.
setCommunicationUuid
(
mLoyalty
.
getSessionUUID
())
.
setHasContextualOffer
(
true
)
.
setSessionId
(
mCcms
.
getSessionId
())
.
setUserMsisdn
(
WarplyManagerHelper
.
getConsumer
().
getMsisdn
())
//TODO: where to find the msisdn??
.
setBusinessService
(
mCcms
.
getBusinessService
())
.
setOfferName
(
mCcms
.
getOfferName
())
.
setProductType
(
mCcms
.
getProductType
())
.
setProvDuration
(
mCcms
.
getProvDuration
())
.
setNoOfRecurrance
(
mCcms
.
getNoOfRecurrance
())
.
setPrice
(
mCcms
.
getPrice
())
.
setDiscount
(
mCcms
.
getDiscount
())
.
setVoiceCategory
(
mCcms
.
getVoiceCategory
())
.
setDataCategory
(
mCcms
.
getDataCategory
())
.
setMinsValue
(
mCcms
.
getMinsValue
())
.
setDataValue
(
mCcms
.
getDataValue
())
.
setProvStepValueMins
(
mCcms
.
getProvStepValueMins
())
.
setOfferAudienceLevel
(
mCcms
.
getOfferAudienceLevel
())
.
setUACIOfferTrackingCode
(
mCcms
.
getUACIOfferTrackingCode
())
.
setOfferCode1
(
mCcms
.
getOfferCode1
())
.
setScore
(
mCcms
.
getScore
())
.
setZone
(
mCcms
.
getZone
())
.
setWave
(
mCcms
.
getWave
())
.
setValidity
(
mCcms
.
getValidity
())
.
setTreatmentCode
(
mCcms
.
getTreatmentCode
()),
mRedeemCouponCallback
);
}
return
;
}
return
;
}
if
(
view
.
getId
()
==
R
.
id
.
ll_terms_inner
)
{
if
(
mIsTermsPressed
)
{
...
...
Please
register
or
login
to post a comment