Showing
5 changed files
with
11 additions
and
5 deletions
... | @@ -36,7 +36,7 @@ public class SplashActivity extends BaseActivity { | ... | @@ -36,7 +36,7 @@ public class SplashActivity extends BaseActivity { |
36 | public void onWarplyReady() { | 36 | public void onWarplyReady() { |
37 | if (!WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) { | 37 | if (!WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) { |
38 | WarplyManager.getCosmoteUser(new WarplyCosmoteUserRequest() | 38 | WarplyManager.getCosmoteUser(new WarplyCosmoteUserRequest() |
39 | - .setGuid("7000001407"), //6012049321, 6012049322, 6012049323 | 39 | + .setGuid("6012049139"), //6012049321, 6012049322, 6012049323 |
40 | mLoginReceiver); | 40 | mLoginReceiver); |
41 | } else { | 41 | } else { |
42 | startNextActivity(); | 42 | startNextActivity(); | ... | ... |
... | @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' | ... | @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' |
2 | 2 | ||
3 | ext { | 3 | ext { |
4 | PUBLISH_GROUP_ID = 'ly.warp' | 4 | PUBLISH_GROUP_ID = 'ly.warp' |
5 | - PUBLISH_VERSION = '4.5.4-cosbeta54' | 5 | + PUBLISH_VERSION = '4.5.4-cosbeta55' |
6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' |
7 | } | 7 | } |
8 | 8 | ... | ... |
... | @@ -109,7 +109,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe | ... | @@ -109,7 +109,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe |
109 | .setCouponsetUuid(mCouponset.getUuid()) | 109 | .setCouponsetUuid(mCouponset.getUuid()) |
110 | .setCommunicationUuid(mLoyalty.getSessionUUID()) | 110 | .setCommunicationUuid(mLoyalty.getSessionUUID()) |
111 | .setHasContextualOffer(true) | 111 | .setHasContextualOffer(true) |
112 | - .setUserMsisdn(WarplyManagerHelper.getConsumer().getMsisdn()) | 112 | + .setUserMsisdn(WarplyManagerHelper.getConsumer().getMsisdn()) //TODO: where to find the msisdn?? |
113 | .setBusinessService(mCcms.getBusinessService()) | 113 | .setBusinessService(mCcms.getBusinessService()) |
114 | .setOfferName(mCcms.getOfferName()) | 114 | .setOfferName(mCcms.getOfferName()) |
115 | .setProductType(mCcms.getProductType()) | 115 | .setProductType(mCcms.getProductType()) | ... | ... |
... | @@ -167,6 +167,12 @@ public class VolleyTransformer implements Listener<JSONObject>, ErrorListener { | ... | @@ -167,6 +167,12 @@ public class VolleyTransformer implements Listener<JSONObject>, ErrorListener { |
167 | 167 | ||
168 | // Check for server related error. | 168 | // Check for server related error. |
169 | int serverResult = response.optInt(WARPLY_STATUS); | 169 | int serverResult = response.optInt(WARPLY_STATUS); |
170 | + | ||
171 | + if(serverResult == WarpConstants.RESULT_CODE_ERROR || serverResult == WarpConstants.RESULT_CODE_NO_ACCESS | ||
172 | + || serverResult == WarpConstants.RESULT_CODE_INVALID_CAMPAIGN) { | ||
173 | + mListener.onSuccess(response); | ||
174 | + return; | ||
175 | + } | ||
170 | if (serverResult != WarpConstants.RESULT_CODE_SUCCESS) { | 176 | if (serverResult != WarpConstants.RESULT_CODE_SUCCESS) { |
171 | if ((serverResult == WarpConstants.RESULT_CODE_INVALID_WEB_ID) | 177 | if ((serverResult == WarpConstants.RESULT_CODE_INVALID_WEB_ID) |
172 | && (Warply.isInitialized())) | 178 | && (Warply.isInitialized())) | ... | ... |
... | @@ -2041,7 +2041,7 @@ public class WarplyManager { | ... | @@ -2041,7 +2041,7 @@ public class WarplyManager { |
2041 | @Override | 2041 | @Override |
2042 | public void onSuccess(JSONObject result) { | 2042 | public void onSuccess(JSONObject result) { |
2043 | int status = result.optInt("status", 2); | 2043 | int status = result.optInt("status", 2); |
2044 | - if (status == 1) | 2044 | + if (status == 1 || status == 4 || status == 5) |
2045 | receiver.onSuccess(result); | 2045 | receiver.onSuccess(result); |
2046 | else | 2046 | else |
2047 | receiver.onFailure(status); | 2047 | receiver.onFailure(status); |
... | @@ -2165,7 +2165,7 @@ public class WarplyManager { | ... | @@ -2165,7 +2165,7 @@ public class WarplyManager { |
2165 | @Override | 2165 | @Override |
2166 | public void onSuccess(JSONObject result) { | 2166 | public void onSuccess(JSONObject result) { |
2167 | int status = result.optInt("status", 2); | 2167 | int status = result.optInt("status", 2); |
2168 | - if (status == 1) | 2168 | + if (status == 1 || status == 3 || status == 4) |
2169 | receiver.onSuccess(result); | 2169 | receiver.onSuccess(result); |
2170 | else | 2170 | else |
2171 | receiver.onFailure(status); | 2171 | receiver.onFailure(status); | ... | ... |
-
Please register or login to post a comment