public class

Button

extends ButtonPrivate
java.lang.Object
   ↳ ButtonPrivate
     ↳ com.usebutton.sdk.Button

Summary

Public Methods
synchronized static Button getButton(Context context)
Gets the shared Button instance & lazily instantiates if not yet created.
static Context getButtonContext()
static boolean isStarted()
void logout()
Clears any session information and effectively creates a new customer.
void start()
Initializes Button in the host application.
void stop()
Ceases all Button activity.
void willDisplayPromotion(String placementId, PlacementContext context, ButtonDropin.Listener listener)
Easy way to check if a promotion will be filled given a placement ID and context.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static synchronized Button getButton (Context context)

Gets the shared Button instance & lazily instantiates if not yet created.

Returns
  • Button the shared Button instance

public static Context getButtonContext ()

public static boolean isStarted ()

Returns
  • true if Button have been started. If false, please call .start()

public void logout ()

Clears any session information and effectively creates a new customer. Use when e.g. the user logs out or changes in the host application.

public void start ()

Initializes Button in the host application.

public void stop ()

Ceases all Button activity.

public void willDisplayPromotion (String placementId, PlacementContext context, ButtonDropin.Listener listener)

Easy way to check if a promotion will be filled given a placement ID and context.