Closed swanandvaidya closed 7 years ago
i have the same issue of Cannot read property 'CallNumber' of undefined
I have same issue.
When i am doing cordova plugin list, among other plugins i see mx.ferreyra.callnumber 0.0.2 "Cordova Call Number Plugin"
.
When i am doing console.log(window.plugins);
i don't see the plugin on android device, but when i am opening browser in pc i see it.
When I try this plugin in phonegap desktop app + phonegap app, it doesn't work. But after phonegap build, it works perfectly in android device (Andorid 4.4.2 Galaxy note 2).
am having the same issue and it was working fine month ago .... can any one help me please i spent two day looking for solution ??? :(
@maximooo Do you check copying and pasting CallNumber.js into your www/ folder and importing into your index.html ???
@kumquat0601 i did and still giving me same error anyone can help
If window.plugins
is returning undefined, try window.cordova.plugins
It looks like installing plugin with:
cordova plugin add https://github.com/Rohfosho/CordovaCallNumberPlugin.git
fixes this issue
Today I added this plugin for my app. And I'm getting the error.
I added the plugin using cordova plugin add https://github.com/Rohfosho/CordovaCallNumberPlugin.git and tried changing window.plugins to window.cordova.plugins too. But still no good.
change this
window.plugins.CallNumber.callNumber(onSuccess, onError, number, bypassAppChooser);
to
window.plugins.CallNumber.callNumber(onSuccess, onError, number, false);
this worked for me by adding false instead of bypassAppChooser
Hi everyone !! did someone found a solution to this issue ?? thanks for your reaction.
Hello guys . Just in case someone is having this issue.
@abdelibbi @thidasapankaja
I found a solution to this. this worked :
<script src="cordova.js"></script>
I forgot to add that. Add it to the first file that loads, which is often index.html .
We often miss the simple things :)
Error while calling this plugin i got error mentioned in title. Please help me whats the problem is CallNumber.js is correct ??