Retrieving Famoco ID programmatically
It can be interesting for an application to retrieve the Famoco ID programmatically to use it as a unique ID of the device and send it on an application server for instance. The Famoco ID uniquely identifies a devices and it survives factory reset.
For any Famoco device from the FX series or FP series running Android 6, you can simply retrieve the Famoco ID the following way:
return Build.SERIAL.toUpperCase();
For FX devices running Android 4.4, it is safer to embed this code that covers several methods to retrieve Famoco ID.
For PX series, it is not possible to retrieve the Famoco ID from an Android app.
For Android 8+, if you declare READ_PHONE_STATE permission:
return Build.getSerial();