changed structure based from cordova-plugin-network-information to cordova-plugin-dialogs