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

cordova-plugin-sim close my app in the first start in onRequestReadPermission #74

Open
5 of 16 tasks
tallensagreg opened this issue Oct 6, 2017 · 0 comments
Open
5 of 16 tasks

Comments

@tallensagreg
Copy link

Expected behaviour

cordova-plugin-sim close my app in the first start in onRequestReadPermission
after is ok

Actual behaviour

i usign build phonegap and my config.xml
with this config

I'm seeing this behaviour on

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

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

I am using

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

Hardware models

Oneplus 3

OS versions

Android 6.0.1

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?

n my firts start the app ask
"autoriser XX à effectuer et gérer des appels telephonique"..
but the app close automatiquely ..but the app work no probleme, just close
after i restart the app ask but dont close it's ok
"autoriser XX à accéder a vos contacts" and the app dont close its ok*

but for the ask phone in the first ask app close!!
my .js

try on android 6.0.x ==> may be is cli-7 and builder 2 ??
thank you for help and sorry for my bad english
function onDeviceReady() {
window.plugins.uniqueDeviceID.get(success, errorCallback);
var options = new ContactFindOptions();
options.filter="";
options.multiple=true;
var fields = ["displayName","phoneNumber"];

navigator.contacts.find(fields, onSuccess, onError, options);

requestSimPermission();
}

function readSimCard(){
window.plugins.sim.getSimInfo(successCallback, errorCallback); }

function simPermission(){
readSimCard(); }

function okread(result){
if (result==false) { console.log("okread:REquest");} else {console.log("okread:"+result);} }

function requestSimPermission(){
window.plugins.sim.requestReadPermission(readSimCard, noSimPermission); console.log("RequestSimPermission"); }

function noSimPermission(){ console.log('NoSimPermission');}

function successCallback(result) { console.log(result); }

function errorCallback(error) { console.log("erreurCallback:"+error); }

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

1 participant