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

requestReadPermission #73

Open
14 tasks
fabianglace opened this issue Sep 25, 2017 · 5 comments
Open
14 tasks

requestReadPermission #73

fabianglace opened this issue Sep 25, 2017 · 5 comments

Comments

@fabianglace
Copy link

Expected behaviour

requestReadPermission does not ask for permissions in android. Once permissions is given manually then sim info can be gotten.

Actual behaviour

nothing

I'm seeing this behaviour on

Remove this hint: these checkboxes can be checked like this: [x]

  • iOS device
  • iOS simulator
  • [x ] Android device
  • Android emulator

I am using

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

Hardware models

Samsung

OS versions

Android 5.2.2

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?

Provide the used components versions (cordova, ionic, etc).

Provide the steps to reproduce the issue.

Provide files, sources if available.

@pbakondy
Copy link
Owner

This is the expected behavior. Once the app receives permission it will not request again.

@fabianglace
Copy link
Author

When installed for the first time, it does not ask for permissions. Even after using it as proposed...only if I set the permissions manually. does it get the sim information...In other words requestReadPermission() does not fire up when it should...

@fabianglace
Copy link
Author

I'm using android 6 (read_phone_state) which you mentioned does not work in the plugin if it was meant to.

@fabianglace
Copy link
Author

window.plugins.sim.hasReadPermission(simPermission, requestSimPermission);

function simPermission(){
readSimCard();
}

function requestSimPermission(){
window.plugins.sim.requestReadPermission(readSimCard, noSimPermission);
}

@fabianglace
Copy link
Author

I realize when making other permission request the sim request is skipped. I am now getting the request when set to first call...

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

2 participants