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-27 12:54:46 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e18b84249919030d390422e1112aa42abe9fc546
e18b8424
1 parent
5372be19
neo tag implementation
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
92 additions
and
35 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/GiftsForYouActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/MoreForYouActivity.java
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
warply_android_sdk/build.gradle
View file @
e18b842
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.4-cosbeta7
4
'
PUBLISH_VERSION
=
'4.5.4-cosbeta7
5
'
PUBLISH_ARTIFACT_ID
=
'warply-android-sdk'
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/Warply.java
View file @
e18b842
...
...
@@ -1309,7 +1309,7 @@ public enum Warply {
isInitializedOrThrow
();
WarpUtils
.
log
(
"************* WARPLY Microapp ********************"
);
if
(!
WarplyServerPreferencesManager
.
isMicroAppActive
(
WarpConstants
.
MicroApp
.
APPLICATION_DATA
))
{
if
(!
WarplyServerPreferencesManager
.
isMicroAppActive
(
WarpConstants
.
MicroApp
.
DEVICE_INFO
))
{
WarpUtils
.
log
(
"[WARP Trace] Application Info Microapp is not active"
);
return
;
}
else
{
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/GiftsForYouActivity.java
View file @
e18b842
...
...
@@ -13,6 +13,8 @@ import android.widget.TextView;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.work.OneTimeWorkRequest
;
import
androidx.work.WorkManager
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
...
...
@@ -32,10 +34,12 @@ import ly.warp.sdk.io.models.LoyaltyContextualOfferModel;
import
ly.warp.sdk.io.models.LoyaltyGiftsForYouOfferClickEvent
;
import
ly.warp.sdk.io.models.LoyaltyGiftsForYouPackage
;
import
ly.warp.sdk.io.models.MergedGifts
;
import
ly.warp.sdk.services.EventCampaignService
;
import
ly.warp.sdk.utils.WarpJSONParser
;
import
ly.warp.sdk.utils.WarpUtils
;
import
ly.warp.sdk.utils.WarplyManagerHelper
;
import
ly.warp.sdk.utils.managers.WarplyEventBusManager
;
import
ly.warp.sdk.utils.managers.WarplyManager
;
import
ly.warp.sdk.views.adapters.MergedGiftsAdapter
;
...
...
@@ -149,6 +153,14 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
super
.
attachBaseContext
(
ViewPumpContextWrapper
.
wrap
(
newBase
));
}
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
if
(
requestCode
==
1004
)
{
OneTimeWorkRequest
mywork
=
new
OneTimeWorkRequest
.
Builder
(
EventCampaignService
.
class
).
build
();
WorkManager
.
getInstance
(
GiftsForYouActivity
.
this
).
enqueue
(
mywork
);
}
}
@Subscribe
()
public
void
onMessageEvent
(
WarplyEventBusManager
event
)
{
if
(
event
.
getCcmsAdded
()
!=
null
||
event
.
getCampaignsAdded
()
!=
null
)
{
...
...
@@ -204,16 +216,17 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
String
cpnUuid
=
campaignSettings
.
optString
(
"couponset"
);
for
(
Couponset
cpns
:
WarplyManagerHelper
.
getCouponsets
())
{
if
(
cpns
.
getUuid
().
equals
(
cpnUuid
))
{
WarplyManager
.
getSingleCampaign
(
dataItem
.
getCampaign
().
getSessionUUID
());
Intent
intent
=
new
Intent
(
GiftsForYouActivity
.
this
,
CouponsetInfoActivity
.
class
);
intent
.
putExtra
(
"couponset"
,
(
Serializable
)
cpns
);
intent
.
putExtra
(
"loyalty"
,
(
Serializable
)
dataItem
.
getCampaign
());
intent
.
putExtra
(
"ccms"
,
ccmsItem
);
startActivity
(
intent
);
startActivity
ForResult
(
intent
,
1004
);
break
;
}
}
}
else
{
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
()))
);
startActivity
ForResult
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
())),
1004
);
}
}
}
catch
(
Exception
exception
)
{
...
...
@@ -231,15 +244,16 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
String
cpnUuid
=
campaignSettings
.
optString
(
"couponset"
);
for
(
Couponset
cpns
:
WarplyManagerHelper
.
getCouponsets
())
{
if
(
cpns
.
getUuid
().
equals
(
cpnUuid
))
{
WarplyManager
.
getSingleCampaign
(
dataItem
.
getCampaign
().
getSessionUUID
());
Intent
intent
=
new
Intent
(
GiftsForYouActivity
.
this
,
CouponsetInfoActivity
.
class
);
intent
.
putExtra
(
"couponset"
,
(
Serializable
)
cpns
);
intent
.
putExtra
(
"loyalty"
,
(
Serializable
)
dataItem
.
getCampaign
());
startActivity
(
intent
);
startActivity
ForResult
(
intent
,
1004
);
break
;
}
}
}
else
{
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
()))
);
startActivity
ForResult
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
())),
1004
);
}
}
}
catch
(
Exception
exception
)
{
...
...
@@ -255,10 +269,11 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
if
(
extraFields
.
has
(
"type"
)
&&
extraFields
.
optString
(
"type"
).
equals
(
"telco"
))
{
for
(
LoyaltyContextualOfferModel
ccms
:
WarplyManagerHelper
.
getCCMSLoyaltyCampaigns
())
{
if
(
ccms
.
getLoyaltyCampaignId
().
equals
(
dataItem
.
getCampaign
().
getSessionUUID
()))
{
WarplyManager
.
getSingleCampaign
(
dataItem
.
getCampaign
().
getSessionUUID
());
Intent
intent
=
new
Intent
(
GiftsForYouActivity
.
this
,
TelcoActivity
.
class
);
intent
.
putExtra
(
"ccms"
,
ccms
);
intent
.
putExtra
(
"loyalty"
,
(
Serializable
)
dataItem
.
getCampaign
());
startActivity
(
intent
);
startActivity
ForResult
(
intent
,
1004
);
break
;
}
}
...
...
@@ -268,16 +283,16 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
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
))
);
startActivity
ForResult
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCcmsUrl
(
dataItem
.
getCampaign
(),
ccms
)),
1004
);
break
;
}
}
}
else
{
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
()))
);
startActivity
ForResult
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
())),
1004
);
}
}
}
catch
(
Exception
exception
)
{
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
()))
);
startActivity
ForResult
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
())),
1004
);
}
}
else
if
(
dataItem
.
getDataType
()
==
2
)
{
LoyaltyGiftsForYouOfferClickEvent
seasonalCLick
=
new
LoyaltyGiftsForYouOfferClickEvent
();
...
...
@@ -340,16 +355,17 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
String
cpnUuid
=
campaignSettings
.
optString
(
"couponset"
);
for
(
Couponset
cpns
:
WarplyManagerHelper
.
getCouponsets
())
{
if
(
cpns
.
getUuid
().
equals
(
cpnUuid
))
{
WarplyManager
.
getSingleCampaign
(
dataItem
.
getCampaign
().
getSessionUUID
());
Intent
intent
=
new
Intent
(
GiftsForYouActivity
.
this
,
CouponsetInfoActivity
.
class
);
intent
.
putExtra
(
"couponset"
,
(
Serializable
)
cpns
);
intent
.
putExtra
(
"loyalty"
,
(
Serializable
)
dataItem
.
getCampaign
());
intent
.
putExtra
(
"ccms"
,
ccmsItem
);
startActivity
(
intent
);
startActivity
ForResult
(
intent
,
1004
);
break
;
}
}
}
else
{
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
()))
);
startActivity
ForResult
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
())),
1004
);
}
}
}
catch
(
Exception
exception
)
{
...
...
@@ -367,15 +383,16 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
String
cpnUuid
=
campaignSettings
.
optString
(
"couponset"
);
for
(
Couponset
cpns
:
WarplyManagerHelper
.
getCouponsets
())
{
if
(
cpns
.
getUuid
().
equals
(
cpnUuid
))
{
WarplyManager
.
getSingleCampaign
(
dataItem
.
getCampaign
().
getSessionUUID
());
Intent
intent
=
new
Intent
(
GiftsForYouActivity
.
this
,
CouponsetInfoActivity
.
class
);
intent
.
putExtra
(
"couponset"
,
(
Serializable
)
cpns
);
intent
.
putExtra
(
"loyalty"
,
(
Serializable
)
dataItem
.
getCampaign
());
startActivity
(
intent
);
startActivity
ForResult
(
intent
,
1004
);
break
;
}
}
}
else
{
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
()))
);
startActivity
ForResult
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
())),
1004
);
}
}
}
catch
(
Exception
exception
)
{
...
...
@@ -391,10 +408,11 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
if
(
extraFields
.
has
(
"type"
)
&&
extraFields
.
optString
(
"type"
).
equals
(
"telco"
))
{
for
(
LoyaltyContextualOfferModel
ccms
:
WarplyManagerHelper
.
getCCMSLoyaltyCampaigns
())
{
if
(
ccms
.
getLoyaltyCampaignId
().
equals
(
dataItem
.
getCampaign
().
getSessionUUID
()))
{
WarplyManager
.
getSingleCampaign
(
dataItem
.
getCampaign
().
getSessionUUID
());
Intent
intent
=
new
Intent
(
GiftsForYouActivity
.
this
,
TelcoActivity
.
class
);
intent
.
putExtra
(
"ccms"
,
ccms
);
intent
.
putExtra
(
"loyalty"
,
(
Serializable
)
dataItem
.
getCampaign
());
startActivity
(
intent
);
startActivity
ForResult
(
intent
,
1004
);
break
;
}
}
...
...
@@ -403,16 +421,16 @@ 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
()))
{
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCcmsUrl
(
dataItem
.
getCampaign
(),
ccms
))
);
startActivity
ForResult
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCcmsUrl
(
dataItem
.
getCampaign
(),
ccms
)),
1004
);
break
;
}
}
}
else
{
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
()))
);
startActivity
ForResult
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
())),
1004
);
}
}
}
catch
(
Exception
exception
)
{
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
()))
);
startActivity
ForResult
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
dataItem
.
getCampaign
())),
1004
);
}
}
else
if
(
dataItem
.
getDataType
()
==
2
)
{
LoyaltyGiftsForYouOfferClickEvent
seasonalCLick
=
new
LoyaltyGiftsForYouOfferClickEvent
();
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/MoreForYouActivity.java
View file @
e18b842
...
...
@@ -13,6 +13,8 @@ import android.widget.TextView;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.work.OneTimeWorkRequest
;
import
androidx.work.WorkManager
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
...
...
@@ -31,6 +33,7 @@ import ly.warp.sdk.io.models.CampaignList;
import
ly.warp.sdk.io.models.LoyaltyContextualOfferModel
;
import
ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel
;
import
ly.warp.sdk.io.models.MergedMore
;
import
ly.warp.sdk.services.EventCampaignService
;
import
ly.warp.sdk.utils.WarpJSONParser
;
import
ly.warp.sdk.utils.WarpUtils
;
import
ly.warp.sdk.utils.WarplyManagerHelper
;
...
...
@@ -174,6 +177,14 @@ public class MoreForYouActivity extends Activity implements View.OnClickListener
super
.
attachBaseContext
(
ViewPumpContextWrapper
.
wrap
(
newBase
));
}
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
if
(
requestCode
==
1003
)
{
OneTimeWorkRequest
mywork
=
new
OneTimeWorkRequest
.
Builder
(
EventCampaignService
.
class
).
build
();
WorkManager
.
getInstance
(
MoreForYouActivity
.
this
).
enqueue
(
mywork
);
}
}
@Subscribe
()
public
void
onMessageEvent
(
WarplyEventBusManager
event
)
{
if
(
event
.
getCcmsAdded
()
!=
null
||
event
.
getCampaignsAdded
()
!=
null
)
{
...
...
@@ -520,16 +531,16 @@ public class MoreForYouActivity extends Activity implements View.OnClickListener
for
(
LoyaltyContextualOfferModel
ccms
:
WarplyManagerHelper
.
getCCMSLoyaltyCampaigns
())
{
if
(
ccms
.
getLoyaltyCampaignId
().
equals
(
moreItem
.
getSessionUUID
()))
{
WarpUtils
.
log
(
"CCMS_CLICK "
+
ccms
.
toString
());
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCcmsUrl
(
moreItem
,
ccms
))
);
startActivity
ForResult
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCcmsUrl
(
moreItem
,
ccms
)),
1003
);
break
;
}
}
}
else
{
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
moreItem
))
);
startActivity
ForResult
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
moreItem
)),
1003
);
}
}
}
catch
(
Exception
exception
)
{
startActivity
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
moreItem
))
);
startActivity
ForResult
(
WarpViewActivity
.
createIntentFromURL
(
this
,
WarplyManagerHelper
.
constructCampaignUrl
(
moreItem
)),
1003
);
}
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
View file @
e18b842
...
...
@@ -739,6 +739,7 @@ public class WarplyManagerHelper {
}
}
else
if
(
extraFields
.
has
(
"type"
)
&&
extraFields
.
optString
(
"type"
).
equals
(
"telco"
))
{
if
(
item
.
getLoyaltyCampaignId
().
equals
(
camp
.
getSessionUUID
()))
{
WarplyManager
.
getSingleCampaign
(
camp
.
getSessionUUID
());
Intent
intent
=
new
Intent
(
context
,
TelcoActivity
.
class
);
intent
.
putExtra
(
"ccms"
,
item
);
intent
.
putExtra
(
"loyalty"
,
(
Serializable
)
camp
);
...
...
@@ -775,6 +776,7 @@ public class WarplyManagerHelper {
String
cpnUuid
=
campaignSettings
.
optString
(
"couponset"
);
for
(
Couponset
cpns
:
WarplyManagerHelper
.
getCouponsets
())
{
if
(
cpns
.
getUuid
().
equals
(
cpnUuid
))
{
WarplyManager
.
getSingleCampaign
(
item
.
getSessionUUID
());
Intent
intent
=
new
Intent
(
context
,
CouponsetInfoActivity
.
class
);
intent
.
putExtra
(
"couponset"
,
(
Serializable
)
cpns
);
intent
.
putExtra
(
"loyalty"
,
(
Serializable
)
item
);
...
...
@@ -802,6 +804,7 @@ public class WarplyManagerHelper {
String
cpnUuid
=
campaignSettings
.
optString
(
"couponset"
);
for
(
Couponset
cpns
:
WarplyManagerHelper
.
getCouponsets
())
{
if
(
cpns
.
getUuid
().
equals
(
cpnUuid
))
{
WarplyManager
.
getSingleCampaign
(
item
.
getSessionUUID
());
Intent
intent
=
new
Intent
(
context
,
CouponsetInfoActivity
.
class
);
intent
.
putExtra
(
"couponset"
,
(
Serializable
)
cpns
);
intent
.
putExtra
(
"loyalty"
,
(
Serializable
)
item
);
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyManager.java
View file @
e18b842
...
...
@@ -31,6 +31,8 @@ import android.os.Looper;
import
android.util.Log
;
import
androidx.appcompat.app.AlertDialog
;
import
androidx.work.OneTimeWorkRequest
;
import
androidx.work.WorkManager
;
import
org.greenrobot.eventbus.EventBus
;
import
org.json.JSONArray
;
...
...
@@ -133,6 +135,7 @@ import ly.warp.sdk.io.request.WarplyUserCouponsRequest;
import
ly.warp.sdk.io.request.WarplyValidateCouponRequest
;
import
ly.warp.sdk.io.request.WarplyVerifyOTPRequest
;
import
ly.warp.sdk.io.request.WarplyVerifyTicketRequest
;
import
ly.warp.sdk.services.EventCampaignService
;
import
ly.warp.sdk.utils.WarpJSONParser
;
import
ly.warp.sdk.utils.WarpUtils
;
import
ly.warp.sdk.utils.WarplyManagerHelper
;
...
...
@@ -2577,19 +2580,41 @@ public class WarplyManager {
WarpUtils
.
log
(
"[WARP Trace] WARPLY Get Event Request is active"
);
WarpUtils
.
log
(
"**************************************************"
);
// String url = WarplyProperty.getBaseUrl(Warply.getWarplyContext()) + WarpConstants.BASE_REMOTE_PAGE_URL + sessionUuid;
//
// Warply.getSingleCampaign(null, url,
// new CallbackReceiver<JSONObject>() {
// @Override
// public void onSuccess(JSONObject result) {
// WarpUtils.log("GET_SINGLE_CAMPAIGN_SUCCESS");
// }
//
// @Override
// public void onFailure(int errorCode) {
// WarpUtils.log("GET_SINGLE_CAMPAIGN_FAILED");
// }
// }, null);
String
url
=
WarplyProperty
.
getBaseUrl
(
Warply
.
getWarplyContext
())
+
WarpConstants
.
BASE_REMOTE_PAGE_URL
+
sessionUuid
;
Warply
.
getSingleCampaign
(
null
,
url
,
new
CallbackReceiver
<
JSONObject
>()
{
@Override
public
void
onSuccess
(
JSONObject
result
)
{
WarplyManager
.
getCampaigns
(
new
WarplyGetCampaignsRequest
().
setLanguage
(
"en"
),
new
CallbackReceiver
<
CampaignList
>()
{
@Override
public
void
onSuccess
(
CampaignList
result
)
{
OneTimeWorkRequest
mywork
=
new
OneTimeWorkRequest
.
Builder
(
EventCampaignService
.
class
).
build
();
WorkManager
.
getInstance
(
Warply
.
getWarplyContext
()).
enqueue
(
mywork
);
}
@Override
public
void
onFailure
(
int
errorCode
)
{
}
});
}
@Override
public
void
onFailure
(
int
errorCode
)
{
WarplyManager
.
getCampaigns
(
new
WarplyGetCampaignsRequest
().
setLanguage
(
"en"
),
new
CallbackReceiver
<
CampaignList
>()
{
@Override
public
void
onSuccess
(
CampaignList
result
)
{
OneTimeWorkRequest
mywork
=
new
OneTimeWorkRequest
.
Builder
(
EventCampaignService
.
class
).
build
();
WorkManager
.
getInstance
(
Warply
.
getWarplyContext
()).
enqueue
(
mywork
);
}
@Override
public
void
onFailure
(
int
errorCode
)
{
}
});
}
},
null
);
}
}
...
...
Please
register
or
login
to post a comment