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-20 13:44:57 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8a2de9874988dbc2abad8831c80e418fe69b6757
8a2de987
1 parent
7e272c42
new additions and minor fixes
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
4 deletions
app/src/main/java/warp/ly/android_sdk/activities/SplashActivity.java
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/TelcoActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/io/request/CosmotePostEventRequest.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
app/src/main/java/warp/ly/android_sdk/activities/SplashActivity.java
View file @
8a2de98
...
...
@@ -42,7 +42,7 @@ public class SplashActivity extends BaseActivity {
// );
WarplyManager
.
getCosmoteUser
(
new
WarplyCosmoteUserRequest
()
.
setGuid
(
"601204932
1"
),
//6012049321, 6012049322
.
setGuid
(
"601204932
3"
),
//6012049321, 6012049322, 6012049323
mLoginReceiver
);
// WarplyManager.verifyTicket(new WarplyVerifyTicketRequest()
...
...
warply_android_sdk/build.gradle
View file @
8a2de98
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.4-cosbeta37
i
'
PUBLISH_VERSION
=
'4.5.4-cosbeta37'
PUBLISH_ARTIFACT_ID
=
'warply-android-sdk'
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/Warply.java
View file @
8a2de98
...
...
@@ -995,7 +995,7 @@ public enum Warply {
try
{
JSONObject
extraFields
=
WarpJSONParser
.
getJSONFromString
(
camp
.
getExtraFields
());
if
(
extraFields
!=
null
)
{
if
(
extraFields
.
length
()
==
0
||
!
extraFields
.
has
(
"ccms_offer"
))
{
if
(
extraFields
.
length
()
==
0
||
!
(
extraFields
.
has
(
"ccms_offer"
)
||
extraFields
.
has
(
"type"
)
))
{
campaignLoyaltyList
.
add
(
camp
);
}
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/TelcoActivity.java
View file @
8a2de98
...
...
@@ -27,8 +27,10 @@ import ly.warp.sdk.io.callbacks.CallbackReceiver;
import
ly.warp.sdk.io.models.Campaign
;
import
ly.warp.sdk.io.models.Consumer
;
import
ly.warp.sdk.io.models.LoyaltyContextualOfferModel
;
import
ly.warp.sdk.io.request.CosmotePostEventRequest
;
import
ly.warp.sdk.io.request.CosmoteSubmitOrderRequest
;
import
ly.warp.sdk.io.request.WarplyConsumerRequest
;
import
ly.warp.sdk.utils.WarpUtils
;
import
ly.warp.sdk.utils.managers.WarplyManager
;
...
...
@@ -247,6 +249,26 @@ public class TelcoActivity extends Activity implements View.OnClickListener {
else
errorActivatingDialog
();
});
if
(
status
==
1
)
{
new
Thread
(()
->
{
if
(!
Thread
.
currentThread
().
isInterrupted
())
{
WarplyManager
.
postEvent
(
new
CosmotePostEventRequest
()
.
setCommunicationUuid
(
mLoyalty
.
getSessionUUID
())
.
setUserMsisdn
(
mSender
)
.
setOfferAudienceLevel
(
mCCMS
.
getOfferAudienceLevel
())
.
setUACIOfferTrackingCode
(
mCCMS
.
getUACIOfferTrackingCode
())
.
setOfferCode1
(
mCCMS
.
getOfferCode1
())
.
setScore
(
mCCMS
.
getScore
())
.
setZone
(
mCCMS
.
getZone
())
.
setWave
(
mCCMS
.
getWave
())
.
setValidity
(
mCCMS
.
getValidity
())
.
setTreatmentCode
(
mCCMS
.
getTreatmentCode
()),
mPostCallback
);
}
Thread
.
currentThread
().
interrupt
();
}).
start
();
}
}
@Override
...
...
@@ -254,4 +276,17 @@ public class TelcoActivity extends Activity implements View.OnClickListener {
runOnUiThread
(()
->
errorActivatingDialog
());
}
};
private
CallbackReceiver
<
JSONObject
>
mPostCallback
=
new
CallbackReceiver
<
JSONObject
>()
{
@Override
public
void
onSuccess
(
JSONObject
result
)
{
Thread
.
currentThread
().
interrupt
();
}
@Override
public
void
onFailure
(
int
errorCode
)
{
WarpUtils
.
log
(
"POST_EVENT_ERROR "
+
String
.
valueOf
(
errorCode
));
Thread
.
currentThread
().
interrupt
();
}
};
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/io/request/CosmotePostEventRequest.java
0 → 100644
View file @
8a2de98
This diff is collapsed. Click to expand it.
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
View file @
8a2de98
...
...
@@ -632,7 +632,7 @@ public class WarplyManagerHelper {
try
{
JSONObject
extraFields
=
WarpJSONParser
.
getJSONFromString
(
camp
.
getExtraFields
());
if
(
extraFields
!=
null
)
{
if
(
extraFields
.
length
()
==
0
||
!
extraFields
.
has
(
"ccms_offer"
))
{
if
(
extraFields
.
length
()
==
0
||
!
(
extraFields
.
has
(
"ccms_offer"
)
||
extraFields
.
has
(
"type"
)
))
{
mCampaignList
.
add
(
camp
);
}
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyManager.java
View file @
8a2de98
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment