Network Interface

Improve this doc

Network interface information plugin for Cordova/PhoneGap that supports Android, Blackberry 10, Browser, iOS, and Windows Phone 8.

Repo: https://github.com/salbahra/cordova-plugin-networkinterface

Installation

  1. Install the Cordova and Ionic Native plugins:
    $ ionic cordova plugin add cordova-plugin-networkinterface
    $ npm install --save @ionic-native/network-interface
    
  2. Add this plugin to your app's module

Supported platforms

Usage

import { NetworkInterface } from '@ionic-native/network-interface';


constructor(private networkInterface: NetworkInterface) { }

...

this.networkInterface.getWiFiIPAddress(function (ip) { alert(ip); });
this.networkInterface.getCarrierIPAddress(function (ip) { alert(ip); });

Instance Members

getIPAddress()

getWiFiIPAddress(success, error)

Gets the WiFi IP address

Param Type Details
success Function

Callback used when successful

error Function

Callback used when failure

getCarrierIPAddress(success, error)

Gets the wireless carrier IP address

Param Type Details
success Function

Callback used when successful

error Function

Callback used when failure

API

Native

General