Back to project page DroidBilling.
The source code is released under:
MIT License
If you think the Android project DroidBilling listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.techery.droid.billings.models; /*w w w . ja v a 2s . com*/ import com.techery.droid.billings.Constants; import com.techery.droid.billings.utils.ResponseHelper; public class IabResult { int mResponse; String mMessage; public IabResult(int response, String message) { mResponse = response; if (message == null || message.trim().length() == 0) { mMessage = ResponseHelper.getResponseDesc(response); } else { mMessage = message + " (response: " + ResponseHelper.getResponseDesc(response) + ")"; } } public int getResponse() { return mResponse; } public String getMessage() { return mMessage; } public boolean isSuccess() { return mResponse == Constants.BILLING_RESPONSE_RESULT.OK; } public boolean isFailure() { return !isSuccess(); } public String toString() { return "IabResult: " + getMessage(); } }