Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get user information in Crashlytics

I am using Crashlytics in my application and I wanted to get user id and email along with each crash. I did something like this:

Crashlytics.setUserEmail(tokenModel.getEmail());
Crashlytics.setUserIdentifier(String.valueOf(tokenModel.getPk()));

I am doing this in my login screen, after the user has provided his email and successfully registered with the app, so as to get user id. The problem is, I am not getting these data in the crash reports.

What is the lifecycle and working of Crashlytics in above context? Do I need to set these fields every time the app opens?

like image 368
Amit Tiwari Avatar asked Jan 14 '16 10:01

Amit Tiwari


People also ask

How do I check my Crashlytics logs?

Once you have Crashlytics up and running in your app, you can navigate to Crashlytics in your Firebase Console underneath 'Quality' and start reviewing the reports as they come in. If this page still tells you to setup, build or run your app then you have not correctly setup Crashlytics in your app (see Usage).

Is Crashlytics deprecated?

Old versions of your app still using the Fabric Crashlytics SDK will not break once it's deprecated, however they will no longer submit crash reports. But it seems like it will just continue to work as per normal after this date until further notice.


2 Answers

I am not sure if it needs to be done every time you launch the app and the Crashlytics docs don't explicitly say it neither.

I know that we do it with every launch and it works - provided user info is displayed properly in the dashboard.

My suggestion would be to try send this information every time you initalize Crashlytics with Fabric.with(this, new Crashlytics());, as soon as you have your user data provided (for example after fetching his user profile from your server).

like image 189
Rafal Zawadzki Avatar answered Oct 25 '22 01:10

Rafal Zawadzki


if you are using this Crashlytics.setUserIdentifier(""); you can check in data tab in firebase. Fabric.with(this, new Crashlytics()); working fine.

enter image description here

like image 36
Arul Pandian Avatar answered Oct 25 '22 01:10

Arul Pandian