Network Interface
Network interface information plugin for Cordova/PhoneGap that supports Android, Blackberry 10, Browser, iOS, and Windows Phone 8.
Cordovaの問題で困っていますか?
本格的なプロジェクトを構築している場合、トラブルシューティングに時間を費やす余裕はありません。Ionicのエキスパートが、保守、サポート、統合に関する公式サポートを提供しています。
インストール
Ionic Native Enterprise はIonic Teamが完全にサポートしメンテナンスしているプラグインを利用できます。 詳しくみる か、エンタープライズプラグインに興味があれば 連絡ください
サポートしているプラットフォーム
- Android
- BlackBerry 10
- Browser
- iOS
- Windows
- Windows Phone
利用方法
React
Angular
import { NetworkInterface } from '@ionic-native/network-interface/ngx';
constructor( private networkInterface: NetworkInterface ) {
this.networkInterface.getWiFiIPAddress()
.then(address => console.info(`IP: ${address.ip}, Subnet: ${address.subnet}`))
.catch(error => console.error(`Unable to get IP: ${error}`));
this.networkInterface.getCarrierIPAddress()
.then(address => console.info(`IP: ${address.ip}, Subnet: ${address.subnet}`))
.catch(error => console.error(`Unable to get IP: ${error}`));
const url = 'www.github.com';
this.networkInterface.getHttpProxyInformation(url)
.then(proxy => console.info(`Type: ${proxy.type}, Host: ${proxy.host}, Port: ${proxy.port}`))
.catch(error => console.error(`Unable to get proxy info: ${error}`));
}

