Showing
2 changed files
with
13 additions
and
3 deletions
... | @@ -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-cosbeta75' | 5 | + PUBLISH_VERSION = '4.5.4-cosbeta76' |
6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' |
7 | } | 7 | } |
8 | 8 | ... | ... |
... | @@ -146,6 +146,16 @@ public class VolleyTransformer implements Listener<JSONObject>, ErrorListener { | ... | @@ -146,6 +146,16 @@ public class VolleyTransformer implements Listener<JSONObject>, ErrorListener { |
146 | 146 | ||
147 | WarpUtils.log("*************************************************"); | 147 | WarpUtils.log("*************************************************"); |
148 | 148 | ||
149 | + if (response.has("result")) { | ||
150 | + JSONObject obj = response.optJSONObject("result"); | ||
151 | + if (obj != null) { | ||
152 | + if (obj.has("status") && obj.optString("status").equals("accepted")) { | ||
153 | + mListener.onSuccess(response); | ||
154 | + return; | ||
155 | + } | ||
156 | + } | ||
157 | + } | ||
158 | + | ||
149 | if (response.has("code")) { | 159 | if (response.has("code")) { |
150 | mListener.onSuccess(response); | 160 | mListener.onSuccess(response); |
151 | return; | 161 | return; |
... | @@ -168,8 +178,8 @@ public class VolleyTransformer implements Listener<JSONObject>, ErrorListener { | ... | @@ -168,8 +178,8 @@ public class VolleyTransformer implements Listener<JSONObject>, ErrorListener { |
168 | // Check for server related error. | 178 | // Check for server related error. |
169 | int serverResult = response.optInt(WARPLY_STATUS); | 179 | int serverResult = response.optInt(WARPLY_STATUS); |
170 | 180 | ||
171 | - if(serverResult == WarpConstants.RESULT_CODE_ERROR || serverResult == WarpConstants.RESULT_CODE_NO_ACCESS | 181 | + if (serverResult == WarpConstants.RESULT_CODE_ERROR || serverResult == WarpConstants.RESULT_CODE_NO_ACCESS |
172 | - || serverResult == WarpConstants.RESULT_CODE_INVALID_CAMPAIGN) { | 182 | + || serverResult == WarpConstants.RESULT_CODE_INVALID_CAMPAIGN) { |
173 | mListener.onSuccess(response); | 183 | mListener.onSuccess(response); |
174 | return; | 184 | return; |
175 | } | 185 | } | ... | ... |
-
Please register or login to post a comment