Panagiotis Triantafyllou

new keys

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4.6rc1'
PUBLISH_VERSION = '4.5.4.6rc2'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -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();
}
};
}
......