capacitor-plugin-diagnostics
v1.0.0
Published
rewrite of the cordova.plugins.diagnostic
Downloads
4
Readme
capacitor-plugin-diagnostics
rewrite of the cordova.plugins.diagnostic
Install
npm install capacitor-plugin-diagnostics
npx cap sync
API
isFeatureAuthorized(...)
requestAuthorization(...)
isGpsLocationEnabled()
getCurrentBatteryLevel()
- Interfaces
isFeatureAuthorized(...)
isFeatureAuthorized(options: RequestAuthorizationOptions) => Promise<RequestAuthorizationStatus>
| Param | Type |
| ------------- | ----------------------------------------------------------------------------------- |
| options
| RequestAuthorizationOptions |
Returns: Promise<RequestAuthorizationStatus>
requestAuthorization(...)
requestAuthorization(options: RequestAuthorizationOptions) => Promise<void>
| Param | Type |
| ------------- | ----------------------------------------------------------------------------------- |
| options
| RequestAuthorizationOptions |
isGpsLocationEnabled()
isGpsLocationEnabled() => Promise<{ enabled: boolean; }>
Returns: Promise<{ enabled: boolean; }>
getCurrentBatteryLevel()
getCurrentBatteryLevel() => Promise<{ level: number; }>
Returns: Promise<{ level: number; }>
Interfaces
RequestAuthorizationStatus
| Prop | Type |
| ---------------- | -------------------- |
| authorized
| boolean |
| state
| string |
RequestAuthorizationOptions
| Prop | Type |
| ------------- | ------------------- |
| feature
| string |
| mode
| string |