0

I'm using crashlytics + twitter kit + answers in one of my android projects. The answers is not picking up the events, in fabric.io it says it's waiting for my first event.

Here are my dependencies :

compile('com.twitter.sdk.android:twitter:2.3.2@aar') {
    transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
    transitive = true;
}
compile('com.crashlytics.sdk.android:answers:1.4.0@aar') {
    transitive = true;
}

The code to initialize:

TwitterAuthConfig authConfig = new TwitterAuthConfig(sharedPrefManager.getConsumerKey(), sharedPrefManager.getConsumerSecret());
    Fabric.with(getApplication(), new Answers(), new Crashlytics(), new Twitter(authConfig));

And the code to log the event:

PurchaseEvent purchaseEvent = new PurchaseEvent()
                        .putCustomAttribute("token", purchase.token)
                        .putItemName(purchase.sku)
                        .putItemType("somestuff")
                        .putItemId(purchase.orderId)
                        .putCustomAttribute("user_id", ((MainActivity)getmActivity()).getUser().getId())
                        .putSuccess(true);
purchaseEvent.putItemPrice(BigDecimal.valueOf(1.0));
purchaseEvent.putCurrency(Currency.getInstance("TRY"));
Answers.getInstance().logPurchase(purchaseEvent);
msecilmis
  • 348
  • 2
  • 11
  • TwitterCommunity is no longer used for questions on Fabric, I removed my comment to reduce any confusion. Try removing the Answers() call in your init code and from the app's build.gradle. Crashlytics includes Answers so there's no need to init it separately. – Mike Bonnell Nov 08 '17 at 15:03
  • Will try tomorrow, thanks. – msecilmis Nov 08 '17 at 15:06

0 Answers0