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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
46 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,37 +191,37 @@ public class ContextualActivity extends Activity implements View.OnClickListener
.
concat
(
":"
)
.
concat
(
mCCMS
.
getSessionId
()));
new
Thread
(()
->
{
if
(!
Thread
.
currentThread
().
isInterrupted
())
{
WarplyManager
.
submitOrder
(
new
CosmoteSubmitOrderRequest
()
.
setCommunicationUuid
(
""
)
.
setUserMsisdn
(
mSender
)
.
setSessionId
(
mCCMS
.
getSessionId
())
.
setBusinessService
(
mCCMS
.
getBusinessService
())
.
setNotificationMessage
(
mCCMS
.
getNotificationMessage
())
.
setOfferName
(
mCCMS
.
getOfferName
())
.
setProductType
(
mCCMS
.
getProductType
())
.
setProvDuration
(
mCCMS
.
getProvDuration
())
.
setNoOfRecurrance
(
mCCMS
.
getNoOfRecurrance
())
.
setPrice
(
mCCMS
.
getPrice
())
.
setDiscount
(
mCCMS
.
getDiscount
())
.
setVoiceCategory
(
mCCMS
.
getVoiceCategory
())
.
setDataCategory
(
mCCMS
.
getDataCategory
())
.
setMinsValue
(
mCCMS
.
getMinsValue
())
.
setDataValue
(
mCCMS
.
getDataValue
())
.
setProvStepValueMins
(
mCCMS
.
getProvStepValueMins
())
.
setOfferAudienceLevel
(
mCCMS
.
getOfferAudienceLevel
())
.
setUACIOfferTrackingCode
(
mCCMS
.
getUACIOfferTrackingCode
())
.
setOfferCode1
(
mCCMS
.
getOfferCode1
())
.
setScore
(
mCCMS
.
getScore
())
.
setZone
(
mCCMS
.
getZone
())
.
setWave
(
mCCMS
.
getWave
())
.
setValidity
(
mCCMS
.
getValidity
())
.
setTreatmentCode
(
mCCMS
.
getTreatmentCode
()),
mSubmitCallback
);
}
Thread
.
currentThread
().
interrupt
();
}).
start
();
//
new Thread(() -> {
//
if (!Thread.currentThread().isInterrupted()) {
WarplyManager
.
submitOrder
(
new
CosmoteSubmitOrderRequest
()
.
setCommunicationUuid
(
""
)
.
setUserMsisdn
(
mSender
)
.
setSessionId
(
mCCMS
.
getSessionId
())
.
setBusinessService
(
mCCMS
.
getBusinessService
())
.
setNotificationMessage
(
mCCMS
.
getNotificationMessage
())
.
setOfferName
(
mCCMS
.
getOfferName
())
.
setProductType
(
mCCMS
.
getProductType
())
.
setProvDuration
(
mCCMS
.
getProvDuration
())
.
setNoOfRecurrance
(
mCCMS
.
getNoOfRecurrance
())
.
setPrice
(
mCCMS
.
getPrice
())
.
setDiscount
(
mCCMS
.
getDiscount
())
.
setVoiceCategory
(
mCCMS
.
getVoiceCategory
())
.
setDataCategory
(
mCCMS
.
getDataCategory
())
.
setMinsValue
(
mCCMS
.
getMinsValue
())
.
setDataValue
(
mCCMS
.
getDataValue
())
.
setProvStepValueMins
(
mCCMS
.
getProvStepValueMins
())
.
setOfferAudienceLevel
(
mCCMS
.
getOfferAudienceLevel
())
.
setUACIOfferTrackingCode
(
mCCMS
.
getUACIOfferTrackingCode
())
.
setOfferCode1
(
mCCMS
.
getOfferCode1
())
.
setScore
(
mCCMS
.
getScore
())
.
setZone
(
mCCMS
.
getZone
())
.
setWave
(
mCCMS
.
getWave
())
.
setValidity
(
mCCMS
.
getValidity
())
.
setTreatmentCode
(
mCCMS
.
getTreatmentCode
()),
mSubmitCallback
);
//
}
//
Thread.currentThread().interrupt();
//
}).start();
}
private
void
askActivateDialog
()
{
...
...
@@ -245,13 +245,15 @@ public class ContextualActivity extends Activity implements View.OnClickListener
analyticsEvent
.
setParameter
(
"successful"
,
"false"
);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
analyticsEvent
));
mAlertDialogErrorActivating
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title
)
.
setMessage
(
R
.
string
.
cos_dlg_error_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogErrorActivating
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title
)
.
setMessage
(
R
.
string
.
cos_dlg_error_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
}
}
private
void
successActivatingDialog
()
{
...
...
@@ -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
(()
->
{
if
(
status
==
1
)
successActivatingDialog
();
else
errorActivatingDialog
();
});
//
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