前往主控台

Answers

public class Answers extends Kit<Boolean>

Constant Summary

String TAG

Public Constructor Summary

Public Method Summary

String
getIdentifier()
Must be implemented by Kit to allow plugin on-boarding
static Answers
String
void
logAddToCart(AddToCartEvent event)
Log an Add to Cart event to see users adding items to a shopping cart in real-time, understand how many users start the purchase flow, see which items are most popular, and track plenty of other important purchase-related metrics.
void
logContentView(ContentViewEvent event)
Log a Content View event to see users viewing content within your app in real-time and understand what content is most engaging, from the type or genre down to the specific id.
void
logCustom(CustomEvent event)
Log a Custom event to see user actions that are uniquely important for your app in real-time, to see how often they're performing these actions with breakdowns by different categories you add.
void
logInvite(InviteEvent event)
Log an Invite event to see existing users inviting other users and growing your user base in real-time, letting you understand which methods are the most successful.
void
logLevelEnd(LevelEndEvent event)
Log a Level End event to to see users finishing levels in real-time, letting you understand which levels see the most action, and see the scores users are achieving.
void
logLevelStart(LevelStartEvent event)
Log a Level Start event to see users starting levels in real-time, letting you understand which levels see the most action.
void
logLogin(LoginEvent event)
Log a Login event to see users logging into your app in real-time, understand how many users are logging in with different methods and their success rate logging into your app.
void
logPurchase(PurchaseEvent event)
Log a Purchase event to see your revenue in real-time, understand how many users are making purchases, see which items are most popular, and track plenty of other important purchase-related metrics.
void
logRating(RatingEvent event)
Log a Rating event to see users rating content within your app in real-time and understand what content is most engaging, from the type or genre down to the specific id.
void
logSearch(SearchEvent event)
Log a Search event to see users searching within your app in real-time and understand exactly what they're searching for.
void
logShare(ShareEvent event)
Log a Share event to see users sharing from your app in real-time, letting you understand what content they're sharing from the type or genre down to the specific id.
void
logSignUp(SignUpEvent event)
Log a Sign Up event to see users signing up for your app in real-time, understand how many users are signing up with different methods and their success rate signing up.
void
logStartCheckout(StartCheckoutEvent event)
Log a Start Checkout event to see users moving through the purchase funnel in real-time, understand how many users are doing this and how much they're spending per checkout, and see how it related to other important purchase-related metrics.
void
onException(Crash.FatalException exception)
void
onException(Crash.LoggedException exception)

Protected Method Summary

Boolean
doInBackground()
For heavy work to be done in initialization process on a background thread.
boolean
onPreExecute()
Called before initialization on the UI thread

Inherited Method Summary

Constants

public static final String TAG

Constant Value: "Answers"

Public Constructors

public Answers ()

Public Methods

public String getIdentifier ()

Must be implemented by Kit to allow plugin on-boarding

Returns
  • unique identifier

public static Answers getInstance ()

Returns

public String getVersion ()

Returns
  • Kit Version

public void logAddToCart (AddToCartEvent event)

Log an Add to Cart event to see users adding items to a shopping cart in real-time, understand how many users start the purchase flow, see which items are most popular, and track plenty of other important purchase-related metrics.

              // Example
              Answers.getInstance().logAddToCart(new AddToCartEvent()
              .putItemPrice(BigDecimal.valueOf(13.50))
              .putCurrency(Currency.getInstance("USD"))
              .putItemName("Answers Shirt")
              .putItemType("Apparel")
              .putItemId("sku-350"));
              
Parameters
event not null

public void logContentView (ContentViewEvent event)

Log a Content View event to see users viewing content within your app in real-time and understand what content is most engaging, from the type or genre down to the specific id.

              // Example
              Answers.getInstance().logContentView(new ContentViewEvent()
              .putContentName("Answers setup process super easy!")
              .putContentType("Technical documentation")
              .putContentId("article-350"));
              
Parameters
event not null

public void logCustom (CustomEvent event)

Log a Custom event to see user actions that are uniquely important for your app in real-time, to see how often they're performing these actions with breakdowns by different categories you add. Use a human-readable name for the name of the event, since this is how the event will appear in Answers.

              // Example
              Answers.getInstance().logCustom(new CustomEvent("Played Song")
              .putCustomAttribute("Track Name", "Stealing Fire")
              .putCustomAttribute("Artist Name", "Bob Moses")
              .putCustomAttribute("Length (s)", 305));
              
Parameters
event not null

public void logInvite (InviteEvent event)

Log an Invite event to see existing users inviting other users and growing your user base in real-time, letting you understand which methods are the most successful.

              // Example
              Answers.getInstance().logInvite(new InviteEvent()
              .putMethod("Twitter"));
              
Parameters
event not null

public void logLevelEnd (LevelEndEvent event)

Log a Level End event to to see users finishing levels in real-time, letting you understand which levels see the most action, and see the scores users are achieving.

              // Example
              Answers.getInstance().logLevelEnd(new LevelEndEvent()
              .putLevelName("Level 2A")
              .putScore(350)
              .putSuccess(true));
              
Parameters
event not null

public void logLevelStart (LevelStartEvent event)

Log a Level Start event to see users starting levels in real-time, letting you understand which levels see the most action.

              // Example
              Answers.getInstance().logLevelStart(new LevelStartEvent()
              .putLevelName("Level 2A"));
              
Parameters
event not null

public void logLogin (LoginEvent event)

Log a Login event to see users logging into your app in real-time, understand how many users are logging in with different methods and their success rate logging into your app.

              // Example
              Answers.getInstance().logLogin(new LoginEvent()
              .putMethod("Digits")
              .putSuccess(true));
              
Parameters
event not null

public void logPurchase (PurchaseEvent event)

Log a Purchase event to see your revenue in real-time, understand how many users are making purchases, see which items are most popular, and track plenty of other important purchase-related metrics.

              // Example
              Answers.getInstance().logPurchase(new PurchaseEvent()
              .putItemPrice(BigDecimal.valueOf(13.50))
              .putCurrency(Currency.getInstance("USD"))
              .putItemName("Answers Shirt")
              .putItemType("Apparel")
              .putItemId("sku-350")
              .putSuccess(true));
              
Parameters
event not null

public void logRating (RatingEvent event)

Log a Rating event to see users rating content within your app in real-time and understand what content is most engaging, from the type or genre down to the specific id.

              // Example
              Answers.getInstance().logRating(new RatingEvent()
              .putRating(4)
              .putContentName("Answers setup process super easy!")
              .putContentType("Technical documentation")
              .putContentId("article-350"));
              
Parameters
event not null

public void logSearch (SearchEvent event)

Log a Search event to see users searching within your app in real-time and understand exactly what they're searching for.

              // Example
              Answers.getInstance().logSearch(new SearchEvent()
              .putQuery("mobile analytics"));
              
Parameters
event not null

public void logShare (ShareEvent event)

Log a Share event to see users sharing from your app in real-time, letting you understand what content they're sharing from the type or genre down to the specific id.

              // Example
              Answers.getInstance().logShare(new ShareEvent()
              .putMethod("Twitter")
              .putContentName("Answers named #3 in Mobile Analytics")
              .putContentType("tweet")
              .putContentId("601072000245858305"));
              
Parameters
event not null

public void logSignUp (SignUpEvent event)

Log a Sign Up event to see users signing up for your app in real-time, understand how many users are signing up with different methods and their success rate signing up.

              // Example
              Answers.getInstance().logSignUp(new SignUpEvent()
              .putMethod("Digits")
              .putSuccess(true));
              
Parameters
event not null

public void logStartCheckout (StartCheckoutEvent event)

Log a Start Checkout event to see users moving through the purchase funnel in real-time, understand how many users are doing this and how much they're spending per checkout, and see how it related to other important purchase-related metrics.

              // Example
              Answers.getInstance().logStartCheckout(new StartCheckoutEvent()
              .putTotalPrice(BigDecimal.valueOf(123.50))
              .putCurrency(Currency.getInstance("USD"))
              .putItemCount(3));
              
Parameters
event not null

public void onException (Crash.FatalException exception)

Parameters
exception

public void onException (Crash.LoggedException exception)

Parameters
exception

Protected Methods

protected Boolean doInBackground ()

For heavy work to be done in initialization process on a background thread. The thread is run on the ExecutorService

protected boolean onPreExecute ()

Called before initialization on the UI thread