pbakondy / cordova-plugin-sim

:cherries: A cordova plugin to get the device's SIM data (carrier name, mcc mnc, country code, telephonenumber, etc)
MIT License
163 stars 100 forks source link

Dual-SIM not detected #56

Closed moradec closed 7 years ago

moradec commented 7 years ago

Expected behaviour

Expected to get information about inserted cards calling "getSimInfo".

Actual behaviour

Properties "cards", "activeSubscriptionInfoCount" and "activeSubscriptionInfoCountMax" are missing.

I'm seeing this behaviour on

I am using

Hardware models

Archos 50c Neon

OS versions

Android 4.4.2 cordova 5.1.1

I've checked these

So how can we reproduce this?

I am testing with several devices. All devices are above Android-Version 5 and the plugin is working. Just with this Dual-SIM device and Android 4.4.2 it seems to be a problem.

pbakondy commented 7 years ago

Properties "cards", "activeSubscriptionInfoCount" and "activeSubscriptionInfoCountMax" are provided by SubscriptionManager API. SubscriptionManager API is available from Android API level 22. Android 4.4.2 is API level 19

akash-pal commented 7 years ago

But i have this same problem on Redmi Note 3 which is currently running on Android Marshmallow. So frankly this issue is not closed.

I only get information regarding the first sim.

pbakondy commented 7 years ago

Did you request permissions with requestReadPermission() ?

akash-pal commented 7 years ago

yes i did , then only i got the full information. I have another query.

How to distinguish when User Denies a permission from when user ticks "Never Ask Again" and then Denies?

pbakondy commented 7 years ago

I never tested. Do you have a bug?

akash-pal commented 7 years ago

Well yes sort of. When I deny permission first time, the next time the "Never Ask again" options comes. If you tap of that option and deny then . The Permission Denied Message is showed in both cases. So there is no way to differentiate?