public class Answers
extends io.fabric.sdk.android.Kit<Boolean>
| Modifier and Type | Field and Description |
|---|---|
static String |
TAG |
| Constructor and Description |
|---|
Answers() |
| Modifier and Type | Method and Description |
|---|---|
protected Boolean |
doInBackground() |
String |
getIdentifier() |
static Answers |
getInstance() |
String |
getVersion() |
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(io.fabric.sdk.android.services.common.Crash.FatalException exception) |
void |
onException(io.fabric.sdk.android.services.common.Crash.LoggedException exception) |
protected boolean |
onPreExecute() |
public static final String TAG
public void logCustom(CustomEvent event)
// Example
Answers.getInstance().logCustom(new CustomEvent("Played Song")
.putCustomAttribute("Track Name", "Stealing Fire")
.putCustomAttribute("Artist Name", "Bob Moses")
.putCustomAttribute("Length (s)", 305));
event - not nullpublic void logPurchase(PurchaseEvent event)
// 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));
event - not nullpublic void logLogin(LoginEvent event)
// Example
Answers.getInstance().logLogin(new LoginEvent()
.putMethod("Digits")
.putSuccess(true));
event - not nullpublic void logShare(ShareEvent event)
// Example
Answers.getInstance().logShare(new ShareEvent()
.putMethod("Twitter")
.putContentName("Answers named #3 in Mobile Analytics")
.putContentType("tweet")
.putContentId("601072000245858305"));
event - not nullpublic void logInvite(InviteEvent event)
// Example
Answers.getInstance().logInvite(new InviteEvent()
.putMethod("Twitter"));
event - not nullpublic void logSignUp(SignUpEvent event)
// Example
Answers.getInstance().logSignUp(new SignUpEvent()
.putMethod("Digits")
.putSuccess(true));
event - not nullpublic void logLevelStart(LevelStartEvent event)
// Example
Answers.getInstance().logLevelStart(new LevelStartEvent()
.putLevelName("Level 2A"));
event - not nullpublic void logLevelEnd(LevelEndEvent event)
// Example
Answers.getInstance().logLevelEnd(new LevelEndEvent()
.putLevelName("Level 2A")
.putScore(350)
.putSuccess(true));
event - not nullpublic void logAddToCart(AddToCartEvent event)
// Example
Answers.getInstance().logAddToCart(new AddToCartEvent()
.putItemPrice(BigDecimal.valueOf(13.50))
.putCurrency(Currency.getInstance("USD"))
.putItemName("Answers Shirt")
.putItemType("Apparel")
.putItemId("sku-350"));
event - not nullpublic void logStartCheckout(StartCheckoutEvent event)
// Example
Answers.getInstance().logStartCheckout(new StartCheckoutEvent()
.putTotalPrice(BigDecimal.valueOf(123.50))
.putCurrency(Currency.getInstance("USD"))
.putItemCount(3));
event - not nullpublic void logRating(RatingEvent event)
// Example
Answers.getInstance().logRating(new RatingEvent()
.putRating(4)
.putContentName("Answers setup process super easy!")
.putContentType("Technical documentation")
.putContentId("article-350"));
event - not nullpublic void logContentView(ContentViewEvent event)
// Example
Answers.getInstance().logContentView(new ContentViewEvent()
.putContentName("Answers setup process super easy!")
.putContentType("Technical documentation")
.putContentId("article-350"));
event - not nullpublic void logSearch(SearchEvent event)
// Example
Answers.getInstance().logSearch(new SearchEvent()
.putQuery("mobile analytics"));
event - not nullpublic void onException(io.fabric.sdk.android.services.common.Crash.LoggedException exception)
public void onException(io.fabric.sdk.android.services.common.Crash.FatalException exception)
protected boolean onPreExecute()
onPreExecute in class io.fabric.sdk.android.Kit<Boolean>protected Boolean doInBackground()
doInBackground in class io.fabric.sdk.android.Kit<Boolean>public String getIdentifier()
getIdentifier in class io.fabric.sdk.android.Kit<Boolean>public String getVersion()
getVersion in class io.fabric.sdk.android.Kit<Boolean>