rohfosho / CordovaCallNumberPlugin

Call a number directly from your cordova application.
MIT License
185 stars 151 forks source link

Uncaught TypeError: Cannot read property 'CallNumber' of undefined #24

Closed swanandvaidya closed 7 years ago

swanandvaidya commented 8 years ago

Error while calling this plugin i got error mentioned in title. Please help me whats the problem is CallNumber.js is correct ??

chiragandroid commented 8 years ago

i have the same issue of Cannot read property 'CallNumber' of undefined

CrackerakiUA commented 8 years ago

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.

kumquat601 commented 8 years ago

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).

maximooo commented 8 years ago

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 ??? :(

kumquat601 commented 8 years ago

@maximooo Do you check copying and pasting CallNumber.js into your www/ folder and importing into your index.html ???

maximooo commented 8 years ago

@kumquat0601 i did and still giving me same error anyone can help

cozzbie commented 7 years ago

If window.plugins is returning undefined, try window.cordova.plugins

606ep commented 7 years ago

It looks like installing plugin with: cordova plugin add https://github.com/Rohfosho/CordovaCallNumberPlugin.git

fixes this issue

thidasapankaja commented 7 years ago

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.

admiremasaga commented 7 years ago

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

abdelibbi commented 3 years ago

Hi everyone !! did someone found a solution to this issue ?? thanks for your reaction.

LimitlessDonald commented 3 years ago

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 :)