mWarplyInitializer = Warply.getInitializer(this, new WarplyReadyCallback() {
@Override
public void onWarplyReady() {
//Maybe go to next Activity or whatever
}
@Override
public void onWarplyInitTimeOut() {
}
@Override
public void onWarplyPermissionsDenied() {
}
});
}
1c.
@Override
protected void onResume() {
super.onResume();
mWarplyInitializer.initWithPermissions(this);
}
1d. If we have a BaseActivity that other activities extend it, optionally (or in the starting activity), we can track when our application created, resumed or paused.
The “gift” parameter refers to the category of the product (gift, fruit, other custom category etc) that has been created on the engage platform. Empty parameter or without the .setProductFilter method, we will get all the products from all categories that have been created on the engage platform.
* The setLanguage method is used to search on the language we provide.
private CallbackReceiver<MerchantList> mShopsReceiver = new CallbackReceiver<MerchantList>() {
@Override
public void onSuccess(MerchantList result) {
}
@Override
public void onFailure(int errorCode) {
}
};
4. Content
The “Article” parameter refers to the category that each content has been created on the engage platform. Empty parameter or without the .setContentCategory method, we will get all content from all categories that have been created on the engage platform.
Respectively and in combination with content category we also have the .setTags method that refers to keywords every content item may has (i.e fun, beach, book etc).
* The .setTags method takes an list with keyword names as string.
* The setLanguage method is used to search on the language we provide.
* setOptin -> If we want to change the communications (i.e info via newsletter or sms or both, same for personalized), if true then we set the below fields (all are boolean):
private CallbackReceiver<JSONObject> mRedeemCouponReceiver = new CallbackReceiver<JSONObject>() {
@Override
public void onSuccess(JSONObject result) {
}
@Override
public void onFailure(int errorCode) {
}
};
28. Forgot Password
From the response json we check if status == 1 that means success, everything else means an error (like in onFailure also).
The setId field must be one of email or msisdn.
* Note: If the setId field is email then we first make the (28 : Forgot Password request) and then the (29 : Reset Password request).
* Note: If the setId field is msisdn then we first make the (30 : Request OTP request) and then the (29 : Reset Password request) without the need of the (28 : Forgot Password request).