However, not all mobile devices support phone calls, such as the iPad.
How can I programmatically determine whether a device supports voice calling or not using titanium?
Unfortunately there is no way to detect device capabilities. But there are several workarounds depending on what you want to do:
Ti.Platform.openURL('callto:<number>');
. There is also a canOpenURL()
method - but its not available on android.The canOpenURL()
method would be useful especially for android to determine whether the system is able to do phone calls or not. This question was also dicussed on Appcelerator Q&A.
Conclusion: Detecting capabilities needs to be solved on your own. In one of my apps i used the second solution regardless the device is able to do phone calls.