Reputation: 1737
Is there any way or package which I can use to detect to whether user is on WiFi or using cellular network.
Upvotes: 1
Views: 819
Reputation: 3856
You might want to try
const networkInformation = navigator.connection;
console.log(networkInformation);
For more info try https://developer.mozilla.org/en-US/docs/Web/API/Navigator/connection
Worth looking at Determine user's internet connection type via javascript or jquery as well.
Upvotes: 2