Serial Number and BT MAC in Android 10+

Hello @Mireia_Moya ,

To read the Serial Number on Datalogic Android 10 devices you can use the “SERIAL_NUMBER” static field made available within the com.datalogic.device.info.SYSTEM class starting from the release 1.27 of Datalogic SDK (see com.datalogic.device.info.SYSTEM reference documentation).

//Android 10, SDK 1.27, any app
return com.datalogic.device.info.SYSTEM.SERIAL_NUMBER

See also the detailed post we published just in these days: How to read the Serial Number on Datalogic Android Devices

.

About the Bluetooth MAC address, the method to read is BluetoothAdapter.getAddress(), but unfortunately the situation is similar to the SerialNumber. As stated in the article Android 6.0 Changes - Access to Hardware Identifier, to "provide users with greater data protection […] Android removed programmatic access to the device’s local hardware identifier for apps using the Wi-Fi and Bluetooth APIs. The WifiInfo.getMacAddress() and the BluetoothAdapter.getAddress() methods now return a constant value of 02:00:00:00:00:00".
The only exception, then, is for System Apps that can gain the android.permission.LOCAL_MAC_ADDRESS restricted permission, but unavailable for third party apps.

See also: Source.android - Immutable Device IDs

Today, October 2021, Datalogic SDKs do not include any direct method to access the Bluetooth MAC address nor Wifi MAC address. We took note of this need and we will consider it for future improvements.

Meanwhile, if you need to overcome this Android Limitation, please get in contact with our Tech Support team by filling the module https://www.datalogic.com/eng/contact-us/technical-support-cts-8.html.

Simone Callegari
Mobile Products L3 Specialist SW Engineer