如何在Android中将用户信息设置为Crashlytics API [英] How to set user information to Crashlytics api in Android

查看:90
本文介绍了如何在Android中将用户信息设置为Crashlytics API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将用户信息设置为Android App中的crashlytics中的崩溃报告,这样将有助于我找出哪些用户经历了给定的崩溃。我进行了探索,发现有3个API可以在崩溃报告中设置用户信息。



这些都是

  void Crashlytics.setUserIdentifier(String identifier) ; 

void Crashlytics.setUserName(字符串名称);

void Crashlytics.setUserEmail(字符串电子邮件);

建议使用所有API。所有文档都记录在



您通常希望尽快设置它们(随着数据到达),并且所有信息都已初始化。


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

解决方案

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.

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

这篇关于如何在Android中将用户信息设置为Crashlytics API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆