JavaScript
{dialog.object}getConnectionType Method
Syntax
{dialog.Object}.getConnectionType()
Description
Returns the type of connection the device has. (May not return reliable information if not running in a Cordova shell).
Discussion
Possible return values are: 'none', 'connected_unknowntype', 'ethernet', 'wifi', '2g', '3g', '4g', and 'genericcell'.
Example
var connectionType = {dialog.Object}.getConnectionType();
For Android be sure to include the 'Connection' or 'Network information' plugin.
See Also