0

According to docs: enter image description here

P.S. I know it is a bad practice, but that's my client's requirement.

My client app requires IMEI number as parameter in an API call, to identify Vehicle owner in an android app. But I have two problems :

  1. READ_PRIVILEGED_PHONE_STATE Permission is only granted to system apps.

AndroidManifest.xml

  1. Using getDeviceId to get device identifiers is not recommended.

'getter for deviceId: String!' is deprecated. Deprecated in Java

enter image description here

Sweta Jain
  • 3,248
  • 6
  • 30
  • 50

1 Answers1

0

Well, for this kind of values (serial number, mac address) in Android 10+ only way is having your app as Device Owner.

Check this post to set a Device Owner app.