How to use network ping in ionic 2 app


#1

hi guys ,
I am developing an ionic 2 app that needs ping functionality , i have installed cordova-plugin-ping but the plugin does not work on ionic 2 also this plugin is just for android platform

I’ve found some other npm packages like : tcpie an net-ping-3 , is it possible to integrate these packages into ionic 2 app , if so , how can i achieve that ? or is there any other way to implement ping functionality in ionic 2 ?

thank you all …


#2

There is actually a PR for iOS support for this Cordova plugin:

I would fork the plugin, integrate the iOS PR and see if this already works.


#3

I installed cordova-plugin-ping and i imported like this :

import * as Ping from "../../../plugins/cordova-plugin-ping/www/ping.js";

when I use it in the class and run the app I get this error :

Runtime Error
Cannot find module "cordova/utils"

am I doing something wrong ?


#4

anybody know how to do this ?
I really need this guys ,


#5

can anyone suggest a solution for ping in ionic 2?