Closed sido420 closed 6 years ago
ConnectionService became available starting from Android Marshmallow.
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
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
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.
I tried using the UI in Android 5.1.1 but nothing showed (not even the err cb gets called).