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-11-01 13:56:16 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0305e420eb5ac3b870c7c12fb77361418d228791
0305e420
1 parent
eb3fa5b4
new keys
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
warply_android_sdk/build.gradle
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ContextualActivity.java
warply_android_sdk/build.gradle
View file @
0305e42
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.4.6rc
1
'
PUBLISH_VERSION
=
'4.5.4.6rc
2
'
PUBLISH_ARTIFACT_ID
=
'warply-android-sdk'
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ContextualActivity.java
View file @
0305e42
...
...
@@ -191,8 +191,8 @@ public class ContextualActivity extends Activity implements View.OnClickListener
.
concat
(
":"
)
.
concat
(
mCCMS
.
getSessionId
()));
new
Thread
(()
->
{
if
(!
Thread
.
currentThread
().
isInterrupted
())
{
//
new Thread(() -> {
//
if (!Thread.currentThread().isInterrupted()) {
WarplyManager
.
submitOrder
(
new
CosmoteSubmitOrderRequest
()
.
setCommunicationUuid
(
""
)
.
setUserMsisdn
(
mSender
)
...
...
@@ -219,9 +219,9 @@ public class ContextualActivity extends Activity implements View.OnClickListener
.
setValidity
(
mCCMS
.
getValidity
())
.
setTreatmentCode
(
mCCMS
.
getTreatmentCode
()),
mSubmitCallback
);
}
Thread
.
currentThread
().
interrupt
();
}).
start
();
//
}
//
Thread.currentThread().interrupt();
//
}).start();
}
private
void
askActivateDialog
()
{
...
...
@@ -245,6 +245,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener
analyticsEvent
.
setParameter
(
"successful"
,
"false"
);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
analyticsEvent
));
if
(!
isFinishing
())
{
mAlertDialogErrorActivating
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title
)
.
setMessage
(
R
.
string
.
cos_dlg_error_subtitle
)
...
...
@@ -253,6 +254,7 @@ public class ContextualActivity extends Activity implements View.OnClickListener
})
.
show
();
}
}
private
void
successActivatingDialog
()
{
LoyaltySDKFirebaseEventModel
analyticsEvent
=
new
LoyaltySDKFirebaseEventModel
();
...
...
@@ -291,17 +293,18 @@ public class ContextualActivity extends Activity implements View.OnClickListener
@Override
public
void
onSuccess
(
JSONObject
result
)
{
int
status
=
result
.
optInt
(
"status"
,
2
);
runOnUiThread
(()
->
{
//
runOnUiThread(() -> {
if
(
status
==
1
)
successActivatingDialog
();
else
errorActivatingDialog
();
});
//
});
}
@Override
public
void
onFailure
(
int
errorCode
)
{
runOnUiThread
(()
->
errorActivatingDialog
());
// runOnUiThread(() -> errorActivatingDialog());
errorActivatingDialog
();
}
};
}
...
...
Please
register
or
login
to post a comment