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-14 11:59:57 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
78c8c258784c3ddd483838524c0dcba6341e30b6
78c8c258
1 parent
18021a17
minor fixes and additions
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
749 additions
and
542 deletions
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/BaseFragmentActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/GiftsForYouActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/Campaign.java
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/NewCampaign.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyManager.java
warply_android_sdk/src/main/java/ly/warp/sdk/views/WarpView.java
warply_android_sdk/build.gradle
View file @
78c8c25
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.4-cosbeta3
1i
'
PUBLISH_VERSION
=
'4.5.4-cosbeta3
2
'
PUBLISH_ARTIFACT_ID
=
'warply-android-sdk'
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/Warply.java
View file @
78c8c25
...
...
@@ -479,474 +479,474 @@ public enum Warply {
public
void
onSuccess
(
CampaignList
result
)
{
WarplyManagerHelper
.
setCampaignList
(
result
);
ArrayList
<
LoyaltyContextualOfferModel
>
list
=
new
ArrayList
<>();
JSONArray
jArray
=
null
;
try
{
jArray
=
new
JSONArray
(
"[\n"
+
" {\n"
+
" \"UACIOfferTrackingCode\": \"5166.e07.fffffffffa10663a.ffffffffda30c76a\",\n"
+
" \"businessAdditionalId\": \"\",\n"
+
" \"dataCategory\": \"Data\",\n"
+
" \"dataValue\": \"None\",\n"
+
" \"discount\": \"None\",\n"
+
" \"eligibleAssets\": [\n"
+
" \"306945218770\",\n"
+
" \"306944333488\",\n"
+
" \"306932222490\",\n"
+
" \"306996824010\",\n"
+
" \"306972713201\",\n"
+
" \"306942496252\",\n"
+
" \"306977316716\",\n"
+
" \"306945433100\",\n"
+
" \"306977403986\",\n"
+
" \"306936581495\",\n"
+
" \"306980689662\",\n"
+
" \"306970101490\",\n"
+
" \"306973396329\",\n"
+
" \"306972577064\",\n"
+
" \"306974923219\",\n"
+
" \"306977513761\",\n"
+
" \"306984220987\",\n"
+
" \"306979949205\",\n"
+
" \"306943134127\",\n"
+
" \"306970437794\",\n"
+
" \"306932535319\",\n"
+
" \"306974063133\",\n"
+
" \"306932520323\",\n"
+
" \"306978733823\",\n"
+
" \"306985995420\",\n"
+
" \"306983879555\",\n"
+
" ],\n"
+
" \"id\": \"000003590\",\n"
+
" \"loyaltyCampaignId\": \"NA\",\n"
+
" \"minsValue\": \"None\",\n"
+
" \"noOfRecurrance\": \"None\",\n"
+
" \"notificationMessage\": \"None\",\n"
+
" \"offerAudienceLevel\": \"msisdn\",\n"
+
" \"offerCode1\": \"000003590\",\n"
+
" \"offerName\": \"CCMS loyalty white label\",\n"
+
" \"price\": \"None\",\n"
+
" \"productType\": \"White Label\",\n"
+
" \"provDuration\": \"0.0\",\n"
+
" \"provStepValueMins\": \"None\",\n"
+
" \"score\": \"50\",\n"
+
" \"treatmentCode\": \"5166.e07.fffffffffa10663a.ffffffffda30c76a\",\n"
+
" \"validity\": \"0\",\n"
+
" \"voiceCategory\": \"None\",\n"
+
" \"wave\": \"1\",\n"
+
" \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n"
+
" },\n"
+
" {\n"
+
" \"UACIOfferTrackingCode\": \"51ed.e10.2c006f18.71e96d08\",\n"
+
" \"businessAdditionalId\": \"\",\n"
+
" \"dataCategory\": \"Data\",\n"
+
" \"dataValue\": \"None\",\n"
+
" \"discount\": \"None\",\n"
+
" \"eligibleAssets\": [\n"
+
" \"306945218770\",\n"
+
" \"306944333488\",\n"
+
" \"306932222490\",\n"
+
" \"306996824010\",\n"
+
" \"306972713201\",\n"
+
" \"306942496252\",\n"
+
" \"306977316716\",\n"
+
" \"306945433100\",\n"
+
" \"306977403986\",\n"
+
" \"306936581495\",\n"
+
" \"306980689662\",\n"
+
" \"306970101490\",\n"
+
" \"306973396329\",\n"
+
" \"306972577064\",\n"
+
" \"306974923219\",\n"
+
" \"306977513761\",\n"
+
" \"306984220987\",\n"
+
" \"306979949205\",\n"
+
" \"306943134127\",\n"
+
" \"306970437794\",\n"
+
" \"306932535319\",\n"
+
" \"306974063133\",\n"
+
" \"306932520323\",\n"
+
" \"306978733823\",\n"
+
" \"306985995420\",\n"
+
" \"306983879555\",\n"
+
" ],\n"
+
" \"id\": \"000003599\",\n"
+
" \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n"
+
" \"minsValue\": \"None\",\n"
+
" \"noOfRecurrance\": \"None\",\n"
+
" \"notificationMessage\": \"None\",\n"
+
" \"offerAudienceLevel\": \"msisdn\",\n"
+
" \"offerCode1\": \"000003599\",\n"
+
" \"offerName\": \"CCMS loyalty white label with campaignId\",\n"
+
" \"price\": \"None\",\n"
+
" \"productType\": \"White Label\",\n"
+
" \"provDuration\": \"0.0\",\n"
+
" \"provStepValueMins\": \"None\",\n"
+
" \"score\": \"50\",\n"
+
" \"treatmentCode\": \"51ed.e10.2c006f18.71e96d08\",\n"
+
" \"validity\": \"0\",\n"
+
" \"voiceCategory\": \"None\",\n"
+
" \"wave\": \"1\",\n"
+
" \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n"
+
" },\n"
+
" {\n"
+
" \"UACIOfferTrackingCode\": \"516c.e05.ffffffffa943695b.79ff470b\",\n"
+
" \"businessAdditionalId\": \"\",\n"
+
" \"businessService\": \"0.0\",\n"
+
" \"eligibleAssets\": [\n"
+
" \"306945218770\",\n"
+
" \"306944333488\",\n"
+
" \"306932222490\",\n"
+
" \"306996824010\",\n"
+
" \"306972713201\",\n"
+
" \"306942496252\",\n"
+
" \"306977316716\",\n"
+
" \"306945433100\",\n"
+
" \"306977403986\",\n"
+
" \"306936581495\",\n"
+
" \"306980689662\",\n"
+
" \"306970101490\",\n"
+
" \"306973396329\",\n"
+
" \"306972577064\",\n"
+
" \"306974923219\",\n"
+
" \"306977513761\",\n"
+
" \"306984220987\",\n"
+
" \"306979949205\",\n"
+
" \"306943134127\",\n"
+
" \"306970437794\",\n"
+
" \"306932535319\",\n"
+
" \"306974063133\",\n"
+
" \"306932520323\",\n"
+
" \"306978733823\",\n"
+
" \"306985995420\",\n"
+
" \"306983879555\",\n"
+
" ],\n"
+
" \"id\": \"000003588\",\n"
+
" \"loyaltyCampaignId\": \"NA\",\n"
+
" \"noOfRecurrance\": \"0\",\n"
+
" \"notificationMessage\": \"None\",\n"
+
" \"offerAudienceLevel\": \"msisdn\",\n"
+
" \"offerCode1\": \"000003588\",\n"
+
" \"offerName\": \"CCMS loyalty postpay addon\",\n"
+
" \"postpayProduct\": \"0.0\",\n"
+
" \"price\": \"None\",\n"
+
" \"productType\": \"MOBILE ADDON\",\n"
+
" \"provDuration\": \"0.0\",\n"
+
" \"score\": \"50\",\n"
+
" \"treatmentCode\": \"516c.e05.ffffffffa943695b.79ff470b\",\n"
+
" \"validity\": \"0\",\n"
+
" \"wave\": \"1\",\n"
+
" \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n"
+
" },\n"
+
" {\n"
+
" \"UACIOfferTrackingCode\": \"5224.e19.30e2f27b.ffffffffeb22b0db\",\n"
+
" \"businessAdditionalId\": \"\",\n"
+
" \"dataCategory\": \"Data\",\n"
+
" \"dataValue\": \"None\",\n"
+
" \"discount\": \"None\",\n"
+
" \"eligibleAssets\": [\n"
+
" \"306945218770\",\n"
+
" \"306944333488\",\n"
+
" \"306932222490\",\n"
+
" \"306996824010\",\n"
+
" \"306972713201\",\n"
+
" \"306942496252\",\n"
+
" \"306977316716\",\n"
+
" \"306945433100\",\n"
+
" \"306977403986\",\n"
+
" \"306936581495\",\n"
+
" \"306980689662\",\n"
+
" \"306970101490\",\n"
+
" \"306973396329\",\n"
+
" \"306972577064\",\n"
+
" \"306974923219\",\n"
+
" \"306977513761\",\n"
+
" \"306984220987\",\n"
+
" \"306979949205\",\n"
+
" \"306943134127\",\n"
+
" \"306970437794\",\n"
+
" \"306932535319\",\n"
+
" \"306974063133\",\n"
+
" \"306932520323\",\n"
+
" \"306978733823\",\n"
+
" \"306985995420\",\n"
+
" \"306983879555\",\n"
+
" ],\n"
+
" \"id\": \"000003608\",\n"
+
" \"loyaltyCampaignId\": \"c134cdeb8a924f8eac38e261acb9caf5\",\n"
+
" \"minsValue\": \"None\",\n"
+
" \"noOfRecurrance\": \"None\",\n"
+
" \"notificationMessage\": \"None\",\n"
+
" \"offerAudienceLevel\": \"msisdn\",\n"
+
" \"offerCode1\": \"000003608\",\n"
+
" \"offerName\": \"CCMS loyalty gifts4u v1\",\n"
+
" \"price\": \"None\",\n"
+
" \"productType\": \"White Label\",\n"
+
" \"provDuration\": \"0.0\",\n"
+
" \"provStepValueMins\": \"None\",\n"
+
" \"score\": \"50\",\n"
+
" \"treatmentCode\": \"5224.e19.30e2f27b.ffffffffeb22b0db\",\n"
+
" \"validity\": \"0\",\n"
+
" \"voiceCategory\": \"None\",\n"
+
" \"wave\": \"1\",\n"
+
" \"zone\": \"COSMOTE_APP_GIFTS4U\"\n"
+
" },\n"
+
" {\n"
+
" \"UACIOfferTrackingCode\": \"5228.e1d.38378e61.750186c1\",\n"
+
" \"businessAdditionalId\": \"\",\n"
+
" \"businessService\": \"0.0\",\n"
+
" \"eligibleAssets\": [\n"
+
" \"306945218770\",\n"
+
" \"306944333488\",\n"
+
" \"306932222490\",\n"
+
" \"306996824010\",\n"
+
" \"306972713201\",\n"
+
" \"306942496252\",\n"
+
" \"306977316716\",\n"
+
" \"306945433100\",\n"
+
" \"306977403986\",\n"
+
" \"306936581495\",\n"
+
" \"306980689662\",\n"
+
" \"306970101490\",\n"
+
" \"306973396329\",\n"
+
" \"306972577064\",\n"
+
" \"306974923219\",\n"
+
" \"306977513761\",\n"
+
" \"306984220987\",\n"
+
" \"306979949205\",\n"
+
" \"306943134127\",\n"
+
" \"306970437794\",\n"
+
" \"306932535319\",\n"
+
" \"306974063133\",\n"
+
" \"306932520323\",\n"
+
" \"306978733823\",\n"
+
" \"306985995420\",\n"
+
" \"306983879555\",\n"
+
" ],\n"
+
" \"id\": \"000003612\",\n"
+
" \"loyaltyCampaignId\": \"8eb71c4ceaff409c896e2d1f6f1c20f3\",\n"
+
" \"noOfRecurrance\": \"0\",\n"
+
" \"notificationMessage\": \"None\",\n"
+
" \"offerAudienceLevel\": \"msisdn\",\n"
+
" \"offerCode1\": \"000003612\",\n"
+
" \"offerName\": \"CCMS loyalty - postpay addon gifts4u\",\n"
+
" \"postpayProduct\": \"0.0\",\n"
+
" \"price\": \"None\",\n"
+
" \"productType\": \"MOBILE ADDON\",\n"
+
" \"provDuration\": \"0.0\",\n"
+
" \"score\": \"50\",\n"
+
" \"treatmentCode\": \"5228.e1d.38378e61.750186c1\",\n"
+
" \"validity\": \"0\",\n"
+
" \"wave\": \"1\",\n"
+
" \"zone\": \"COSMOTE_APP_GIFTS4U\"\n"
+
" },\n"
+
" {\n"
+
" \"UACIOfferTrackingCode\": \"5222.e1b.ffffffffe725d1b3.ffffffffed6d8723\",\n"
+
" \"businessAdditionalId\": \"\",\n"
+
" \"dataCategory\": \"Data\",\n"
+
" \"dataValue\": \"None\",\n"
+
" \"discount\": \"None\",\n"
+
" \"eligibleAssets\": [\n"
+
" \"306945218770\",\n"
+
" \"306944333488\",\n"
+
" \"306932222490\",\n"
+
" \"306996824010\",\n"
+
" \"306972713201\",\n"
+
" \"306942496252\",\n"
+
" \"306977316716\",\n"
+
" \"306945433100\",\n"
+
" \"306977403986\",\n"
+
" \"306936581495\",\n"
+
" \"306980689662\",\n"
+
" \"306970101490\",\n"
+
" \"306973396329\",\n"
+
" \"306972577064\",\n"
+
" \"306974923219\",\n"
+
" \"306977513761\",\n"
+
" \"306984220987\",\n"
+
" \"306979949205\",\n"
+
" \"306943134127\",\n"
+
" \"306970437794\",\n"
+
" \"306932535319\",\n"
+
" \"306974063133\",\n"
+
" \"306932520323\",\n"
+
" \"306978733823\",\n"
+
" \"306985995420\",\n"
+
" \"306983879555\",\n"
+
" ],\n"
+
" \"id\": \"000003610\",\n"
+
" \"loyaltyCampaignId\": \"8e2c88ec94c948d8b51577324ed9a4d5\",\n"
+
" \"minsValue\": \"None\",\n"
+
" \"noOfRecurrance\": \"None\",\n"
+
" \"notificationMessage\": \"None\",\n"
+
" \"offerAudienceLevel\": \"msisdn\",\n"
+
" \"offerCode1\": \"000003610\",\n"
+
" \"offerName\": \"CCMS loyalty more4u v1\",\n"
+
" \"price\": \"20\",\n"
+
" \"productType\": \"White Label\",\n"
+
" \"provDuration\": \"7.0\",\n"
+
" \"provStepValueMins\": \"None\",\n"
+
" \"score\": \"60\",\n"
+
" \"treatmentCode\": \"5222.e1b.ffffffffe725d1b3.ffffffffed6d8723\",\n"
+
" \"validity\": \"0\",\n"
+
" \"voiceCategory\": \"None\",\n"
+
" \"wave\": \"1\",\n"
+
" \"zone\": \"COSMOTE_APP_MORE4U\"\n"
+
" },\n"
+
" {\n"
+
" \"UACIOfferTrackingCode\": \"5226.e1f.728b68c6.ffffffffa6c7b10e\",\n"
+
" \"businessAdditionalId\": \"\",\n"
+
" \"businessService\": \"0.0\",\n"
+
" \"eligibleAssets\": [\n"
+
" \"306945218770\",\n"
+
" \"306944333488\",\n"
+
" \"306932222490\",\n"
+
" \"306996824010\",\n"
+
" \"306972713201\",\n"
+
" \"306942496252\",\n"
+
" \"306977316716\",\n"
+
" \"306945433100\",\n"
+
" \"306977403986\",\n"
+
" \"306936581495\",\n"
+
" \"306980689662\",\n"
+
" \"306970101490\",\n"
+
" \"306973396329\",\n"
+
" \"306972577064\",\n"
+
" \"306974923219\",\n"
+
" \"306977513761\",\n"
+
" \"306984220987\",\n"
+
" \"306979949205\",\n"
+
" \"306943134127\",\n"
+
" \"306970437794\",\n"
+
" \"306932535319\",\n"
+
" \"306974063133\",\n"
+
" \"306932520323\",\n"
+
" \"306978733823\",\n"
+
" \"306985995420\",\n"
+
" \"306983879555\",\n"
+
" ],\n"
+
" \"id\": \"000003614\",\n"
+
" \"loyaltyCampaignId\": \"aaf4022194584f02bb84c7b283c7c51e\",\n"
+
" \"noOfRecurrance\": \"0\",\n"
+
" \"notificationMessage\": \"None\",\n"
+
" \"offerAudienceLevel\": \"msisdn\",\n"
+
" \"offerCode1\": \"000003614\",\n"
+
" \"offerName\": \"CCMS loyalty - postpay addon more4u\",\n"
+
" \"postpayProduct\": \"0.0\",\n"
+
" \"price\": \"None\",\n"
+
" \"productType\": \"MOBILE ADDON\",\n"
+
" \"provDuration\": \"0.0\",\n"
+
" \"score\": \"50\",\n"
+
" \"treatmentCode\": \"5226.e1f.728b68c6.ffffffffa6c7b10e\",\n"
+
" \"validity\": \"0\",\n"
+
" \"wave\": \"1\",\n"
+
" \"zone\": \"COSMOTE_APP_MORE4U\"\n"
+
" },\n"
+
" {\n"
+
" \"UACIOfferTrackingCode\": \"5154.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n"
+
" \"businessAdditionalId\": \"\",\n"
+
" \"eligibleAssets\": [],\n"
+
" \"id\": \"000003586\",\n"
+
" \"loyaltyCampaignId\": \"NA\",\n"
+
" \"offerAudienceLevel\": \"guid\",\n"
+
" \"offerCode1\": \"000003586\",\n"
+
" \"offerName\": \"CCMS loyalty offer 6\",\n"
+
" \"productType\": \"GENERIC\",\n"
+
" \"score\": \"50\",\n"
+
" \"treatmentCode\": \"5154.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n"
+
" \"validity\": \"0\",\n"
+
" \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n"
+
" },\n"
+
" {\n"
+
" \"UACIOfferTrackingCode\": \"51d2.e0c.291f49d9.40d5a689\",\n"
+
" \"businessAdditionalId\": \"\",\n"
+
" \"eligibleAssets\": [],\n"
+
" \"id\": \"000003595\",\n"
+
" \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n"
+
" \"offerAudienceLevel\": \"guid\",\n"
+
" \"offerCode1\": \"000003595\",\n"
+
" \"offerName\": \"CCMS Loyal offer campaignId\",\n"
+
" \"productType\": \"GENERIC\",\n"
+
" \"score\": \"50\",\n"
+
" \"treatmentCode\": \"51d2.e0c.291f49d9.40d5a689\",\n"
+
" \"validity\": \"0\",\n"
+
" \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n"
+
" },\n"
+
" {\n"
+
" \"UACIOfferTrackingCode\": \"51d6.e0c.291f49d9.40d5a689\",\n"
+
" \"businessAdditionalId\": \"\",\n"
+
" \"eligibleAssets\": [],\n"
+
" \"id\": \"000003595\",\n"
+
" \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n"
+
" \"offerAudienceLevel\": \"guid\",\n"
+
" \"offerCode1\": \"000003595\",\n"
+
" \"offerName\": \"CCMS Loyal offer campaignId\",\n"
+
" \"productType\": \"GENERIC\",\n"
+
" \"score\": \"50\",\n"
+
" \"treatmentCode\": \"51d6.e0c.291f49d9.40d5a689\",\n"
+
" \"validity\": \"0\",\n"
+
" \"zone\": \"COSMOTE_APP_GIFTS4U\"\n"
+
" },\n"
+
" {\n"
+
" \"UACIOfferTrackingCode\": \"5150.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n"
+
" \"businessAdditionalId\": \"\",\n"
+
" \"eligibleAssets\": [],\n"
+
" \"id\": \"000003586\",\n"
+
" \"loyaltyCampaignId\": \"NA\",\n"
+
" \"offerAudienceLevel\": \"guid\",\n"
+
" \"offerCode1\": \"000003586\",\n"
+
" \"offerName\": \"CCMS loyalty offer 6\",\n"
+
" \"productType\": \"GENERIC\",\n"
+
" \"score\": \"50\",\n"
+
" \"treatmentCode\": \"5150.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n"
+
" \"validity\": \"0\",\n"
+
" \"zone\": \"COSMOTE_APP_GIFTS4U\"\n"
+
" },\n"
+
" {\n"
+
" \"UACIOfferTrackingCode\": \"5152.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n"
+
" \"businessAdditionalId\": \"\",\n"
+
" \"eligibleAssets\": [],\n"
+
" \"id\": \"000003586\",\n"
+
" \"loyaltyCampaignId\": \"NA\",\n"
+
" \"offerAudienceLevel\": \"guid\",\n"
+
" \"offerCode1\": \"000003586\",\n"
+
" \"offerName\": \"CCMS loyalty offer 6\",\n"
+
" \"productType\": \"GENERIC\",\n"
+
" \"score\": \"50\",\n"
+
" \"treatmentCode\": \"5152.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n"
+
" \"validity\": \"0\",\n"
+
" \"zone\": \"COSMOTE_APP_MORE4U\"\n"
+
" },\n"
+
" {\n"
+
" \"UACIOfferTrackingCode\": \"51d4.e0c.291f49d9.40d5a689\",\n"
+
" \"businessAdditionalId\": \"\",\n"
+
" \"eligibleAssets\": [],\n"
+
" \"id\": \"000003595\",\n"
+
" \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n"
+
" \"offerAudienceLevel\": \"guid\",\n"
+
" \"offerCode1\": \"000003595\",\n"
+
" \"offerName\": \"CCMS Loyal offer campaignId\",\n"
+
" \"productType\": \"GENERIC\",\n"
+
" \"score\": \"50\",\n"
+
" \"treatmentCode\": \"51d4.e0c.291f49d9.40d5a689\",\n"
+
" \"validity\": \"0\",\n"
+
" \"zone\": \"COSMOTE_APP_MORE4U\"\n"
+
" }\n"
+
" ]"
);
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
}
if
(
jArray
!=
null
&&
jArray
.
length
()
>
0
)
{
for
(
int
i
=
0
;
i
<
jArray
.
length
();
i
++)
{
JSONObject
jobj
=
new
JSONObject
();
jobj
=
jArray
.
optJSONObject
(
i
);
if
(
jobj
!=
null
)
{
LoyaltyContextualOfferModel
model
=
new
LoyaltyContextualOfferModel
(
jobj
);
list
.
add
(
model
);
}
}
}
WarplyManagerHelper
.
setCCMSLoyaltyCampaigns
(
list
);
//
ArrayList<LoyaltyContextualOfferModel> list = new ArrayList<>();
//
JSONArray jArray = null;
//
try {
//
jArray = new JSONArray("[\n" +
//
" {\n" +
//
" \"UACIOfferTrackingCode\": \"5166.e07.fffffffffa10663a.ffffffffda30c76a\",\n" +
//
" \"businessAdditionalId\": \"\",\n" +
//
" \"dataCategory\": \"Data\",\n" +
//
" \"dataValue\": \"None\",\n" +
//
" \"discount\": \"None\",\n" +
//
" \"eligibleAssets\": [\n" +
//
" \"306945218770\",\n" +
//
" \"306944333488\",\n" +
//
" \"306932222490\",\n" +
//
" \"306996824010\",\n" +
//
" \"306972713201\",\n" +
//
" \"306942496252\",\n" +
//
" \"306977316716\",\n" +
//
" \"306945433100\",\n" +
//
" \"306977403986\",\n" +
//
" \"306936581495\",\n" +
//
" \"306980689662\",\n" +
//
" \"306970101490\",\n" +
//
" \"306973396329\",\n" +
//
" \"306972577064\",\n" +
//
" \"306974923219\",\n" +
//
" \"306977513761\",\n" +
//
" \"306984220987\",\n" +
//
" \"306979949205\",\n" +
//
" \"306943134127\",\n" +
//
" \"306970437794\",\n" +
//
" \"306932535319\",\n" +
//
" \"306974063133\",\n" +
//
" \"306932520323\",\n" +
//
" \"306978733823\",\n" +
//
" \"306985995420\",\n" +
//
" \"306983879555\",\n" +
//
" ],\n" +
//
" \"id\": \"000003590\",\n" +
//
" \"loyaltyCampaignId\": \"NA\",\n" +
//
" \"minsValue\": \"None\",\n" +
//
" \"noOfRecurrance\": \"None\",\n" +
//
" \"notificationMessage\": \"None\",\n" +
//
" \"offerAudienceLevel\": \"msisdn\",\n" +
//
" \"offerCode1\": \"000003590\",\n" +
//
" \"offerName\": \"CCMS loyalty white label\",\n" +
//
" \"price\": \"None\",\n" +
//
" \"productType\": \"White Label\",\n" +
//
" \"provDuration\": \"0.0\",\n" +
//
" \"provStepValueMins\": \"None\",\n" +
//
" \"score\": \"50\",\n" +
//
" \"treatmentCode\": \"5166.e07.fffffffffa10663a.ffffffffda30c76a\",\n" +
//
" \"validity\": \"0\",\n" +
//
" \"voiceCategory\": \"None\",\n" +
//
" \"wave\": \"1\",\n" +
//
" \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
//
" },\n" +
//
" {\n" +
//
" \"UACIOfferTrackingCode\": \"51ed.e10.2c006f18.71e96d08\",\n" +
//
" \"businessAdditionalId\": \"\",\n" +
//
" \"dataCategory\": \"Data\",\n" +
//
" \"dataValue\": \"None\",\n" +
//
" \"discount\": \"None\",\n" +
//
" \"eligibleAssets\": [\n" +
//
" \"306945218770\",\n" +
//
" \"306944333488\",\n" +
//
" \"306932222490\",\n" +
//
" \"306996824010\",\n" +
//
" \"306972713201\",\n" +
//
" \"306942496252\",\n" +
//
" \"306977316716\",\n" +
//
" \"306945433100\",\n" +
//
" \"306977403986\",\n" +
//
" \"306936581495\",\n" +
//
" \"306980689662\",\n" +
//
" \"306970101490\",\n" +
//
" \"306973396329\",\n" +
//
" \"306972577064\",\n" +
//
" \"306974923219\",\n" +
//
" \"306977513761\",\n" +
//
" \"306984220987\",\n" +
//
" \"306979949205\",\n" +
//
" \"306943134127\",\n" +
//
" \"306970437794\",\n" +
//
" \"306932535319\",\n" +
//
" \"306974063133\",\n" +
//
" \"306932520323\",\n" +
//
" \"306978733823\",\n" +
//
" \"306985995420\",\n" +
//
" \"306983879555\",\n" +
//
" ],\n" +
//
" \"id\": \"000003599\",\n" +
//
" \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
//
" \"minsValue\": \"None\",\n" +
//
" \"noOfRecurrance\": \"None\",\n" +
//
" \"notificationMessage\": \"None\",\n" +
//
" \"offerAudienceLevel\": \"msisdn\",\n" +
//
" \"offerCode1\": \"000003599\",\n" +
//
" \"offerName\": \"CCMS loyalty white label with campaignId\",\n" +
//
" \"price\": \"None\",\n" +
//
" \"productType\": \"White Label\",\n" +
//
" \"provDuration\": \"0.0\",\n" +
//
" \"provStepValueMins\": \"None\",\n" +
//
" \"score\": \"50\",\n" +
//
" \"treatmentCode\": \"51ed.e10.2c006f18.71e96d08\",\n" +
//
" \"validity\": \"0\",\n" +
//
" \"voiceCategory\": \"None\",\n" +
//
" \"wave\": \"1\",\n" +
//
" \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
//
" },\n" +
//
" {\n" +
//
" \"UACIOfferTrackingCode\": \"516c.e05.ffffffffa943695b.79ff470b\",\n" +
//
" \"businessAdditionalId\": \"\",\n" +
//
" \"businessService\": \"0.0\",\n" +
//
" \"eligibleAssets\": [\n" +
//
" \"306945218770\",\n" +
//
" \"306944333488\",\n" +
//
" \"306932222490\",\n" +
//
" \"306996824010\",\n" +
//
" \"306972713201\",\n" +
//
" \"306942496252\",\n" +
//
" \"306977316716\",\n" +
//
" \"306945433100\",\n" +
//
" \"306977403986\",\n" +
//
" \"306936581495\",\n" +
//
" \"306980689662\",\n" +
//
" \"306970101490\",\n" +
//
" \"306973396329\",\n" +
//
" \"306972577064\",\n" +
//
" \"306974923219\",\n" +
//
" \"306977513761\",\n" +
//
" \"306984220987\",\n" +
//
" \"306979949205\",\n" +
//
" \"306943134127\",\n" +
//
" \"306970437794\",\n" +
//
" \"306932535319\",\n" +
//
" \"306974063133\",\n" +
//
" \"306932520323\",\n" +
//
" \"306978733823\",\n" +
//
" \"306985995420\",\n" +
//
" \"306983879555\",\n" +
//
" ],\n" +
//
" \"id\": \"000003588\",\n" +
//
" \"loyaltyCampaignId\": \"NA\",\n" +
//
" \"noOfRecurrance\": \"0\",\n" +
//
" \"notificationMessage\": \"None\",\n" +
//
" \"offerAudienceLevel\": \"msisdn\",\n" +
//
" \"offerCode1\": \"000003588\",\n" +
//
" \"offerName\": \"CCMS loyalty postpay addon\",\n" +
//
" \"postpayProduct\": \"0.0\",\n" +
//
" \"price\": \"None\",\n" +
//
" \"productType\": \"MOBILE ADDON\",\n" +
//
" \"provDuration\": \"0.0\",\n" +
//
" \"score\": \"50\",\n" +
//
" \"treatmentCode\": \"516c.e05.ffffffffa943695b.79ff470b\",\n" +
//
" \"validity\": \"0\",\n" +
//
" \"wave\": \"1\",\n" +
//
" \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
//
" },\n" +
//
" {\n" +
//
" \"UACIOfferTrackingCode\": \"5224.e19.30e2f27b.ffffffffeb22b0db\",\n" +
//
" \"businessAdditionalId\": \"\",\n" +
//
" \"dataCategory\": \"Data\",\n" +
//
" \"dataValue\": \"None\",\n" +
//
" \"discount\": \"None\",\n" +
//
" \"eligibleAssets\": [\n" +
//
" \"306945218770\",\n" +
//
" \"306944333488\",\n" +
//
" \"306932222490\",\n" +
//
" \"306996824010\",\n" +
//
" \"306972713201\",\n" +
//
" \"306942496252\",\n" +
//
" \"306977316716\",\n" +
//
" \"306945433100\",\n" +
//
" \"306977403986\",\n" +
//
" \"306936581495\",\n" +
//
" \"306980689662\",\n" +
//
" \"306970101490\",\n" +
//
" \"306973396329\",\n" +
//
" \"306972577064\",\n" +
//
" \"306974923219\",\n" +
//
" \"306977513761\",\n" +
//
" \"306984220987\",\n" +
//
" \"306979949205\",\n" +
//
" \"306943134127\",\n" +
//
" \"306970437794\",\n" +
//
" \"306932535319\",\n" +
//
" \"306974063133\",\n" +
//
" \"306932520323\",\n" +
//
" \"306978733823\",\n" +
//
" \"306985995420\",\n" +
//
" \"306983879555\",\n" +
//
" ],\n" +
//
" \"id\": \"000003608\",\n" +
//
" \"loyaltyCampaignId\": \"c134cdeb8a924f8eac38e261acb9caf5\",\n" +
//
" \"minsValue\": \"None\",\n" +
//
" \"noOfRecurrance\": \"None\",\n" +
//
" \"notificationMessage\": \"None\",\n" +
//
" \"offerAudienceLevel\": \"msisdn\",\n" +
//
" \"offerCode1\": \"000003608\",\n" +
//
" \"offerName\": \"CCMS loyalty gifts4u v1\",\n" +
//
" \"price\": \"None\",\n" +
//
" \"productType\": \"White Label\",\n" +
//
" \"provDuration\": \"0.0\",\n" +
//
" \"provStepValueMins\": \"None\",\n" +
//
" \"score\": \"50\",\n" +
//
" \"treatmentCode\": \"5224.e19.30e2f27b.ffffffffeb22b0db\",\n" +
//
" \"validity\": \"0\",\n" +
//
" \"voiceCategory\": \"None\",\n" +
//
" \"wave\": \"1\",\n" +
//
" \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
//
" },\n" +
//
" {\n" +
//
" \"UACIOfferTrackingCode\": \"5228.e1d.38378e61.750186c1\",\n" +
//
" \"businessAdditionalId\": \"\",\n" +
//
" \"businessService\": \"0.0\",\n" +
//
" \"eligibleAssets\": [\n" +
//
" \"306945218770\",\n" +
//
" \"306944333488\",\n" +
//
" \"306932222490\",\n" +
//
" \"306996824010\",\n" +
//
" \"306972713201\",\n" +
//
" \"306942496252\",\n" +
//
" \"306977316716\",\n" +
//
" \"306945433100\",\n" +
//
" \"306977403986\",\n" +
//
" \"306936581495\",\n" +
//
" \"306980689662\",\n" +
//
" \"306970101490\",\n" +
//
" \"306973396329\",\n" +
//
" \"306972577064\",\n" +
//
" \"306974923219\",\n" +
//
" \"306977513761\",\n" +
//
" \"306984220987\",\n" +
//
" \"306979949205\",\n" +
//
" \"306943134127\",\n" +
//
" \"306970437794\",\n" +
//
" \"306932535319\",\n" +
//
" \"306974063133\",\n" +
//
" \"306932520323\",\n" +
//
" \"306978733823\",\n" +
//
" \"306985995420\",\n" +
//
" \"306983879555\",\n" +
//
" ],\n" +
//
" \"id\": \"000003612\",\n" +
//
" \"loyaltyCampaignId\": \"8eb71c4ceaff409c896e2d1f6f1c20f3\",\n" +
//
" \"noOfRecurrance\": \"0\",\n" +
//
" \"notificationMessage\": \"None\",\n" +
//
" \"offerAudienceLevel\": \"msisdn\",\n" +
//
" \"offerCode1\": \"000003612\",\n" +
//
" \"offerName\": \"CCMS loyalty - postpay addon gifts4u\",\n" +
//
" \"postpayProduct\": \"0.0\",\n" +
//
" \"price\": \"None\",\n" +
//
" \"productType\": \"MOBILE ADDON\",\n" +
//
" \"provDuration\": \"0.0\",\n" +
//
" \"score\": \"50\",\n" +
//
" \"treatmentCode\": \"5228.e1d.38378e61.750186c1\",\n" +
//
" \"validity\": \"0\",\n" +
//
" \"wave\": \"1\",\n" +
//
" \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
//
" },\n" +
//
" {\n" +
//
" \"UACIOfferTrackingCode\": \"5222.e1b.ffffffffe725d1b3.ffffffffed6d8723\",\n" +
//
" \"businessAdditionalId\": \"\",\n" +
//
" \"dataCategory\": \"Data\",\n" +
//
" \"dataValue\": \"None\",\n" +
//
" \"discount\": \"None\",\n" +
//
" \"eligibleAssets\": [\n" +
//
" \"306945218770\",\n" +
//
" \"306944333488\",\n" +
//
" \"306932222490\",\n" +
//
" \"306996824010\",\n" +
//
" \"306972713201\",\n" +
//
" \"306942496252\",\n" +
//
" \"306977316716\",\n" +
//
" \"306945433100\",\n" +
//
" \"306977403986\",\n" +
//
" \"306936581495\",\n" +
//
" \"306980689662\",\n" +
//
" \"306970101490\",\n" +
//
" \"306973396329\",\n" +
//
" \"306972577064\",\n" +
//
" \"306974923219\",\n" +
//
" \"306977513761\",\n" +
//
" \"306984220987\",\n" +
//
" \"306979949205\",\n" +
//
" \"306943134127\",\n" +
//
" \"306970437794\",\n" +
//
" \"306932535319\",\n" +
//
" \"306974063133\",\n" +
//
" \"306932520323\",\n" +
//
" \"306978733823\",\n" +
//
" \"306985995420\",\n" +
//
" \"306983879555\",\n" +
//
" ],\n" +
//
" \"id\": \"000003610\",\n" +
//
" \"loyaltyCampaignId\": \"8e2c88ec94c948d8b51577324ed9a4d5\",\n" +
//
" \"minsValue\": \"None\",\n" +
//
" \"noOfRecurrance\": \"None\",\n" +
//
" \"notificationMessage\": \"None\",\n" +
//
" \"offerAudienceLevel\": \"msisdn\",\n" +
//
" \"offerCode1\": \"000003610\",\n" +
//
" \"offerName\": \"CCMS loyalty more4u v1\",\n" +
//
" \"price\": \"20\",\n" +
//
" \"productType\": \"White Label\",\n" +
//
" \"provDuration\": \"7.0\",\n" +
//
" \"provStepValueMins\": \"None\",\n" +
//
" \"score\": \"60\",\n" +
//
" \"treatmentCode\": \"5222.e1b.ffffffffe725d1b3.ffffffffed6d8723\",\n" +
//
" \"validity\": \"0\",\n" +
//
" \"voiceCategory\": \"None\",\n" +
//
" \"wave\": \"1\",\n" +
//
" \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
//
" },\n" +
//
" {\n" +
//
" \"UACIOfferTrackingCode\": \"5226.e1f.728b68c6.ffffffffa6c7b10e\",\n" +
//
" \"businessAdditionalId\": \"\",\n" +
//
" \"businessService\": \"0.0\",\n" +
//
" \"eligibleAssets\": [\n" +
//
" \"306945218770\",\n" +
//
" \"306944333488\",\n" +
//
" \"306932222490\",\n" +
//
" \"306996824010\",\n" +
//
" \"306972713201\",\n" +
//
" \"306942496252\",\n" +
//
" \"306977316716\",\n" +
//
" \"306945433100\",\n" +
//
" \"306977403986\",\n" +
//
" \"306936581495\",\n" +
//
" \"306980689662\",\n" +
//
" \"306970101490\",\n" +
//
" \"306973396329\",\n" +
//
" \"306972577064\",\n" +
//
" \"306974923219\",\n" +
//
" \"306977513761\",\n" +
//
" \"306984220987\",\n" +
//
" \"306979949205\",\n" +
//
" \"306943134127\",\n" +
//
" \"306970437794\",\n" +
//
" \"306932535319\",\n" +
//
" \"306974063133\",\n" +
//
" \"306932520323\",\n" +
//
" \"306978733823\",\n" +
//
" \"306985995420\",\n" +
//
" \"306983879555\",\n" +
//
" ],\n" +
//
" \"id\": \"000003614\",\n" +
//
" \"loyaltyCampaignId\": \"aaf4022194584f02bb84c7b283c7c51e\",\n" +
//
" \"noOfRecurrance\": \"0\",\n" +
//
" \"notificationMessage\": \"None\",\n" +
//
" \"offerAudienceLevel\": \"msisdn\",\n" +
//
" \"offerCode1\": \"000003614\",\n" +
//
" \"offerName\": \"CCMS loyalty - postpay addon more4u\",\n" +
//
" \"postpayProduct\": \"0.0\",\n" +
//
" \"price\": \"None\",\n" +
//
" \"productType\": \"MOBILE ADDON\",\n" +
//
" \"provDuration\": \"0.0\",\n" +
//
" \"score\": \"50\",\n" +
//
" \"treatmentCode\": \"5226.e1f.728b68c6.ffffffffa6c7b10e\",\n" +
//
" \"validity\": \"0\",\n" +
//
" \"wave\": \"1\",\n" +
//
" \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
//
" },\n" +
//
" {\n" +
//
" \"UACIOfferTrackingCode\": \"5154.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
//
" \"businessAdditionalId\": \"\",\n" +
//
" \"eligibleAssets\": [],\n" +
//
" \"id\": \"000003586\",\n" +
//
" \"loyaltyCampaignId\": \"NA\",\n" +
//
" \"offerAudienceLevel\": \"guid\",\n" +
//
" \"offerCode1\": \"000003586\",\n" +
//
" \"offerName\": \"CCMS loyalty offer 6\",\n" +
//
" \"productType\": \"GENERIC\",\n" +
//
" \"score\": \"50\",\n" +
//
" \"treatmentCode\": \"5154.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
//
" \"validity\": \"0\",\n" +
//
" \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
//
" },\n" +
//
" {\n" +
//
" \"UACIOfferTrackingCode\": \"51d2.e0c.291f49d9.40d5a689\",\n" +
//
" \"businessAdditionalId\": \"\",\n" +
//
" \"eligibleAssets\": [],\n" +
//
" \"id\": \"000003595\",\n" +
//
" \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
//
" \"offerAudienceLevel\": \"guid\",\n" +
//
" \"offerCode1\": \"000003595\",\n" +
//
" \"offerName\": \"CCMS Loyal offer campaignId\",\n" +
//
" \"productType\": \"GENERIC\",\n" +
//
" \"score\": \"50\",\n" +
//
" \"treatmentCode\": \"51d2.e0c.291f49d9.40d5a689\",\n" +
//
" \"validity\": \"0\",\n" +
//
" \"zone\": \"COSMOTE_APP_LOYALTY_PROMO\"\n" +
//
" },\n" +
//
" {\n" +
//
" \"UACIOfferTrackingCode\": \"51d6.e0c.291f49d9.40d5a689\",\n" +
//
" \"businessAdditionalId\": \"\",\n" +
//
" \"eligibleAssets\": [],\n" +
//
" \"id\": \"000003595\",\n" +
//
" \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
//
" \"offerAudienceLevel\": \"guid\",\n" +
//
" \"offerCode1\": \"000003595\",\n" +
//
" \"offerName\": \"CCMS Loyal offer campaignId\",\n" +
//
" \"productType\": \"GENERIC\",\n" +
//
" \"score\": \"50\",\n" +
//
" \"treatmentCode\": \"51d6.e0c.291f49d9.40d5a689\",\n" +
//
" \"validity\": \"0\",\n" +
//
" \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
//
" },\n" +
//
" {\n" +
//
" \"UACIOfferTrackingCode\": \"5150.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
//
" \"businessAdditionalId\": \"\",\n" +
//
" \"eligibleAssets\": [],\n" +
//
" \"id\": \"000003586\",\n" +
//
" \"loyaltyCampaignId\": \"NA\",\n" +
//
" \"offerAudienceLevel\": \"guid\",\n" +
//
" \"offerCode1\": \"000003586\",\n" +
//
" \"offerName\": \"CCMS loyalty offer 6\",\n" +
//
" \"productType\": \"GENERIC\",\n" +
//
" \"score\": \"50\",\n" +
//
" \"treatmentCode\": \"5150.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
//
" \"validity\": \"0\",\n" +
//
" \"zone\": \"COSMOTE_APP_GIFTS4U\"\n" +
//
" },\n" +
//
" {\n" +
//
" \"UACIOfferTrackingCode\": \"5152.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
//
" \"businessAdditionalId\": \"\",\n" +
//
" \"eligibleAssets\": [],\n" +
//
" \"id\": \"000003586\",\n" +
//
" \"loyaltyCampaignId\": \"NA\",\n" +
//
" \"offerAudienceLevel\": \"guid\",\n" +
//
" \"offerCode1\": \"000003586\",\n" +
//
" \"offerName\": \"CCMS loyalty offer 6\",\n" +
//
" \"productType\": \"GENERIC\",\n" +
//
" \"score\": \"50\",\n" +
//
" \"treatmentCode\": \"5152.e03.ffffffffeebc476a.ffffffffc5b96f6a\",\n" +
//
" \"validity\": \"0\",\n" +
//
" \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
//
" },\n" +
//
" {\n" +
//
" \"UACIOfferTrackingCode\": \"51d4.e0c.291f49d9.40d5a689\",\n" +
//
" \"businessAdditionalId\": \"\",\n" +
//
" \"eligibleAssets\": [],\n" +
//
" \"id\": \"000003595\",\n" +
//
" \"loyaltyCampaignId\": \"c5cc5f4f65624f47a580b720233fa60d\",\n" +
//
" \"offerAudienceLevel\": \"guid\",\n" +
//
" \"offerCode1\": \"000003595\",\n" +
//
" \"offerName\": \"CCMS Loyal offer campaignId\",\n" +
//
" \"productType\": \"GENERIC\",\n" +
//
" \"score\": \"50\",\n" +
//
" \"treatmentCode\": \"51d4.e0c.291f49d9.40d5a689\",\n" +
//
" \"validity\": \"0\",\n" +
//
" \"zone\": \"COSMOTE_APP_MORE4U\"\n" +
//
" }\n" +
//
" ]");
//
} catch (JSONException e) {
//
e.printStackTrace();
//
}
//
if (jArray != null && jArray.length() > 0) {
//
for (int i = 0; i < jArray.length(); i++) {
//
JSONObject jobj = new JSONObject();
//
jobj = jArray.optJSONObject(i);
//
if (jobj != null) {
//
LoyaltyContextualOfferModel model = new LoyaltyContextualOfferModel(jobj);
//
list.add(model);
//
}
//
}
//
}
//
WarplyManagerHelper.setCCMSLoyaltyCampaigns(list);
if
(
result
.
size
()
>=
0
)
{
objectSerializer
.
serialize
(
result
,
File
.
separator
+
requestSignature
);
warplyPreferences
.
saveInboxLastCachedTimeStamp
(
requestSignature
,
System
.
currentTimeMillis
());
...
...
@@ -1913,6 +1913,8 @@ public enum Warply {
url
=
buildWarplyAuthRequestUrl
(
path
,
true
);
else
if
(
path
.
equals
(
"campaigns"
))
url
=
buildWarplyRequestUrl
(
null
);
else
if
(
path
.
equals
(
"campaignsPersonalized"
))
url
=
buildWarplyRequestUrl
(
null
,
true
);
else
url
=
buildWarplyAuthRequestUrl
(
path
,
false
);
requestToServerInternal
(
Method
.
POST
,
url
,
data
,
listener
,
tag
,
hasAuthHeaders
);
...
...
@@ -1955,6 +1957,15 @@ public enum Warply {
return
sb
.
toString
();
}
private
String
buildWarplyRequestUrl
(
String
warplyPath
,
boolean
personalized
)
{
StringBuilder
sb
=
new
StringBuilder
(
WarplyProperty
.
getBaseUrl
(
mContext
.
get
())
+
WarpConstants
.
BASE_URL_AUTH
);
sb
.
append
(
WarplyProperty
.
getAppUuid
(
mContext
.
get
())).
append
(
"/"
)
.
append
(
WarpConstants
.
PATH_CONTEXT
);
if
(
warplyPath
!=
null
)
sb
.
append
(
"?path="
).
append
(
warplyPath
);
return
sb
.
toString
();
}
private
String
buildWarplyAuthRequestUrl
(
String
warplyPath
,
boolean
isUserPath
)
{
StringBuilder
sb
;
if
(
isUserPath
)
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/BaseFragmentActivity.java
View file @
78c8c25
...
...
@@ -29,7 +29,9 @@ import ly.warp.sdk.io.models.CampaignList;
import
ly.warp.sdk.io.models.Consumer
;
import
ly.warp.sdk.io.models.CouponList
;
import
ly.warp.sdk.io.models.CouponsetsList
;
import
ly.warp.sdk.io.models.NewCampaignList
;
import
ly.warp.sdk.io.request.WarplyConsumerRequest
;
import
ly.warp.sdk.io.request.WarplyGetCampaignsRequest
;
import
ly.warp.sdk.io.request.WarplyGetCouponsetsRequest
;
import
ly.warp.sdk.io.request.WarplyInboxRequest
;
import
ly.warp.sdk.io.request.WarplyUserCouponsRequest
;
...
...
@@ -69,6 +71,7 @@ public class BaseFragmentActivity extends FragmentActivity implements Navigation
if
(!
Thread
.
currentThread
().
isInterrupted
())
{
// WarplyManager.getConsumer(new WarplyConsumerRequest(), mConsumerReceiver);
Warply
.
getInbox
(
new
WarplyInboxRequest
().
setUseCache
(
false
),
mInboxReceiver
);
// WarplyManager.getCampaigns(new WarplyGetCampaignsRequest().setLanguage("el"), mCampaignsCallback);
}
}).
start
();
}
...
...
@@ -204,6 +207,18 @@ public class BaseFragmentActivity extends FragmentActivity implements Navigation
}
};
private
CallbackReceiver
<
NewCampaignList
>
mCampaignsCallback
=
new
CallbackReceiver
<
NewCampaignList
>()
{
@Override
public
void
onSuccess
(
NewCampaignList
result
)
{
WarplyManager
.
getUserCouponsWithCouponsets
(
new
WarplyUserCouponsRequest
(),
mUserCouponsReceiver
);
}
@Override
public
void
onFailure
(
int
errorCode
)
{
Thread
.
currentThread
().
interrupt
();
}
};
private
final
CallbackReceiver
<
CouponList
>
mUserCouponsReceiver
=
new
CallbackReceiver
<
CouponList
>()
{
@Override
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/GiftsForYouActivity.java
View file @
78c8c25
...
...
@@ -182,6 +182,7 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
if
(
extraFields
.
has
(
"ccms_offer"
)
&&
extraFields
.
optString
(
"ccms_offer"
).
equals
(
"true"
))
{
for
(
LoyaltyContextualOfferModel
ccms
:
WarplyManagerHelper
.
getCCMSLoyaltyCampaigns
())
{
if
(
ccms
.
getLoyaltyCampaignId
().
equals
(
dataItem
.
getCampaign
().
getSessionUUID
()))
{
WarpUtils
.
log
(
"CCMS_CLICK "
+
ccms
.
toString
());
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCcmsUrl
(
dataItem
.
getCampaign
(),
ccms
)));
break
;
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/Campaign.java
View file @
78c8c25
...
...
@@ -73,30 +73,30 @@ public class Campaign implements Parcelable, Serializable {
/* Member variables of the Campaign object */
private
final
int
action
;
private
final
double
delivered
;
private
int
action
;
private
double
delivered
;
private
double
expires
;
private
final
String
message
;
private
String
message
;
private
String
offerCategory
;
private
final
String
offerMessage
;
private
final
String
sessionUUID
;
private
final
double
starts
;
private
final
String
subtitle
;
private
final
String
title
;
private
final
int
sorting
;
private
final
int
opened
;
private
String
offerMessage
;
private
String
sessionUUID
;
private
double
starts
;
private
String
subtitle
;
private
String
title
;
private
int
sorting
;
private
int
opened
;
private
boolean
isNew
;
private
final
String
logoUrl
;
private
final
String
extraFields
;
private
final
String
type
;
private
final
boolean
expired
;
private
String
logoUrl
;
private
String
extraFields
;
private
String
type
;
private
boolean
expired
;
private
boolean
show
;
private
String
deliveryMethod
;
private
String
displayType
;
private
String
indexUrl
;
private
String
busId
;
private
ArrayList
<
CampaignAction
>
actions
=
new
ArrayList
<>();
private
final
String
campaignTypeSettings
;
private
String
campaignTypeSettings
;
/**
* Basic constructor used to create an object from a String, representing a
...
...
@@ -109,6 +109,33 @@ public class Campaign implements Parcelable, Serializable {
this
(
new
JSONObject
(
json
));
}
public
Campaign
()
{
this
.
action
=
0
;
this
.
delivered
=
0.0d
;
this
.
expires
=
0.0d
;
this
.
message
=
""
;
this
.
offerCategory
=
""
;
this
.
offerMessage
=
""
;
this
.
sessionUUID
=
""
;
this
.
starts
=
0.0d
;
this
.
subtitle
=
""
;
this
.
title
=
""
;
this
.
sorting
=
0
;
this
.
opened
=
0
;
this
.
isNew
=
true
;
this
.
logoUrl
=
""
;
this
.
extraFields
=
""
;
this
.
type
=
""
;
this
.
expired
=
false
;
this
.
show
=
true
;
this
.
deliveryMethod
=
""
;
this
.
displayType
=
""
;
this
.
indexUrl
=
""
;
this
.
busId
=
""
;
this
.
actions
=
new
ArrayList
<>();
this
.
campaignTypeSettings
=
""
;
}
/**
* Constructor used to create an Object from a given JSON Object
*
...
...
@@ -475,6 +502,94 @@ public class Campaign implements Parcelable, Serializable {
return
campaignTypeSettings
;
}
public
void
setExpires
(
double
expires
)
{
this
.
expires
=
expires
;
}
public
void
setOfferCategory
(
String
offerCategory
)
{
this
.
offerCategory
=
offerCategory
;
}
public
void
setShow
(
boolean
show
)
{
this
.
show
=
show
;
}
public
void
setDeliveryMethod
(
String
deliveryMethod
)
{
this
.
deliveryMethod
=
deliveryMethod
;
}
public
void
setDisplayType
(
String
displayType
)
{
this
.
displayType
=
displayType
;
}
public
void
setIndexUrl
(
String
indexUrl
)
{
this
.
indexUrl
=
indexUrl
;
}
public
void
setActions
(
ArrayList
<
CampaignAction
>
actions
)
{
this
.
actions
=
actions
;
}
public
void
setAction
(
int
action
)
{
this
.
action
=
action
;
}
public
void
setDelivered
(
double
delivered
)
{
this
.
delivered
=
delivered
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
public
void
setOfferMessage
(
String
offerMessage
)
{
this
.
offerMessage
=
offerMessage
;
}
public
void
setSessionUUID
(
String
sessionUUID
)
{
this
.
sessionUUID
=
sessionUUID
;
}
public
void
setStarts
(
double
starts
)
{
this
.
starts
=
starts
;
}
public
void
setSubtitle
(
String
subtitle
)
{
this
.
subtitle
=
subtitle
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
void
setSorting
(
int
sorting
)
{
this
.
sorting
=
sorting
;
}
public
void
setOpened
(
int
opened
)
{
this
.
opened
=
opened
;
}
public
void
setLogoUrl
(
String
logoUrl
)
{
this
.
logoUrl
=
logoUrl
;
}
public
void
setExtraFields
(
String
extraFields
)
{
this
.
extraFields
=
extraFields
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
void
setExpired
(
boolean
expired
)
{
this
.
expired
=
expired
;
}
public
void
setCampaignTypeSettings
(
String
campaignTypeSettings
)
{
this
.
campaignTypeSettings
=
campaignTypeSettings
;
}
@Override
public
int
describeContents
()
{
return
0
;
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/NewCampaign.java
View file @
78c8c25
...
...
@@ -69,12 +69,12 @@ public class NewCampaign implements Parcelable, Serializable {
/* Member variables of the Campaign object */
private
final
String
campaignType
;
private
final
String
settings
;
private
JSONObject
settings
=
new
JSONObject
()
;
private
final
String
audience
;
private
final
String
deliveryMethod
;
private
final
String
displayType
;
private
final
String
extraFields
;
private
final
String
workflowSettings
;
private
JSONObject
extraFields
=
new
JSONObject
()
;
private
JSONObject
workflowSettings
=
new
JSONObject
()
;
private
final
String
category
;
private
final
int
sorting
;
private
final
String
indexUrl
;
...
...
@@ -115,13 +115,13 @@ public class NewCampaign implements Parcelable, Serializable {
this
.
category
=
json
.
optString
(
CATEGORY
);
this
.
title
=
json
.
optString
(
TITLE
);
this
.
sorting
=
json
.
optInt
(
SORTING
);
this
.
extraFields
=
json
.
opt
String
(
EXTRA_FIELDS
);
this
.
extraFields
=
json
.
opt
JSONObject
(
EXTRA_FIELDS
);
this
.
campaignType
=
json
.
optString
(
CAMPAIGN_TYPE
);
this
.
deliveryMethod
=
json
.
optString
(
DELIVERY_METHOD
);
this
.
displayType
=
json
.
optString
(
DISPLAY_TYPE
);
this
.
settings
=
json
.
opt
String
(
SETTINGS
);
this
.
settings
=
json
.
opt
JSONObject
(
SETTINGS
);
this
.
audience
=
json
.
optString
(
AUDIENCE
);
this
.
workflowSettings
=
json
.
opt
String
(
WORKFLOW_SETTINGS
);
this
.
workflowSettings
=
json
.
opt
JSONObject
(
WORKFLOW_SETTINGS
);
this
.
description
=
json
.
optString
(
DESCRIPTION
);
this
.
startDate
=
json
.
optString
(
START_DATE
);
this
.
endDate
=
json
.
optString
(
END_DATE
);
...
...
@@ -140,12 +140,12 @@ public class NewCampaign implements Parcelable, Serializable {
this
.
sorting
=
source
.
readInt
();
this
.
isNew
=
source
.
readByte
()
!=
0
;
this
.
logoUrl
=
source
.
readString
();
this
.
extraFields
=
source
.
readString
();
//
this.extraFields = source.readString();
this
.
deliveryMethod
=
source
.
readString
();
this
.
displayType
=
source
.
readString
();
this
.
settings
=
source
.
readString
();
//
this.settings = source.readString();
this
.
audience
=
source
.
readString
();
this
.
workflowSettings
=
source
.
readString
();
//
this.workflowSettings = source.readString();
this
.
description
=
source
.
readString
();
this
.
startDate
=
source
.
readString
();
this
.
endDate
=
source
.
readString
();
...
...
@@ -164,12 +164,12 @@ public class NewCampaign implements Parcelable, Serializable {
dest
.
writeInt
(
this
.
sorting
);
dest
.
writeInt
(
this
.
isNew
?
1
:
0
);
dest
.
writeString
(
this
.
logoUrl
);
dest
.
writeString
(
extraFields
);
//
dest.writeString(extraFields);
dest
.
writeString
(
deliveryMethod
);
dest
.
writeString
(
displayType
);
dest
.
writeString
(
this
.
settings
);
//
dest.writeString(this.settings);
dest
.
writeString
(
this
.
audience
);
dest
.
writeString
(
this
.
workflowSettings
);
//
dest.writeString(this.workflowSettings);
dest
.
writeString
(
this
.
description
);
dest
.
writeString
(
this
.
startDate
);
dest
.
writeString
(
this
.
endDate
);
...
...
@@ -295,10 +295,6 @@ public class NewCampaign implements Parcelable, Serializable {
return
indexUrl
;
}
public
String
getExtraFields
()
{
return
extraFields
;
}
public
String
getDeliveryMethod
()
{
return
deliveryMethod
;
}
...
...
@@ -311,18 +307,10 @@ public class NewCampaign implements Parcelable, Serializable {
return
campaignType
;
}
public
String
getSettings
()
{
return
settings
;
}
public
String
getAudience
()
{
return
audience
;
}
public
String
getWorkflowSettings
()
{
return
workflowSettings
;
}
public
String
getCategory
()
{
return
category
;
}
...
...
@@ -355,6 +343,18 @@ public class NewCampaign implements Parcelable, Serializable {
return
isNew
;
}
public
JSONObject
getSettings
()
{
return
settings
;
}
public
JSONObject
getExtraFields
()
{
return
extraFields
;
}
public
JSONObject
getWorkflowSettings
()
{
return
workflowSettings
;
}
@Override
public
int
describeContents
()
{
return
0
;
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyManager.java
View file @
78c8c25
...
...
@@ -28,6 +28,8 @@ package ly.warp.sdk.utils.managers;
import
org.json.JSONException
;
import
org.json.JSONObject
;
import
java.util.ArrayList
;
import
ly.warp.sdk.Warply
;
import
ly.warp.sdk.activities.BaseFragmentActivity
;
import
ly.warp.sdk.db.WarplyDBHelper
;
...
...
@@ -48,6 +50,8 @@ import ly.warp.sdk.io.callbacks.TagsCategoriesHook;
import
ly.warp.sdk.io.callbacks.TagsHook
;
import
ly.warp.sdk.io.callbacks.TransactionsHook
;
import
ly.warp.sdk.io.models.AddressList
;
import
ly.warp.sdk.io.models.Campaign
;
import
ly.warp.sdk.io.models.CampaignList
;
import
ly.warp.sdk.io.models.Card
;
import
ly.warp.sdk.io.models.CardList
;
import
ly.warp.sdk.io.models.Consumer
;
...
...
@@ -58,6 +62,7 @@ import ly.warp.sdk.io.models.Couponset;
import
ly.warp.sdk.io.models.CouponsetsList
;
import
ly.warp.sdk.io.models.MerchantCategoriesList
;
import
ly.warp.sdk.io.models.MerchantList
;
import
ly.warp.sdk.io.models.NewCampaign
;
import
ly.warp.sdk.io.models.NewCampaignList
;
import
ly.warp.sdk.io.models.PacingDetails
;
import
ly.warp.sdk.io.models.PointsList
;
...
...
@@ -118,6 +123,7 @@ import ly.warp.sdk.utils.constants.WarpConstants;
*/
public
class
WarplyManager
{
private
static
NewCampaignList
mNewCampaignList
=
new
NewCampaignList
();
public
static
void
getProducts
(
WarplyProductsRequest
request
,
final
CallbackReceiver
<
ProductList
>
receiver
)
{
// String productCategory = "";
...
...
@@ -1318,38 +1324,97 @@ public class WarplyManager {
});
}
public
static
void
getCampaigns
(
WarplyGetCampaignsRequest
request
,
boolean
auth
,
final
CallbackReceiver
<
NewCampaignList
>
receiver
)
{
public
static
void
getCampaigns
(
WarplyGetCampaignsRequest
request
,
final
CallbackReceiver
<
NewCampaignList
>
receiver
)
{
WarpUtils
.
log
(
"************* WARPLY Get Campaigns Request ********************"
);
WarpUtils
.
log
(
"[WARP Trace] WARPLY Get Campaigns Request is active"
);
WarpUtils
.
log
(
"**************************************************"
);
Warply
.
postReceiveMicroappData
(
WarpConstants
.
MICROAPP_NEW_CAMPAIGNS
,
false
,
"campaigns"
,
request
.
toJson
(),
new
NewCampaignsHook
(
new
CallbackReceiver
<
NewCampaignList
>()
{
@Override
public
void
onSuccess
(
NewCampaignList
result
)
{
// receiver.onSuccess(result);
mNewCampaignList
.
clear
();
mNewCampaignList
.
addAll
(
result
);
getCampaignsPersonalized
(
request
,
new
CallbackReceiver
<
NewCampaignList
>()
{
@Override
public
void
onSuccess
(
NewCampaignList
resultPersonalized
)
{
receiver
.
onSuccess
(
resultPersonalized
);
}
@Override
public
void
onFailure
(
int
errorCode
)
{
receiver
.
onFailure
(
errorCode
);
}
});
}
@Override
public
void
onFailure
(
int
errorCode
)
{
receiver
.
onFailure
(
errorCode
);
}
},
request
.
getSignature
()));
}
public
static
void
getCampaignsPersonalized
(
WarplyGetCampaignsRequest
request
,
final
CallbackReceiver
<
NewCampaignList
>
receiver
)
{
WarpUtils
.
log
(
"************* WARPLY Get Campaigns Request ********************"
);
WarpUtils
.
log
(
"[WARP Trace] WARPLY Get Campaigns Request is active"
);
WarpUtils
.
log
(
"**************************************************"
);
Warply
.
postReceiveMicroappData
(
WarpConstants
.
MICROAPP_NEW_CAMPAIGNS
,
auth
,
"campaigns
"
,
request
.
toJson
(),
new
NewCampaignsHook
(
new
CallbackReceiver
<
NewCampaignList
>()
{
Warply
.
postReceiveMicroappData
(
WarpConstants
.
MICROAPP_NEW_CAMPAIGNS
,
true
,
"campaignsPersonalized
"
,
request
.
toJson
(),
new
NewCampaignsHook
(
new
CallbackReceiver
<
NewCampaignList
>()
{
@Override
public
void
onSuccess
(
NewCampaignList
result
)
{
mNewCampaignList
.
addAll
(
result
);
CampaignList
tempCampaigns
=
new
CampaignList
();
for
(
NewCampaign
newCamp
:
mNewCampaignList
)
{
Campaign
camp
=
new
Campaign
();
camp
.
setIndexUrl
(
newCamp
.
getIndexUrl
());
camp
.
setLogoUrl
(
newCamp
.
getLogoUrl
());
camp
.
setMessage
(
newCamp
.
getMessage
());
camp
.
setOfferCategory
(
newCamp
.
getCommunicationCategory
());
camp
.
setSessionUUID
(
newCamp
.
getCommunicationUUID
());
camp
.
setTitle
(
newCamp
.
getTitle
());
camp
.
setSubtitle
(
newCamp
.
getSubtitle
());
camp
.
setSorting
(
newCamp
.
getSorting
());
camp
.
setNew
(
newCamp
.
getIsNew
());
camp
.
setType
(
newCamp
.
getCampaignType
());
try
{
camp
.
setExtraFields
(
newCamp
.
getExtraFields
().
toString
());
}
catch
(
NullPointerException
e
)
{
camp
.
setExtraFields
(
""
);
e
.
printStackTrace
();
}
try
{
camp
.
setCampaignTypeSettings
(
newCamp
.
getSettings
().
toString
());
}
catch
(
NullPointerException
e
)
{
camp
.
setCampaignTypeSettings
(
""
);
e
.
printStackTrace
();
}
tempCampaigns
.
add
(
camp
);
}
WarplyManagerHelper
.
setCampaignList
(
tempCampaigns
);
receiver
.
onSuccess
(
result
);
}
@Override
public
void
onFailure
(
int
errorCode
)
{
if
(
auth
)
{
if
(
errorCode
==
401
)
{
refreshToken
(
new
WarplyRefreshTokenRequest
(),
new
CallbackReceiver
<
JSONObject
>()
{
@Override
public
void
onSuccess
(
JSONObject
result
)
{
int
status
=
result
.
optInt
(
"status"
,
2
);
if
(
status
==
1
)
getCampaigns
(
request
,
auth
,
receiver
);
else
receiver
.
onFailure
(
status
);
}
if
(
errorCode
==
401
)
{
refreshToken
(
new
WarplyRefreshTokenRequest
(),
new
CallbackReceiver
<
JSONObject
>()
{
@Override
public
void
onSuccess
(
JSONObject
result
)
{
int
status
=
result
.
optInt
(
"status"
,
2
);
if
(
status
==
1
)
getCampaignsPersonalized
(
request
,
receiver
);
else
receiver
.
onFailure
(
status
);
}
@Override
public
void
onFailure
(
int
errorCode
)
{
receiver
.
onFailure
(
errorCode
);
}
});
}
else
receiver
.
onFailure
(
errorCode
);
@Override
public
void
onFailure
(
int
errorCode
)
{
receiver
.
onFailure
(
errorCode
);
}
});
}
else
receiver
.
onFailure
(
errorCode
);
}
...
...
@@ -1554,7 +1619,7 @@ public class WarplyManager {
WarpUtils
.
log
(
"[WARP Trace] WARPLY User Coupons Request is active"
);
WarpUtils
.
log
(
"**************************************************"
);
WarplyManager
.
getCouponsets
(
new
WarplyGetCouponsetsRequest
()
getCouponsets
(
new
WarplyGetCouponsetsRequest
()
.
setLanguage
(
WarplyProperty
.
getLanguage
(
Warply
.
getWarplyContext
())),
new
CallbackReceiver
<
CouponsetsList
>()
{
@Override
public
void
onSuccess
(
CouponsetsList
result
)
{
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/views/WarpView.java
View file @
78c8c25
...
...
@@ -383,19 +383,6 @@ public class WarpView extends WebView {
questionnaireEvent
.
setName
(
parts
[
1
]);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
questionnaireEvent
));
}
else
if
(
parts
[
1
].
equals
(
"userAnswered"
))
{
QuestionnaireEventModel
questionnaireEvent
=
new
QuestionnaireEventModel
();
try
{
questionnaireEvent
.
setName
(
parts
[
1
]);
questionnaireEvent
.
setParameter
(
parts
[
2
]);
WarpUtils
.
setUserTag
(
Warply
.
getWarplyContext
(),
parts
[
2
]);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
questionnaireEvent
));
}
catch
(
IndexOutOfBoundsException
e
)
{
questionnaireEvent
.
setName
(
parts
[
1
]);
questionnaireEvent
.
setParameter
(
""
);
WarpUtils
.
setUserTag
(
Warply
.
getWarplyContext
(),
""
);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
questionnaireEvent
));
}
}
else
if
(
parts
[
1
].
equals
(
"addUserTag"
))
{
// QuestionnaireEventModel questionnaireEvent = new QuestionnaireEventModel();
try
{
// questionnaireEvent.setName(parts[1]);
...
...
@@ -408,6 +395,19 @@ public class WarpView extends WebView {
WarpUtils
.
setUserTag
(
Warply
.
getWarplyContext
(),
""
);
// EventBus.getDefault().post(new WarplyEventBusManager(questionnaireEvent));
}
}
else
if
(
parts
[
1
].
equals
(
"addUserTag"
))
{
QuestionnaireEventModel
questionnaireEvent
=
new
QuestionnaireEventModel
();
try
{
questionnaireEvent
.
setName
(
parts
[
1
]);
questionnaireEvent
.
setParameter
(
parts
[
2
]);
WarpUtils
.
setUserTag
(
Warply
.
getWarplyContext
(),
parts
[
2
]);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
questionnaireEvent
));
}
catch
(
IndexOutOfBoundsException
e
)
{
questionnaireEvent
.
setName
(
parts
[
1
]);
questionnaireEvent
.
setParameter
(
""
);
WarpUtils
.
setUserTag
(
Warply
.
getWarplyContext
(),
""
);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
questionnaireEvent
));
}
}
else
if
(
parts
[
1
].
equals
(
"couponRetrieved"
))
{
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
new
CouponEventModel
()));
}
else
if
(
parts
[
1
].
equals
(
"couponShared"
))
{
...
...
Please
register
or
login
to post a comment