|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.fortumo.android.Fortumo
public class Fortumo
A helper class for querying statuses of messages after the payment process is complete. Especially useful if message status was returned as MESSAGE_STATUS_PENDING. Also provides facilities to enable or disable logging (by default logging is disabled).
| Field Summary | |
|---|---|
static int |
MESSAGE_STATUS_BILLED
Constant value for message billing status indicating that payment was successful. |
static int |
MESSAGE_STATUS_FAILED
Constant value for message billing status indicating that payment failed. |
static int |
MESSAGE_STATUS_NOT_SENT
Constant value for message billing status indicating that no payment has been made. |
static int |
MESSAGE_STATUS_PENDING
Constant value for message billing status indicating that payment is still pending. |
| Method Summary | |
|---|---|
static void |
disablePaymentBroadcast(android.content.Context context)
Disable PAYMENT_STATUS_CHANGED broadcast. |
static void |
enablePaymentBroadcast(android.content.Context context,
java.lang.String permission)
Enables the PAYMENT_STATUS_CHANGED broadcast. |
static int |
getLocalNonConsumablePaymentStatus(android.content.Context context,
java.lang.String productName)
Queries local SQLite database for payment status. |
static int |
getLocalNonConsumablePaymentStatus(android.content.Context context,
java.lang.String serviceId,
java.lang.String appSecret,
java.lang.String productName)
Similar to getLocalNonConsumablePaymentStatus(Context, String) but allows you to override the Fortumo service
properties (service id, in-app secret). |
static int |
getNonConsumablePaymentStatus(android.content.Context context,
java.lang.String productName)
Allows the application to query a non-consumable payment status by productId. |
static int |
getNonConsumablePaymentStatus(android.content.Context context,
java.lang.String serviceId,
java.lang.String appSecret,
java.lang.String productName)
Similar to getNonConsumablePaymentStatus(Context, String) but allows you to override the Fortumo service
properties (service id, in-app secret). |
static PaymentResponse |
getPaymentResponse(android.content.Context context,
long messageId)
Allows the application to query message status later. |
static boolean |
isPaymentBroadcastEnabled(android.content.Context context)
|
static boolean |
isSupportedOperator(android.content.Context context)
Allows the application to query if user's carrier is supported by Fortumo and your service. |
static boolean |
isSupportedOperator(android.content.Context context,
java.lang.String serviceId,
java.lang.String appSecret)
Allows the application to query if user's carrier is supported by Fortumo. |
static void |
setFlurryEnabled(boolean flurryEnabled)
Deprecated. |
static void |
setLoggingEnabled(boolean loggingEnabled)
Enables logging of errors. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MESSAGE_STATUS_NOT_SENT
public static final int MESSAGE_STATUS_PENDING
public static final int MESSAGE_STATUS_BILLED
public static final int MESSAGE_STATUS_FAILED
| Method Detail |
|---|
public static PaymentResponse getPaymentResponse(android.content.Context context,
long messageId)
throws java.lang.IllegalArgumentException
context - messageId - ID of the message as received from a PaymentResponse.getMessageId() method call.
java.lang.IllegalArgumentException - message with the ID was not found
public static int getNonConsumablePaymentStatus(android.content.Context context,
java.lang.String productName)
context - productName - productName of the message as specified when calling PaymentRequestBuilder.setProductName(String)
NB: Only latin alphanumeric characters, dash ('-', hyphen-minus, U+002D) and underscore ('_', low line, U+005F) are supported
and the value is truncated to 32 characters.
MESSAGE_STATUS_NOT_SENT,
MESSAGE_STATUS_PENDING,
MESSAGE_STATUS_BILLED,
MESSAGE_STATUS_FAILED
public static int getNonConsumablePaymentStatus(android.content.Context context,
java.lang.String serviceId,
java.lang.String appSecret,
java.lang.String productName)
getNonConsumablePaymentStatus(Context, String) but allows you to override the Fortumo service
properties (service id, in-app secret).
context - serviceId - The service id the payment was made from (overrides the default service id)appSecret - The in-app secret of the serviceproductName - productName of the message as specified when calling PaymentRequestBuilder.setProductName(String)
NB: Only latin alphanumeric characters, dash ('-', hyphen-minus, U+002D) and underscore ('_', low line, U+005F) are supported
and the value is truncated to 32 characters.
MESSAGE_STATUS_NOT_SENT,
MESSAGE_STATUS_PENDING,
MESSAGE_STATUS_BILLED,
MESSAGE_STATUS_FAILED
public static int getLocalNonConsumablePaymentStatus(android.content.Context context,
java.lang.String productName)
context - productName - productName of the message as specified when calling PaymentRequestBuilder.setProductName(String)
NB: Only latin alphanumeric characters, dash ('-', hyphen-minus, U+002D) and underscore ('_', low line, U+005F) are supported
and the value is truncated to 32 characters.
MESSAGE_STATUS_NOT_SENT,
MESSAGE_STATUS_PENDING,
MESSAGE_STATUS_BILLED,
MESSAGE_STATUS_FAILED
public static int getLocalNonConsumablePaymentStatus(android.content.Context context,
java.lang.String serviceId,
java.lang.String appSecret,
java.lang.String productName)
getLocalNonConsumablePaymentStatus(Context, String) but allows you to override the Fortumo service
properties (service id, in-app secret).
context - serviceId - The service id the payment was made from (overrides the default service id)appSecret - The in-app secret of the serviceproductName - productName of the message as specified when calling PaymentRequestBuilder.setProductName(String)
NB: Only latin alphanumeric characters, dash ('-', hyphen-minus, U+002D) and underscore ('_', low line, U+005F) are supported
and the value is truncated to 32 characters.
MESSAGE_STATUS_NOT_SENT,
MESSAGE_STATUS_PENDING,
MESSAGE_STATUS_BILLED,
MESSAGE_STATUS_FAILEDpublic static boolean isSupportedOperator(android.content.Context context)
context -
public static boolean isSupportedOperator(android.content.Context context,
java.lang.String serviceId,
java.lang.String appSecret)
isSupportedOperator(Context) but allows overriding the default serviceId and appSecret parameters.
context - serviceId - A service id, will override the default oneappSecret - The in-app secret of the service
public static void setLoggingEnabled(boolean loggingEnabled)
loggingEnabled - true if error-logging should be enabled@Deprecated public static void setFlurryEnabled(boolean flurryEnabled)
public static void enablePaymentBroadcast(android.content.Context context,
java.lang.String permission)
MESSAGE_STATUS_PENDING.
permission - String naming a permission that a receiver must hold in order to receive your broadcast. If null, no permission is required.public static void disablePaymentBroadcast(android.content.Context context)
context - public static boolean isPaymentBroadcastEnabled(android.content.Context context)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||