com.globalcharge.android
Class Dialogs

java.lang.Object
  extended by com.globalcharge.android.Dialogs

public class Dialogs
extends java.lang.Object


Constructor Summary
Dialogs()
           
 
Method Summary
static GalDialog getConfirmationDialog(android.content.DialogInterface.OnCancelListener onCancelListener, java.lang.String i18nMessage, java.lang.String i18nTitle, android.content.Context context, ClientConfig config, BillingManager billingManager, Product product)
           
static GalDialog getFailureNotificationDialog(android.content.DialogInterface.OnCancelListener onCancelListener, BillingManager billingManager, java.lang.String i18nMessage, java.lang.String i18nTitle, android.content.Context context, ClientConfig config, Product product)
           
static GalDialog getForceUpdateNotificationDialog(android.content.DialogInterface.OnCancelListener onCancelListener, BillingManager billingManager, java.lang.String i18nMessage, java.lang.String i18nTitle, android.content.Context context, ClientConfig config, java.lang.String url)
           
static GalDialog getIndeterminateProgressDialog(android.content.DialogInterface.OnCancelListener onCancelListener, BillingManager billingManager, android.content.Context context, ClientConfig config, java.lang.String message)
          Fetches a themed indeterminate progress dialog.
static GalDialog getInformationDialog(android.content.DialogInterface.OnCancelListener onCancelListener, BillingManager billingManager, java.lang.String i18nMessage, java.lang.String i18nTitle, android.content.Context context, ClientConfig config)
           
static GalDialog getNotificationDialog(android.content.DialogInterface.OnCancelListener onCancelListener, BillingManager billingManager, java.lang.String i18nMessage, java.lang.String i18nTitle, android.content.Context context, ClientConfig config, Product product)
           
static GalDialog getProductSelectionDialog(android.content.DialogInterface.OnCancelListener onCancelListener, java.util.List<Product> products, BillingManager billingManager, android.content.Context context, ClientConfig config)
          Retrieves a themed dialog which presents a list of products to the user to select from.
static GalDialog getSpinnerDialog(android.content.DialogInterface.OnCancelListener onCancelListener, BillingManager billingManager, java.lang.String i18nMessage, java.lang.String i18nTitle, android.content.Context context, ClientConfig config)
           
static GalDialog getSuccessNotificationDialog(android.content.DialogInterface.OnCancelListener onCancelListener, BillingManager billingManager, java.lang.String i18nMessage, java.lang.String i18nTitle, android.content.Context context, ClientConfig config, Product product)
           
static TimedProgressDialog getTimedProgressDialog(android.content.DialogInterface.OnCancelListener onCancelListener, BillingManager billingManager, android.content.Context context, ClientConfig config, java.lang.String message, java.lang.String title)
          Fetches a themed progress dialog which fills up as time passes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dialogs

public Dialogs()
Method Detail

getIndeterminateProgressDialog

public static GalDialog getIndeterminateProgressDialog(android.content.DialogInterface.OnCancelListener onCancelListener,
                                                       BillingManager billingManager,
                                                       android.content.Context context,
                                                       ClientConfig config,
                                                       java.lang.String message)
Fetches a themed indeterminate progress dialog. Remember to set listeners using setOnCancelListener().

Parameters:
context - The context to create the dialog with
config - The client configuration, null for defaults.
message - The message to show in the dialog
message - The title to show in the dialog
Returns:
A Gal dialog with a progress spinner and cancel button

getTimedProgressDialog

public static TimedProgressDialog getTimedProgressDialog(android.content.DialogInterface.OnCancelListener onCancelListener,
                                                         BillingManager billingManager,
                                                         android.content.Context context,
                                                         ClientConfig config,
                                                         java.lang.String message,
                                                         java.lang.String title)
Fetches a themed progress dialog which fills up as time passes. It will be almost full by the expected time duration and will only be completely full when the timeout has been reached.

Remember to set listeners using setTimeoutNotifier() and setOnCancelListener(). Dismissing the dialog when your background task is completed will stop you receiving a timeout event.

Parameters:
context - The context to create the dialog with
config - The client configuration, null for defaults.
message - The message to show in the dialog
msTimeout - The time taken for the progress dialog to complete.
msExpectedTime - The time taken for the progress dialog to almost complete.
Returns:
The timed progress dialog

getProductSelectionDialog

public static GalDialog getProductSelectionDialog(android.content.DialogInterface.OnCancelListener onCancelListener,
                                                  java.util.List<Product> products,
                                                  BillingManager billingManager,
                                                  android.content.Context context,
                                                  ClientConfig config)
Retrieves a themed dialog which presents a list of products to the user to select from. Depending on the client and products Terms and Conditions, a Privacy Policy and a Support link are given as links in the dialog.

Parameters:
products - The products to display
context - The context with which to create the dialog
config - The client configuration, null for defaults.
Returns:

getNotificationDialog

public static GalDialog getNotificationDialog(android.content.DialogInterface.OnCancelListener onCancelListener,
                                              BillingManager billingManager,
                                              java.lang.String i18nMessage,
                                              java.lang.String i18nTitle,
                                              android.content.Context context,
                                              ClientConfig config,
                                              Product product)

getFailureNotificationDialog

public static GalDialog getFailureNotificationDialog(android.content.DialogInterface.OnCancelListener onCancelListener,
                                                     BillingManager billingManager,
                                                     java.lang.String i18nMessage,
                                                     java.lang.String i18nTitle,
                                                     android.content.Context context,
                                                     ClientConfig config,
                                                     Product product)

getSuccessNotificationDialog

public static GalDialog getSuccessNotificationDialog(android.content.DialogInterface.OnCancelListener onCancelListener,
                                                     BillingManager billingManager,
                                                     java.lang.String i18nMessage,
                                                     java.lang.String i18nTitle,
                                                     android.content.Context context,
                                                     ClientConfig config,
                                                     Product product)

getForceUpdateNotificationDialog

public static GalDialog getForceUpdateNotificationDialog(android.content.DialogInterface.OnCancelListener onCancelListener,
                                                         BillingManager billingManager,
                                                         java.lang.String i18nMessage,
                                                         java.lang.String i18nTitle,
                                                         android.content.Context context,
                                                         ClientConfig config,
                                                         java.lang.String url)

getInformationDialog

public static GalDialog getInformationDialog(android.content.DialogInterface.OnCancelListener onCancelListener,
                                             BillingManager billingManager,
                                             java.lang.String i18nMessage,
                                             java.lang.String i18nTitle,
                                             android.content.Context context,
                                             ClientConfig config)

getConfirmationDialog

public static GalDialog getConfirmationDialog(android.content.DialogInterface.OnCancelListener onCancelListener,
                                              java.lang.String i18nMessage,
                                              java.lang.String i18nTitle,
                                              android.content.Context context,
                                              ClientConfig config,
                                              BillingManager billingManager,
                                              Product product)

getSpinnerDialog

public static GalDialog getSpinnerDialog(android.content.DialogInterface.OnCancelListener onCancelListener,
                                         BillingManager billingManager,
                                         java.lang.String i18nMessage,
                                         java.lang.String i18nTitle,
                                         android.content.Context context,
                                         ClientConfig config)