[Get Device Information] DeviceSerial is returning "unknown" since Android 10
Forge component by assif_tiger
Application Type
Mobile
Service Studio Version
11.10.13 (Build 39572)
Platform Version
11.7.3 (Build 7036)

Hi,

Since Android 10 (API Level 29) Google added restrictions to non-resettable hardware id's, which include both IMEI and serial number. (https://developer.android.com/training/articles/user-data-ids)

Since this component is using the Cordova Device API from OutSystems (OutSystems should update either this documentation or the api)_to get the serialnumber and is not handling any needed permissions, the GetDeviceSerial action is always returning 'unknown' for Android 10+.

I tried to add permissions to my application using this Android Permissions Plugin that i found in the Forge. It returns that the needed permission to get the device serial (READ_PRIVILEGED_PHONE_STATE) is successfully registered. Though the GetDeviceSerial action is still returning 'uknown' (i also checked it in console by hard calling the device.serial variable).

Do you have any ideas how to solve this issue?

Cheers!

DeviceObject.png

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.