Reputation: 26
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
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