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-22 15:57:59 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
271e4bd4d62421470bd633bdb213551e1a67330c
271e4bd4
1 parent
d0dff33f
new keys
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
21 deletions
warply_android_sdk/src/main/java/ly/warp/sdk/Warply.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
warply_android_sdk/src/main/res/values/strings.xml
warply_android_sdk/src/main/java/ly/warp/sdk/Warply.java
View file @
271e4bd
...
...
@@ -1325,27 +1325,21 @@ public enum Warply {
super
.
onResult
(
json
,
errorCode
);
if
(
json
!=
null
)
{
if
(!
WarpUtils
.
getIsDeviceInfoSaved
(
mContext
.
get
()))
{
WarpUtils
.
setIsDeviceInfoSaved
(
mContext
.
get
(),
true
);
WarpUtils
.
setDeviceInfoObject
(
mContext
.
get
(),
json
);
postMicroappData
(
WarpConstants
.
MICROAPP_DEVICE_INFO
,
json
,
true
);
}
else
{
if
(
hasDeviceInfoDifference
(
WarpUtils
.
getDeviceInfoObject
(
mContext
.
get
()),
json
))
{
WarpUtils
.
setDeviceInfoObject
(
mContext
.
get
(),
json
);
postMicroappData
(
WarpConstants
.
MICROAPP_DEVICE_INFO
,
json
,
true
);
}
}
// OLD LOGIC //
// if (!WarpUtils.getIsDeviceInfoSaved(mContext.get())) {
// WarpUtils.setIsDeviceInfoSaved(mContext.get(), true);
// WarpUtils.setDeviceInfoObject(mContext.get(), json);
// postMicroappData(WarpConstants.MICROAPP_DEVICE_INFO, json, true);
// } else {
// if (hasDeviceInfoDifference(WarpUtils.getDeviceInfoObject(mContext.get()), json)) {
// WarpUtils.setDeviceInfoObject(mContext.get(), json);
// postMicroappData(WarpConstants.MICROAPP_DEVICE_INFO, json, true);
// }
// }
// OLD LOGIC //
//// if (WarplyProperty.isSendPackages(mContext.get())) {
//// json = deviceInfoCollector.getInstalledPackages(true);
//// if (json != null) {
////
//// WarpUtils.log("********** Installed Packages **********");
//// WarpUtils.log(json.toString());
//// WarpUtils.log("********************************");
//// postMicroappData(WarpConstants.MICROAPP_USER_PACKAGES, json, true);
//// }
//// }
// NEW LOGIC - REVERT IF NEEDED //
postMicroappData
(
WarpConstants
.
MICROAPP_DEVICE_INFO
,
json
,
true
);
}
}
});
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
View file @
271e4bd
...
...
@@ -73,6 +73,7 @@ import ly.warp.sdk.io.models.PushCampaign;
import
ly.warp.sdk.io.models.WarplyCouponsChangedEventModel
;
import
ly.warp.sdk.io.request.CosmoteRetrieveSharingRequest
;
import
ly.warp.sdk.io.request.CosmoteSharingRequest
;
import
ly.warp.sdk.io.request.WarplyEditConsumerRequest
;
import
ly.warp.sdk.io.request.WarplyIntegrationRequest
;
import
ly.warp.sdk.io.request.WarplyUserCouponsRequest
;
import
ly.warp.sdk.services.EventService
;
...
...
@@ -947,6 +948,29 @@ public class WarplyManagerHelper {
});
}
public
static
void
setTrackersEnabled
(
boolean
isEnabled
)
{
JSONObject
obj
=
new
JSONObject
();
try
{
obj
.
putOpt
(
"trackers_enabled"
,
isEnabled
);
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
}
WarplyManager
.
editConsumer
(
new
WarplyEditConsumerRequest
()
.
setHasProfileMetadata
(
true
)
.
setProfileMetadata
(
obj
),
new
CallbackReceiver
<
JSONObject
>()
{
@Override
public
void
onSuccess
(
JSONObject
result
)
{
WarpUtils
.
log
(
"EDIT CONSUMER SUCCESS"
);
}
@Override
public
void
onFailure
(
int
errorCode
)
{
WarpUtils
.
log
(
"EDIT CONSUMER FAILED"
);
}
});
}
/**
* Get if customer is nonTelco and if he/she has accepted the consents
* And his msisdn list
...
...
warply_android_sdk/src/main/res/values/strings.xml
View file @
271e4bd
...
...
@@ -13,7 +13,7 @@
<string
name=
"cos_profile_type"
>
Traveller
</string>
<string
name=
"header_add"
>
Προσθήκη
</string>
<string
name=
"cos_profile_reward"
>
My Loyalty\nWallet
</string>
<string
name=
"cos_profile_title"
>
Rewards
</string>
<string
name=
"cos_profile_title"
>
My
Rewards
</string>
<string
name=
"cos_deals_title"
>
Deals for You
</string>
<string
name=
"cos_profile_more"
>
Δες περισσότερα
</string>
<string
name=
"cos_gifts_title"
>
GIFTS for YOU
</string>
...
...
Please
register
or
login
to post a comment