简体   繁体   中英

Do I need to make my android app a profile owner app, or have special carrier permissions to use IMEI number. What do I require to achieve it ??

According to docs: 在此处输入图像描述

PS 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

在此处输入图像描述

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM