I have an Ionic 3 App that has lot of http request on a server. I also want to detect how fast or slow the connection of the user is depending on his/her connection.
For example like in the Spotify and Messenger App that they can detect slow connections of the user.
I tried using ionic/network but the downlinkMax property always returns null
. Tested on browser and Android device.
Here is the code below.
async initializeApp() {
await this.platform.ready()
console.log(this.network.downlinkMax) // always returns null
}
I also tried this solution but this is not an accurate measure of the speed if the network is too fast as they have said and it may also affect the performance of the app due to another request.
Any other thoughts?
Apreciate if someone could help. Thanks in advance.