Showing
8 changed files
with
21 additions
and
12 deletions
1 | # {@link ly.warp.sdk.utils.WarplyProperty} | 1 | # {@link ly.warp.sdk.utils.WarplyProperty} |
2 | 2 | ||
3 | # The app uuid the warply sdk need to connect to the engage server | 3 | # The app uuid the warply sdk need to connect to the engage server |
4 | -# cosmote demo app f83dfde1145e4c2da69793abb2f579af | 4 | +# dev f83dfde1145e4c2da69793abb2f579af |
5 | +# prod 0086a2088301440792091b9f814c2267 | ||
5 | Uuid=f83dfde1145e4c2da69793abb2f579af | 6 | Uuid=f83dfde1145e4c2da69793abb2f579af |
6 | 7 | ||
7 | # If we need to see logs in Logcat | 8 | # If we need to see logs in Logcat | ... | ... |
... | @@ -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("6010962478"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990 | 39 | + .setGuid("7000000826"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990 |
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-cosbeta86' | 5 | + PUBLISH_VERSION = '4.5.4-cosbeta87' |
6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' | 6 | PUBLISH_ARTIFACT_ID = 'warply-android-sdk' |
7 | } | 7 | } |
8 | 8 | ... | ... |
... | @@ -154,15 +154,23 @@ public enum Warply { | ... | @@ -154,15 +154,23 @@ public enum Warply { |
154 | * not, it throws a runtime exception with a message describing the reason | 154 | * not, it throws a runtime exception with a message describing the reason |
155 | */ | 155 | */ |
156 | private void isInitializedOrThrow() { | 156 | private void isInitializedOrThrow() { |
157 | - if (mContext == null) | 157 | + if (mContext == null) { |
158 | WarpUtils.log("Warply has not been initialized, call init(Context) first"); | 158 | WarpUtils.log("Warply has not been initialized, call init(Context) first"); |
159 | - if (mContext.get() == null) | 159 | + return; |
160 | + } | ||
161 | + if (mContext.get() == null) { | ||
160 | WarpUtils.log("Warply has not been initialized, call init(Context) first"); | 162 | WarpUtils.log("Warply has not been initialized, call init(Context) first"); |
163 | + return; | ||
164 | + } | ||
161 | String apiKey = WarplyProperty.getAppUuid(mContext.get()); | 165 | String apiKey = WarplyProperty.getAppUuid(mContext.get()); |
162 | - if (apiKey == null) | 166 | + if (apiKey == null) { |
163 | WarpUtils.log("Warply application UUID has not been set in the Manifest"); | 167 | WarpUtils.log("Warply application UUID has not been set in the Manifest"); |
164 | - if ((apiKey.length() != 32) && (apiKey.length() != 36)) | 168 | + return; |
169 | + } | ||
170 | + if ((apiKey.length() != 32) && (apiKey.length() != 36)) { | ||
165 | WarpUtils.log("Warply application UUID has not been set correclty in the Manifest, key got: " + apiKey); | 171 | WarpUtils.log("Warply application UUID has not been set correclty in the Manifest, key got: " + apiKey); |
172 | + return; | ||
173 | + } | ||
166 | } | 174 | } |
167 | 175 | ||
168 | /** | 176 | /** | ... | ... |
... | @@ -366,7 +366,7 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene | ... | @@ -366,7 +366,7 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene |
366 | seasonalCLick.setTitle(dataItem.getSeasonalList().getTitle()); | 366 | seasonalCLick.setTitle(dataItem.getSeasonalList().getTitle()); |
367 | seasonalCLick.setLoyaltyPackageId(dataItem.getSeasonalList().getLoyaltyPackageId()); | 367 | seasonalCLick.setLoyaltyPackageId(dataItem.getSeasonalList().getLoyaltyPackageId()); |
368 | seasonalCLick.setImageUrl(dataItem.getSeasonalList().getImageUrl()); | 368 | seasonalCLick.setImageUrl(dataItem.getSeasonalList().getImageUrl()); |
369 | - seasonalCLick.setContext(GiftsForYouActivity.this); | 369 | + seasonalCLick.setContext(this); |
370 | EventBus.getDefault().post(new WarplyEventBusManager(seasonalCLick)); | 370 | EventBus.getDefault().post(new WarplyEventBusManager(seasonalCLick)); |
371 | 371 | ||
372 | LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); | 372 | LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); |
... | @@ -588,7 +588,7 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene | ... | @@ -588,7 +588,7 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene |
588 | try { | 588 | try { |
589 | JSONObject extraFields = WarpJSONParser.getJSONFromString(camp.getExtraFields()); | 589 | JSONObject extraFields = WarpJSONParser.getJSONFromString(camp.getExtraFields()); |
590 | if (extraFields != null) { | 590 | if (extraFields != null) { |
591 | - if (extraFields.length() == 0 || !(/*extraFields.has("ccms_offer") || */extraFields.has("type"))) { | 591 | + if (extraFields.length() == 0 || !(extraFields.has("ccms_offer") || extraFields.has("type"))) { |
592 | gfyList.add(camp); | 592 | gfyList.add(camp); |
593 | } | 593 | } |
594 | } | 594 | } | ... | ... |
... | @@ -528,7 +528,7 @@ public class MoreForYouActivity extends Activity implements View.OnClickListener | ... | @@ -528,7 +528,7 @@ public class MoreForYouActivity extends Activity implements View.OnClickListener |
528 | try { | 528 | try { |
529 | JSONObject extraFields = WarpJSONParser.getJSONFromString(camp.getExtraFields()); | 529 | JSONObject extraFields = WarpJSONParser.getJSONFromString(camp.getExtraFields()); |
530 | if (extraFields != null) { | 530 | if (extraFields != null) { |
531 | - if (extraFields.length() == 0 || !(/*extraFields.has("ccms_offer") || */extraFields.has("type"))) { | 531 | + if (extraFields.length() == 0 || !(extraFields.has("ccms_offer") || extraFields.has("type"))) { |
532 | mfyList.add(camp); | 532 | mfyList.add(camp); |
533 | } | 533 | } |
534 | } | 534 | } | ... | ... |
... | @@ -89,7 +89,7 @@ public class WarplyHealthService extends Service implements SensorEventListener | ... | @@ -89,7 +89,7 @@ public class WarplyHealthService extends Service implements SensorEventListener |
89 | mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); | 89 | mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); |
90 | mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); | 90 | mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); |
91 | // registerStepSensor(); | 91 | // registerStepSensor(); |
92 | - Warply.getInitializer(this).init(); | 92 | +// Warply.getInitializer(this).init(); |
93 | WarplyManager.getPacingDetails(new PacingDetailsRequest(), mPacingCallback); | 93 | WarplyManager.getPacingDetails(new PacingDetailsRequest(), mPacingCallback); |
94 | } | 94 | } |
95 | 95 | ... | ... |
... | @@ -1146,7 +1146,7 @@ public class WarplyManagerHelper { | ... | @@ -1146,7 +1146,7 @@ public class WarplyManagerHelper { |
1146 | try { | 1146 | try { |
1147 | JSONObject extraFields = WarpJSONParser.getJSONFromString(camp.getExtraFields()); | 1147 | JSONObject extraFields = WarpJSONParser.getJSONFromString(camp.getExtraFields()); |
1148 | if (extraFields != null) { | 1148 | if (extraFields != null) { |
1149 | - if (extraFields.length() == 0 || !(/*extraFields.has("ccms_offer") || */extraFields.has("type"))) { | 1149 | + if (extraFields.length() == 0 || !(extraFields.has("ccms_offer") || extraFields.has("type"))) { |
1150 | mCampaignList.add(camp); | 1150 | mCampaignList.add(camp); |
1151 | } | 1151 | } |
1152 | } | 1152 | } | ... | ... |
-
Please register or login to post a comment