cordova.plugins.diagnostic
https://github.com/dpa99c/cordova-diagnostic-plugin
What
Plugin for iOS & Android is used to manage device settings such as Location, Bluetooth and WiFi. It enables management of run-time permissions, device hardware and core OS features.
How
- cordova.plugins.diagnostic.restart()
- Does a warm restart of the app by recreated the webview
- cordova.plugins.diagnostic.switchToSettings()
- Opens the platform specific(either android/ios) settings page for the app
- cordova.plugins.diagnostic.getPermissionsAuthorizationStatus()
- Returns the current authorisation status for multiple permissions.
- cordova.plugins.diagnostic.requestRuntimePermissions()
- Requests app to be granted authorisation for multiple runtime permissions.
Why
- cordova.plugins.diagnostic.restart()
- Used by the restart button on the bottom nav bar of the app
Runs when app is initialised.
- cordova.plugins.diagnostic.switchToSettings()
- Goes to the settings page if our required permissions are found to be denied, so the user can allow them.
- cordova.plugins.diagnostic.getPermissionsAuthorizationStatus()
- Checking the right permissions have been set.
- cordova.plugins.diagnostic.requestRuntimePermissions()
- Trigger a request of missing permissions.