Pati
Pati

Reputation: 26

Multiple android developers using Crashlytics of Fabric.io

We are a team of developers and just started using Crashlytics. Most of us have the exact same model of device that is used for testing.

When a crash happens, how can we identify which device it relates to. In other words, how do we know if a crash is on the device of Developer A or B.

Upvotes: 0

Views: 453

Answers (1)

tompadre
tompadre

Reputation: 807

The most correct way to distinct devices one from another is by sending IMEI when crash happens. There aren't two identical IMEIs in the world.

public void sendImei(Context vContext) {

    String imei;
    TelephonyManager tm = (TelephonyManager) vContext.getSystemService(Context.TELEPHONY_SERVICE);
    if (tm != null)
        imei = tm.getDeviceId();
    if (imei == null || imei.length() == 0)
        imei = Secure.getString(vContext.getContentResolver(), Secure.ANDROID_ID);

    Crashlytics.setUserIdentifier(String.valueOf(imei));

}

Upvotes: 2

Related Questions