public class

AppAction

extends Object
implements Parcelable
java.lang.Object
   ↳ com.usebutton.sdk.models.AppAction

Class Overview

This is the main class holding all information regarding an AppAction, if you're implementing a custom button UI please refer to the Custom Button UI guide for more information. See getAction(String, ButtonContext, Button.ActionListener) and Preview for code examples.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Methods
static AppAction fromDTO(ButtonDTO dto)
Footer getFooter()
Header getHeader()
ListBody getListBody()
MetaInfo getMeta()
Preview getPreview()
This object holds information about the preview for this app action, you will typically render this text & icon as a button or element that the user can click Most partners would just start the regular Button Card flow by invoking invokePreview(Context).
Product getProduct()
boolean hasGroups()
boolean hasProduct()
void invokeFooter(Context context)
Invoke the footer element of a card, this will start the target application or open the Play Store.
void invokeFooter(Context context, int intentFlags)
Invoke the footer element of a card, this will start the target application or open the Play Store.
void invokeInventory(Context context, Inventory inventory)
Invoke an inventory item which will either open the target app for this item or start installation.
void invokeInventory(Context context, Inventory inventory, int intentFlags)
Invoke an inventory item which will either open the target app for this item or start installation.
void invokePreview(Context context, int intentFlags)
Invoke the Preview (after a user clicked it) and show the appropriate card.
void invokePreview(Context context)
Invoke the Preview (after a user clicked it) and show the appropriate card.
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Public Methods

public static AppAction fromDTO (ButtonDTO dto)

public Footer getFooter ()

public Header getHeader ()

public ListBody getListBody ()

public MetaInfo getMeta ()

public Preview getPreview ()

This object holds information about the preview for this app action, you will typically render this text & icon as a button or element that the user can click Most partners would just start the regular Button Card flow by invoking invokePreview(Context).

public Product getProduct ()

public boolean hasGroups ()

public boolean hasProduct ()

public void invokeFooter (Context context)

Invoke the footer element of a card, this will start the target application or open the Play Store.

public void invokeFooter (Context context, int intentFlags)

Invoke the footer element of a card, this will start the target application or open the Play Store.

Parameters
intentFlags special intent intentFlags that will be used when starting the target application, most people will use invokePreview(Context)

public void invokeInventory (Context context, Inventory inventory)

Invoke an inventory item which will either open the target app for this item or start installation.

public void invokeInventory (Context context, Inventory inventory, int intentFlags)

Invoke an inventory item which will either open the target app for this item or start installation.

Parameters
intentFlags special intent intentFlags that will be used when starting the target application, most people will use invokePreview(Context)

public void invokePreview (Context context, int intentFlags)

Invoke the Preview (after a user clicked it) and show the appropriate card.

Parameters
intentFlags special intent intentFlags that will be used when starting the target application, most people will use invokePreview(Context)

public void invokePreview (Context context)

Invoke the Preview (after a user clicked it) and show the appropriate card.

public void writeToParcel (Parcel dest, int flags)