pbakondy/cordova-plugin-sim

Empty phoneNumber string

Opened this issue · 1 comments

Expected behaviour

Phone number field should give a valid data

Actual behaviour

Phone number field is emply

I'm seeing this behaviour on

  • iOS device
  • iOS simulator
  • Android device
  • Android emulator

I am using

  • cordova
  • ionic
  • PhoneGap
  • PhoneGap Developer App
  • Intel XDK
  • Intel App Preview
  • Telerik
  • Other:

Hardware models

Samsung Galaxy J7

OS versions

Android 8.1.0

I've checked these

  • It happens on a fresh Cordova CLI project as well.
  • I'm waiting for deviceready to fire.
  • My JavaScript has no errors (window.onerror catches nothing).
  • I'm using the latest cordova library, Android SDK, Xcode, etc.

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

I am facing the same issue any suggestion please ?