hi there ,
i create a new ionic project simple one only to try the online and offline event ,
ii have tried several ways and i always get the event fires 2 times ,
i have tried these:
window.Connection is the short had to check if the method is available.
Same thing as the status bar
if(window.StatusBar) {
// Set the statusbar to use the default style, tweak this to
// remove the status bar on iOS or change it to use white instead of dark colors.
StatusBar.styleDefault();
}
We are just checking if the functionality is there before calling any methods
Does this mean that if the app fires without internet connection the event will not get attached, therefore, will we lose the ability to notify the user if they have lost connection?
@enddynayn No, it’s actually checking for the objects/functions attached to window.Connection not the actual connection so you can use that online/offline with no problem.