Every device in Bugfender has a unique identifier, but you can associate extra data to a device in order to identify it easily.

Custom device data

If you want to associate a value (String, Integer, Boolean or Float) to a device you can do it with:

Bugfender.setDeviceString("user.email", "john@john.com");
Bugfender.setDeviceInteger("user.photo.image.width", 600);
Bugfender.setDeviceBoolean("user.is.logged", true);
Bugfender.setDeviceFloat("user.children", 3);

Also you can remove a specific value associated with the device, you can remove it with:

Bugfender.removeDeviceKey("user.children");

Bugfender identifier

Also Bugfender generates a random identifier for each mobile device that has your application installed. This is generated during the first execution and stored in the internal memory for next executions.

You can get that identifier using the getDeviceIdentifier method, so that you can show it on screen or send it to your server.

In case you’re wondering, we did this for a couple of reasons: in iOS, it is against Apple’s policy to collect identifiable information from the device, such as the MAC address or IMEI. On Android, the device serial number is not reliable enough because it can be changed for a specific device or sometimes happened that multiple devices have the same one.

Searching for devices

You can find devices using both the Bugfender identifier or any custom data you have associated to the device. You can learn more about the search syntax here.

Did this answer your question?