An ANE to determine if a device can make a phone call
If developers use the 'tel' URL scheme to make a phone call and the device isn't actually able to make a call it displays a somewhat unfriendly, and certainly obtuse error message: "Call Failed".
Conditions this ANE should detect include:
- Device is not a phone
- Device has no SIM card
- Device has a disabled SIM card
- Device is out of range of a cell signal
- Device is in airplane mode and can't make a call
- Permissions allow the app to use the 'tel' URL scheme
There may be more.
Developers can then test for this before displaying links or buttons to make a call, either to hide them, or at least respond to a user gesture with a more friendly message that has additional context, like "... because your phone is in airplane mode" or "there is no cellular signal available at the moment" or "this device isn't able to make phone calls".
Another idea might be to include this functionality in an ANE that queries more information, like device capabilities of all kinds, for example, device make, model, version, os version, capabilities, etc.