1.0.2 • Published 10 years ago

cordova-plugin-dns v1.0.2

Weekly downloads
92
License
Apache 2.0
Repository
bitbucket
Last release
10 years ago

Cordova DNS Plugin

A plugin for Apache Cordova that enables applications to manually resolve hostnames into an underlying network address. This is mostly useful for determining whether there is a problem with the device's DNS server configuration.

Usage

To install, simply add to your project as you would any other cordova plugin:

cordova plugin add cordova-plugin-dns

Once installed, you should be able to use the JavaScript function to resolve host names:

var hostname = 'myhost.example.com';

function success(address) {
    console.log('Resolved ' + hostname + ' to ' + address);
}

function failure(error) {
    console.log('Failed to resolve ' + hostname + ': ' + error);
}

cordova.plugins.dns.resolve(hostname, success, failure);
1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago