0

how to find internet speed in ionic application and which is the best way to do it ? Is there any plugin to find internet Speed?

Gopinath Kaliappan
  • 6,929
  • 8
  • 37
  • 60

2 Answers2

1

There's a Network Information plugin for cordova/ionic that might help determine the network, and then you can go from there. Install it like this:

cordova plugin add org.apache.cordova.network-information

Use it like:

$ionicPlatform.ready(function() {
    if(window.Connection) {
        if(navigator.connection.type == Connection.NONE) {
        ...
        }
    }
}

The available options are:
Connection.UNKNOWN
Connection.ETHERNET
Connection.WIFI
Connection.CELL_2G
Connection.CELL_3G
Connection.CELL_4G
Connection.NONE

Here's a blog post that might help.

Chewpers
  • 2,430
  • 5
  • 23
  • 30
1

Using JavaScript pure you can have an approximate numerical result, see here

I think this is best way to do it

Community
  • 1
  • 1
AdsHan
  • 465
  • 4
  • 14