8

I am trying to set user information to crash reports in crashlytics in Android App, so that it will help me to find out which of our users experienced a given crash. I have explored and found there are 3 APIs can set user information in crash report.

Those are,

void Crashlytics.setUserIdentifier(String identifier);

void Crashlytics.setUserName(String name);

void Crashlytics.setUserEmail(String email);

It is recommended to use all the APIs. All documented at http://support.crashlytics.com/knowledgebase/articles/120548-how-do-i-set-user-information-

But I have no idea, 1. How to get user-identifier, name and email details, which are input to those APIs? 2. Which place in program to call these crashlytics APIs?

Please share some ideas, how to implement this.

Regards

Annada

Annada
  • 1,075
  • 1
  • 18
  • 21

3 Answers3

11


Looks like detail UI in Fabric has been changed.

  1. Select one of crash issue.
  2. Click Version in Recently Activityenter image description here

  3. On detail page top right hand corner, you should see affected user information.enter image description here

Yoon Lee
  • 2,029
  • 22
  • 27
5

If your application uses some form of user identification (i.e. login, email, phone, device specific id) you can use that as crashlitics user information. I suppose you can generate user id when your app is first launched and save it in shared preferences, for example. It'll be shown at top-right corner of detailed crash view.

i.e. I set ID and name as soon as user authenticates in my app.

enter image description here

You typically want to set them as soon as possible (as your data arrives) and all info has been initialized.

aleien
  • 786
  • 1
  • 9
  • 22
2

For new Firebase api

FirebaseCrashlytics.getInstance().setUserId("12345")

For More Customize your Firebase Crashlytics crash reports

creativecoder
  • 1,470
  • 1
  • 14
  • 23