install |
Step 2 :
import { Network } from '@capacitor/network
constructor() {
this.checkNetworkConnection();
}
checkNetworkConnection(){
Network.addListener('networkStatusChange', status => {
console.log('Network status changed', status);
});
const logCurrentNetworkStatus = async () => {
const status = await Network.getStatus();
console.log('Network status:', status);
};
}
No comments:
Post a Comment