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 101 forks source link

Empty phoneNumber string #97

Open ravargash opened 2 years ago

ravargash commented 2 years ago

Expected behaviour

Phone number field should give a valid data

Actual behaviour

Phone number field is emply

I'm seeing this behaviour on

I am using

Hardware models

Samsung Galaxy J7

OS versions

Android 8.1.0

I've checked these

So how can we reproduce this?

Create Ionic/ng project npm install cordova-plugin-sim npm install @ionic-native/sim add Sim to the provider list in app.module.ts Inject Sim in the constructor of any module (ie: app.component.ts) add something like

this.Sim.requestReadPermission().then( () => console.log('Permission granted'), () => console.log('Permission denied') ); ... this.Sim.getSimInfo() .then( info => { console.log(info); } )

ionic build ionic cap add android run android studio son gradle does its magic ionic cap run android -l --host=0.0.0.0

That info object will have its phoneNumber field as an empty string

AbuobaidaMustafa commented 2 years ago

I am facing the same issue any suggestion please ?