WebsiteBeaver / CordovaCall

Cordova CallKit & ConnectionService plugin for iOS/Android that displays the native call UI for VOIP apps
MIT License
196 stars 91 forks source link

UI not showing in Android #54

Closed sido420 closed 6 years ago

sido420 commented 6 years ago

I tried using the UI in Android 5.1.1 but nothing showed (not even the err cb gets called).

cordova.plugins.CordovaCall.sendCall('fdaf', 'rwerqwerew', function(){}, function(){ console.log(arguments); } )
D-Marc1 commented 6 years ago

ConnectionService became available starting from Android Marshmallow.

sido420 commented 6 years ago

Just figured that out but it should not initialize or throw an err etc.

How do I check if the plugin is unavailable for a certain version so I could fallback on a different UI? I see the plugin is initialized and no errs are thrown

sido420 commented 6 years ago

This is what I see in Android (when I print cordova.plugins.CordovaCall through Chrome DevTools). It looks like everything should work.

cordova.plugins.CordovaCall
{setAppName: ƒ, setIcon: ƒ, setRingtone: ƒ, setIncludeInRecents: ƒ, setDTMFState: ƒ, …}
callNumber
:
ƒ (to, success, error)
connectCall
:
ƒ (success, error)
endCall
:
ƒ (success, error)
mute
:
ƒ (success, error)
on
:
ƒ (e, f)
receiveCall
:
ƒ (from, id, success, error)
sendCall
:
ƒ (to, id, success, error)
setAppName
:
ƒ (appName, success, error)
setDTMFState
:
ƒ (value, success, error)
setIcon
:
ƒ (iconName, success, error)
setIncludeInRecents
:
ƒ (value, success, error)
setRingtone
:
ƒ (ringtoneName, success, error)
setVideo
:
ƒ (value, success, error)
speakerOff
:
ƒ (success, error)
speakerOn
:
ƒ (success, error)
unmute
:
ƒ (success, error)
__proto__
:
Object
sido420 commented 6 years ago

There are limits on iOS version as well, so it'd be lots of string manipulation to check if it is supported or not. Also, the version numbers might change in future hence breaking existing code.