Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

The user 10412 does not meet the requirements to access device identifiers. #94

Open
Polyscripts-Aashay opened this issue Dec 6, 2020 · 5 comments

Comments

@Polyscripts-Aashay
Copy link

Polyscripts-Aashay commented Dec 6, 2020

Android
I have already given the permission but still not getting SIM info.

result:
Unable to get sim info: The user 10412 does not meet the requirements to access device identifiers."

this.sim.getSimInfo().then(
  (info) => console.log('Sim info: ', info),
  (err) => console.log('Unable to get sim info: ', err)
);

@hrpatidar
Copy link

Getting the same for me. It mostly started coming after requesting permission. But without permission, not getting complete details of the sim.

@dodysat
Copy link

dodysat commented Feb 7, 2021

I also had the same problem on android 10

@adrienbarral
Copy link

adrienbarral commented Mar 17, 2021

I think this issue is linked to a new privacy policy on android 10. If I well understood, they restrict access to non resetable device property to applications that grant the READ_PRIVILEGED_PHONE_STATE permission. And this permission is only for System Applications.

There is more detail THERE

Methods that require this privilege are :

Build::getSerial()
TelephonyManager::getImei()
TelephonyManager::getDeviceId()
TelephonyManager::getMeid()
TelephonyManager::getSimSerialNumber()
TelephonyManager::getSubscriberId()

And in this plugin, getDeviceId, getSimSerialNumber and getDeviceId are used.

So I guess that with Android > 10, these informations will not be available for a non system application.

@Ashclan
Copy link

Ashclan commented Mar 30, 2021

I think this issue is linked to a new privacy policy on android 10. If I well understood, they restrict access to non resetable device property to applications that grant the READ_PRIVILEGED_PHONE_STATE permission. And this permission is only for System Applications.

There is more detail THERE

Methods that require this privilege are :

Build::getSerial()
TelephonyManager::getImei()
TelephonyManager::getDeviceId()
TelephonyManager::getMeid()
TelephonyManager::getSimSerialNumber()
TelephonyManager::getSubscriberId()

And in this plugin, getDeviceId, getSimSerialNumber and getDeviceId are used.

So I guess that with Android > 10, these informations will not be available for a non system application.

what the solution for this?

@adrienbarral
Copy link

@Ashclan : For me the solution is to modify this plugin.
The modification must check for android version. if version is > 10, then the plugin should not call methods that require privilege and return a JSON result without informations that can't be retrieved now.

Personally, I encounter this problem on a small application I do on my free time, so I didn't spent time on doing this patch. I just need the user phone number, and I prefer to add a small form asking user to enter it's phone number rather than modifying this plugin...
I don't really like to do Java on my freetime (even a little bit !) 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants