cordova.plugins.diagnostic 7.2.10 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,378 +2,382 @@ Cordova diagnostic plugin [![Latest Stable Version](https://img.shields.io/npm/v
2
2
  =========================
3
3
 
4
4
  <!-- doctoc README.md --maxlevel=3 -->
5
- <!-- START doctoc generated TOC please keep comment here to allow auto update -->
6
- <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
7
-
8
-
9
- - [Overview](#overview)
10
- - [Important notes](#important-notes)
11
- - [Minimum supported versions](#minimum-supported-versions)
12
- - [Native environment required](#native-environment-required)
13
- - [Building for Android](#building-for-android)
14
- - [Installation](#installation)
15
- - [Using the Cordova/Phonegap/Ionic CLI](#using-the-cordovaphonegapionic-cli)
16
- - [AndroidX Library](#androidx-library)
17
- - [Specifying modules](#specifying-modules)
18
- - [Available modules](#available-modules)
19
- - [Reporting issues](#reporting-issues)
20
- - [Reporting a bug or problem](#reporting-a-bug-or-problem)
21
- - [Requesting a new feature](#requesting-a-new-feature)
22
- - [Usage](#usage)
23
- - [Core module](#core-module)
24
- - [switchToSettings()](#switchtosettings)
25
- - [Parameters](#parameters)
26
- - [Example usage](#example-usage)
27
- - [switchToWirelessSettings()](#switchtowirelesssettings)
28
- - [switchToMobileDataSettings()](#switchtomobiledatasettings)
29
- - [permissionStatus constants](#permissionstatus-constants)
30
- - [Android](#android)
31
- - [iOS](#ios)
32
- - [Example](#example)
33
- - [getPermissionAuthorizationStatus()](#getpermissionauthorizationstatus)
34
- - [Parameters](#parameters-1)
35
- - [Example usage](#example-usage-1)
36
- - [getPermissionsAuthorizationStatus()](#getpermissionsauthorizationstatus)
37
- - [Parameters](#parameters-2)
38
- - [Example usage](#example-usage-2)
39
- - [requestRuntimePermission()](#requestruntimepermission)
40
- - [Parameters](#parameters-3)
41
- - [Example usage](#example-usage-3)
42
- - [requestRuntimePermissions()](#requestruntimepermissions)
43
- - [Parameters](#parameters-4)
44
- - [Example usage](#example-usage-4)
45
- - [isRequestingPermission()](#isrequestingpermission)
46
- - [Example usage](#example-usage-5)
47
- - [registerPermissionRequestCompleteHandler()](#registerpermissionrequestcompletehandler)
48
- - [Parameters](#parameters-5)
49
- - [Example usage](#example-usage-6)
50
- - [isDataRoamingEnabled()](#isdataroamingenabled)
51
- - [Parameters](#parameters-6)
52
- - [Example usage](#example-usage-7)
53
- - [isADBModeEnabled()](#isadbmodeenabled)
54
- - [Parameters](#parameters-7)
55
- - [Example usage](#example-usage-8)
56
- - [isDeviceRooted()](#isdevicerooted)
57
- - [Parameters](#parameters-8)
58
- - [Example usage](#example-usage-9)
59
- - [isBackgroundRefreshAuthorized()](#isbackgroundrefreshauthorized)
60
- - [Parameters](#parameters-9)
61
- - [Example usage](#example-usage-10)
62
- - [getBackgroundRefreshStatus()](#getbackgroundrefreshstatus)
63
- - [Parameters](#parameters-10)
64
- - [Example usage](#example-usage-11)
65
- - [cpuArchitecture constants](#cpuarchitecture-constants)
66
- - [Android](#android-1)
67
- - [iOS](#ios-1)
68
- - [Example usage](#example-usage-12)
69
- - [getArchitecture()](#getarchitecture)
70
- - [Parameters](#parameters-11)
71
- - [Example usage](#example-usage-13)
72
- - [restart()](#restart)
73
- - [Parameters](#parameters-12)
74
- - [Example usage](#example-usage-14)
75
- - [enableDebug()](#enabledebug)
76
- - [Parameters](#parameters-13)
77
- - [Example usage](#example-usage-15)
78
- - [getCurrentBatteryLevel()](#getcurrentbatterylevel)
79
- - [Parameters](#parameters-14)
80
- - [Example usage](#example-usage-16)
81
- - [isAirplaneModeEnabled()](#isairplanemodeenabled)
82
- - [Parameters](#parameters-15)
83
- - [Example usage](#example-usage-17)
84
- - [isMobileDataEnabled()](#ismobiledataenabled)
85
- - [Parameters](#parameters-16)
86
- - [Example usage](#example-usage-18)
87
- - [isMobileDataAuthorized()](#ismobiledataauthorized)
88
- - [Parameters](#parameters-17)
89
- - [Example usage](#example-usage-19)
90
- - [isAccessibilityModeEnabled()](#isaccessibilitymodeenabled)
91
- - [Parameters](#parameters-18)
92
- - [Example usage](#example-usage-20)
93
- - [isTouchExplorationEnabled()](#istouchexplorationenabled)
94
- - [Parameters](#parameters-19)
95
- - [Example usage](#example-usage-21)
96
- - [getDeviceOSVersion()](#getdeviceosversion)
97
- - [Parameters](#parameters-20)
98
- - [Example usage](#example-usage-22)
99
- - [getBuildOSVersion()](#getbuildosversion)
100
- - [Parameters](#parameters-21)
101
- - [Example usage](#example-usage-23)
102
- - [isDebugBuild()](#isdebugbuild)
103
- - [Parameters](#parameters-22)
104
- - [Example usage](#example-usage-24)
105
- - [Location module](#location-module)
106
- - [locationMode constants](#locationmode-constants)
107
- - [Values](#values)
108
- - [Example](#example-1)
109
- - [locationAuthorizationMode constants](#locationauthorizationmode-constants)
110
- - [Values](#values-1)
111
- - [Example](#example-2)
112
- - [locationAccuracyAuthorization constants](#locationaccuracyauthorization-constants)
113
- - [Values](#values-2)
114
- - [isLocationAvailable()](#islocationavailable)
115
- - [Parameters](#parameters-23)
116
- - [Example usage](#example-usage-25)
117
- - [isLocationEnabled()](#islocationenabled)
118
- - [Parameters](#parameters-24)
119
- - [Example usage](#example-usage-26)
120
- - [isGpsLocationAvailable()](#isgpslocationavailable)
121
- - [Parameters](#parameters-25)
122
- - [Example usage](#example-usage-27)
123
- - [isGpsLocationEnabled()](#isgpslocationenabled)
124
- - [Parameters](#parameters-26)
125
- - [Example usage](#example-usage-28)
126
- - [isCompassAvailable()](#iscompassavailable)
127
- - [Parameters](#parameters-27)
128
- - [Example usage](#example-usage-29)
129
- - [isNetworkLocationAvailable()](#isnetworklocationavailable)
130
- - [Parameters](#parameters-28)
131
- - [Example usage](#example-usage-30)
132
- - [isNetworkLocationEnabled()](#isnetworklocationenabled)
133
- - [Parameters](#parameters-29)
134
- - [Example usage](#example-usage-31)
135
- - [getLocationMode()](#getlocationmode)
136
- - [Parameters](#parameters-30)
137
- - [Example usage](#example-usage-32)
138
- - [isLocationAuthorized()](#islocationauthorized)
139
- - [Parameters](#parameters-31)
140
- - [Example usage](#example-usage-33)
141
- - [getLocationAuthorizationStatus()](#getlocationauthorizationstatus)
142
- - [Parameters](#parameters-32)
143
- - [Example iOS usage](#example-ios-usage)
144
- - [Example Android usage](#example-android-usage)
145
- - [getLocationAuthorizationStatuses()](#getlocationauthorizationstatuses)
146
- - [Parameters](#parameters-33)
147
- - [requestLocationAuthorization()](#requestlocationauthorization)
148
- - [Parameters](#parameters-34)
149
- - [Example usage](#example-usage-34)
150
- - [registerLocationStateChangeHandler()](#registerlocationstatechangehandler)
151
- - [Parameters](#parameters-35)
152
- - [Example usage](#example-usage-35)
153
- - [getLocationAccuracyAuthorization()](#getlocationaccuracyauthorization)
154
- - [Parameters](#parameters-36)
155
- - [Example usage](#example-usage-36)
156
- - [requestTemporaryFullAccuracyAuthorization()](#requesttemporaryfullaccuracyauthorization)
157
- - [Parameters](#parameters-37)
158
- - [Example usage](#example-usage-37)
159
- - [registerLocationAccuracyAuthorizationChangeHandler()](#registerlocationaccuracyauthorizationchangehandler)
160
- - [Parameters](#parameters-38)
161
- - [Example usage](#example-usage-38)
162
- - [switchToLocationSettings()](#switchtolocationsettings)
163
- - [Bluetooth module](#bluetooth-module)
164
- - [bluetoothState constants](#bluetoothstate-constants)
165
- - [Android](#android-2)
166
- - [iOS](#ios-2)
167
- - [Example](#example-3)
168
- - [isBluetoothAvailable()](#isbluetoothavailable)
169
- - [Parameters](#parameters-39)
170
- - [Example usage](#example-usage-39)
171
- - [isBluetoothEnabled()](#isbluetoothenabled)
172
- - [Parameters](#parameters-40)
173
- - [Example usage](#example-usage-40)
174
- - [hasBluetoothSupport()](#hasbluetoothsupport)
175
- - [Parameters](#parameters-41)
176
- - [Example usage](#example-usage-41)
177
- - [hasBluetoothLESupport()](#hasbluetoothlesupport)
178
- - [Parameters](#parameters-42)
179
- - [Example usage](#example-usage-42)
180
- - [hasBluetoothLEPeripheralSupport()](#hasbluetoothleperipheralsupport)
181
- - [Parameters](#parameters-43)
182
- - [Example usage](#example-usage-43)
183
- - [getBluetoothState()](#getbluetoothstate)
184
- - [Parameters](#parameters-44)
185
- - [Example usage](#example-usage-44)
186
- - [setBluetoothState()](#setbluetoothstate)
187
- - [Parameters](#parameters-45)
188
- - [Example usage](#example-usage-45)
189
- - [getBluetoothAuthorizationStatus()](#getbluetoothauthorizationstatus)
190
- - [Parameters](#parameters-46)
191
- - [Example usage](#example-usage-46)
192
- - [getBluetoothAuthorizationStatuses()](#getbluetoothauthorizationstatuses)
193
- - [Parameters](#parameters-47)
194
- - [Example usage](#example-usage-47)
195
- - [requestBluetoothAuthorization()](#requestbluetoothauthorization)
196
- - [Parameters](#parameters-48)
197
- - [Example usage](#example-usage-48)
198
- - [registerBluetoothStateChangeHandler()](#registerbluetoothstatechangehandler)
199
- - [Parameters](#parameters-49)
200
- - [Example usage](#example-usage-49)
201
- - [switchToBluetoothSettings()](#switchtobluetoothsettings)
202
- - [WiFi module](#wifi-module)
203
- - [isWifiAvailable()](#iswifiavailable)
204
- - [Parameters](#parameters-50)
205
- - [Example usage](#example-usage-50)
206
- - [isWifiEnabled()](#iswifienabled)
207
- - [Parameters](#parameters-51)
208
- - [Example usage](#example-usage-51)
209
- - [isLocalNetworkAuthorized()](#islocalnetworkauthorized)
210
- - [Parameters](#parameters-52)
211
- - [Example usage](#example-usage-52)
212
- - [getLocalNetworkAuthorizationStatus()](#getlocalnetworkauthorizationstatus)
213
- - [Parameters](#parameters-53)
214
- - [Example usage](#example-usage-53)
215
- - [requestLocalNetworkAuthorization()](#requestlocalnetworkauthorization)
216
- - [Parameters](#parameters-54)
217
- - [Example usage](#example-usage-54)
218
- - [setWifiState()](#setwifistate)
219
- - [Parameters](#parameters-55)
220
- - [Example usage](#example-usage-55)
221
- - [switchToWifiSettings()](#switchtowifisettings)
222
- - [Camera module](#camera-module)
223
- - [isCameraPresent()](#iscamerapresent)
224
- - [Parameters](#parameters-56)
225
- - [Example usage](#example-usage-56)
226
- - [isCameraAvailable()](#iscameraavailable)
227
- - [Parameters](#parameters-57)
228
- - [Example usage](#example-usage-57)
229
- - [isCameraAuthorized()](#iscameraauthorized)
230
- - [Parameters](#parameters-58)
231
- - [Example usage](#example-usage-58)
232
- - [getCameraAuthorizationStatus()](#getcameraauthorizationstatus)
233
- - [Parameters](#parameters-59)
234
- - [Example usage](#example-usage-59)
235
- - [getCameraAuthorizationStatuses()](#getcameraauthorizationstatuses)
236
- - [Parameters](#parameters-60)
237
- - [Example usage](#example-usage-60)
238
- - [requestCameraAuthorization()](#requestcameraauthorization)
239
- - [Parameters](#parameters-61)
240
- - [Example usage](#example-usage-61)
241
- - [isCameraRollAuthorized()](#iscamerarollauthorized)
242
- - [Parameters](#parameters-62)
243
- - [Example usage](#example-usage-62)
244
- - [getCameraRollAuthorizationStatus()](#getcamerarollauthorizationstatus)
245
- - [Parameters](#parameters-63)
246
- - [Example usage](#example-usage-63)
247
- - [requestCameraRollAuthorization()](#requestcamerarollauthorization)
248
- - [Parameters](#parameters-64)
249
- - [Example usage](#example-usage-64)
250
- - [presentLimitedLibraryPicker()](#presentlimitedlibrarypicker)
251
- - [Parameters](#parameters-65)
252
- - [Example usage](#example-usage-65)
253
- - [Notifications module](#notifications-module)
254
- - [remoteNotificationType constants](#remotenotificationtype-constants)
255
- - [Example](#example-4)
256
- - [isRemoteNotificationsEnabled()](#isremotenotificationsenabled)
257
- - [Parameters](#parameters-66)
258
- - [Example usage](#example-usage-66)
259
- - [isRegisteredForRemoteNotifications()](#isregisteredforremotenotifications)
260
- - [Parameters](#parameters-67)
261
- - [Example usage](#example-usage-67)
262
- - [getRemoteNotificationTypes()](#getremotenotificationtypes)
263
- - [Parameters](#parameters-68)
264
- - [Example usage](#example-usage-68)
265
- - [getRemoteNotificationsAuthorizationStatus()](#getremotenotificationsauthorizationstatus)
266
- - [Parameters](#parameters-69)
267
- - [Example usage](#example-usage-69)
268
- - [requestRemoteNotificationsAuthorization()](#requestremotenotificationsauthorization)
269
- - [Parameters](#parameters-70)
270
- - [Example usage](#example-usage-70)
271
- - [switchToNotificationSettings()](#switchtonotificationsettings)
272
- - [Microphone module](#microphone-module)
273
- - [isMicrophoneAuthorized()](#ismicrophoneauthorized)
274
- - [Parameters](#parameters-71)
275
- - [Example usage](#example-usage-71)
276
- - [getMicrophoneAuthorizationStatus()](#getmicrophoneauthorizationstatus)
277
- - [Parameters](#parameters-72)
278
- - [Example usage](#example-usage-72)
279
- - [requestMicrophoneAuthorization()](#requestmicrophoneauthorization)
280
- - [Parameters](#parameters-73)
281
- - [Example usage](#example-usage-73)
282
- - [Contacts module](#contacts-module)
283
- - [isContactsAuthorized()](#iscontactsauthorized)
284
- - [Parameters](#parameters-74)
285
- - [Example usage](#example-usage-74)
286
- - [getContactsAuthorizationStatus()](#getcontactsauthorizationstatus)
287
- - [Parameters](#parameters-75)
288
- - [Example usage](#example-usage-75)
289
- - [requestContactsAuthorization()](#requestcontactsauthorization)
290
- - [Parameters](#parameters-76)
291
- - [Example usage](#example-usage-76)
292
- - [Calendar module](#calendar-module)
293
- - [isCalendarAuthorized()](#iscalendarauthorized)
294
- - [Parameters](#parameters-77)
295
- - [Example usage](#example-usage-77)
296
- - [getCalendarAuthorizationStatus()](#getcalendarauthorizationstatus)
297
- - [Parameters](#parameters-78)
298
- - [Example usage](#example-usage-78)
299
- - [requestCalendarAuthorization()](#requestcalendarauthorization)
300
- - [Parameters](#parameters-79)
301
- - [Example usage](#example-usage-79)
302
- - [Reminders module](#reminders-module)
303
- - [isRemindersAuthorized()](#isremindersauthorized)
304
- - [Parameters](#parameters-80)
305
- - [Example usage](#example-usage-80)
306
- - [getRemindersAuthorizationStatus()](#getremindersauthorizationstatus)
307
- - [Parameters](#parameters-81)
308
- - [Example usage](#example-usage-81)
309
- - [requestRemindersAuthorization()](#requestremindersauthorization)
310
- - [Parameters](#parameters-82)
311
- - [Example usage](#example-usage-82)
312
- - [Motion module](#motion-module)
313
- - [motionStatus constants](#motionstatus-constants)
314
- - [Example](#example-5)
315
- - [isMotionAvailable()](#ismotionavailable)
316
- - [Parameters](#parameters-83)
317
- - [Example usage](#example-usage-83)
318
- - [isMotionRequestOutcomeAvailable()](#ismotionrequestoutcomeavailable)
319
- - [Parameters](#parameters-84)
320
- - [Example usage](#example-usage-84)
321
- - [requestMotionAuthorization()](#requestmotionauthorization)
322
- - [Parameters](#parameters-85)
323
- - [Example usage](#example-usage-85)
324
- - [getMotionAuthorizationStatus()](#getmotionauthorizationstatus)
325
- - [Parameters](#parameters-86)
326
- - [Example usage](#example-usage-86)
327
- - [NFC module](#nfc-module)
328
- - [NFCState constants](#nfcstate-constants)
329
- - [Values](#values-3)
330
- - [Example](#example-6)
331
- - [isNFCPresent()](#isnfcpresent)
332
- - [Parameters](#parameters-87)
333
- - [Example usage](#example-usage-87)
334
- - [isNFCEnabled()](#isnfcenabled)
335
- - [Parameters](#parameters-88)
336
- - [Example usage](#example-usage-88)
337
- - [isNFCAvailable()](#isnfcavailable)
338
- - [Parameters](#parameters-89)
339
- - [Example usage](#example-usage-89)
340
- - [registerNFCStateChangeHandler()](#registernfcstatechangehandler)
341
- - [Parameters](#parameters-90)
342
- - [Example usage](#example-usage-90)
343
- - [switchToNFCSettings()](#switchtonfcsettings)
344
- - [External storage module](#external-storage-module)
345
- - [isExternalStorageAuthorized()](#isexternalstorageauthorized)
346
- - [Parameters](#parameters-91)
347
- - [Example usage](#example-usage-91)
348
- - [getExternalStorageAuthorizationStatus()](#getexternalstorageauthorizationstatus)
349
- - [Parameters](#parameters-92)
350
- - [Example usage](#example-usage-92)
351
- - [requestExternalStorageAuthorization()](#requestexternalstorageauthorization)
352
- - [Parameters](#parameters-93)
353
- - [Example usage](#example-usage-93)
354
- - [getExternalSdCardDetails()](#getexternalsdcarddetails)
355
- - [Parameters](#parameters-94)
356
- - [Example usage](#example-usage-94)
357
- - [Platform Notes](#platform-notes)
358
- - [Android](#android-3)
359
- - [Android permissions](#android-permissions)
360
- - [Android runtime permissions](#android-runtime-permissions)
361
- - ["Dangerous" runtime permissions](#dangerous-runtime-permissions)
362
- - [Android 11+ runtime permissions](#android-11-runtime-permissions)
363
- - [Runtime permissions example project](#runtime-permissions-example-project)
364
- - [Android Camera permissions](#android-camera-permissions)
365
- - [Android Auto Backup](#android-auto-backup)
366
- - [iOS](#ios-3)
367
- - [iOS usage description messages](#ios-usage-description-messages)
368
- - [Example project](#example-project)
369
- - [Screenshots](#screenshots)
370
- - [Android](#android-4)
371
- - [iOS](#ios-4)
372
- - [Release notes](#release-notes)
373
- - [Credits](#credits)
374
- - [License](#license)
375
-
376
- <!-- END doctoc generated TOC please keep comment here to allow auto update -->
5
+ <!-- START doctoc generated TOC please keep comment here to allow auto update -->
6
+ <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
7
+
8
+
9
+ - [Overview](#overview)
10
+ - [Important notes](#important-notes)
11
+ - [Minimum supported versions](#minimum-supported-versions)
12
+ - [Native environment required](#native-environment-required)
13
+ - [Building for Android](#building-for-android)
14
+ - [Installation](#installation)
15
+ - [Using the Cordova/Phonegap/Ionic CLI](#using-the-cordovaphonegapionic-cli)
16
+ - [AndroidX Library](#androidx-library)
17
+ - [Specifying modules](#specifying-modules)
18
+ - [Available modules](#available-modules)
19
+ - [Reporting issues](#reporting-issues)
20
+ - [Reporting a bug or problem](#reporting-a-bug-or-problem)
21
+ - [Requesting a new feature](#requesting-a-new-feature)
22
+ - [Usage](#usage)
23
+ - [Core module](#core-module)
24
+ - [switchToSettings()](#switchtosettings)
25
+ - [Parameters](#parameters)
26
+ - [Example usage](#example-usage)
27
+ - [switchToWirelessSettings()](#switchtowirelesssettings)
28
+ - [switchToMobileDataSettings()](#switchtomobiledatasettings)
29
+ - [permissionStatus constants](#permissionstatus-constants)
30
+ - [Android](#android)
31
+ - [iOS](#ios)
32
+ - [Example](#example)
33
+ - [getPermissionAuthorizationStatus()](#getpermissionauthorizationstatus)
34
+ - [Parameters](#parameters-1)
35
+ - [Example usage](#example-usage-1)
36
+ - [getPermissionsAuthorizationStatus()](#getpermissionsauthorizationstatus)
37
+ - [Parameters](#parameters-2)
38
+ - [Example usage](#example-usage-2)
39
+ - [requestRuntimePermission()](#requestruntimepermission)
40
+ - [Parameters](#parameters-3)
41
+ - [Example usage](#example-usage-3)
42
+ - [requestRuntimePermissions()](#requestruntimepermissions)
43
+ - [Parameters](#parameters-4)
44
+ - [Example usage](#example-usage-4)
45
+ - [isRequestingPermission()](#isrequestingpermission)
46
+ - [Example usage](#example-usage-5)
47
+ - [registerPermissionRequestCompleteHandler()](#registerpermissionrequestcompletehandler)
48
+ - [Parameters](#parameters-5)
49
+ - [Example usage](#example-usage-6)
50
+ - [isDataRoamingEnabled()](#isdataroamingenabled)
51
+ - [Parameters](#parameters-6)
52
+ - [Example usage](#example-usage-7)
53
+ - [isADBModeEnabled()](#isadbmodeenabled)
54
+ - [Parameters](#parameters-7)
55
+ - [Example usage](#example-usage-8)
56
+ - [isDeviceRooted()](#isdevicerooted)
57
+ - [Parameters](#parameters-8)
58
+ - [Example usage](#example-usage-9)
59
+ - [isBackgroundRefreshAuthorized()](#isbackgroundrefreshauthorized)
60
+ - [Parameters](#parameters-9)
61
+ - [Example usage](#example-usage-10)
62
+ - [getBackgroundRefreshStatus()](#getbackgroundrefreshstatus)
63
+ - [Parameters](#parameters-10)
64
+ - [Example usage](#example-usage-11)
65
+ - [cpuArchitecture constants](#cpuarchitecture-constants)
66
+ - [Android](#android-1)
67
+ - [iOS](#ios-1)
68
+ - [Example usage](#example-usage-12)
69
+ - [getArchitecture()](#getarchitecture)
70
+ - [Parameters](#parameters-11)
71
+ - [Example usage](#example-usage-13)
72
+ - [restart()](#restart)
73
+ - [Parameters](#parameters-12)
74
+ - [Example usage](#example-usage-14)
75
+ - [enableDebug()](#enabledebug)
76
+ - [Parameters](#parameters-13)
77
+ - [Example usage](#example-usage-15)
78
+ - [getCurrentBatteryLevel()](#getcurrentbatterylevel)
79
+ - [Parameters](#parameters-14)
80
+ - [Example usage](#example-usage-16)
81
+ - [isLowPowerModeEnabled()](#islowpowermodeenabled)
82
+ - [onLowPowerModeChange()](#onlowpowermodechange)
83
+ - [isIgnoringBatteryOptimizations()](#isignoringbatteryoptimizations)
84
+ - [requestIgnoreBatteryOptimizations()](#requestignorebatteryoptimizations)
85
+ - [isAirplaneModeEnabled()](#isairplanemodeenabled)
86
+ - [Parameters](#parameters-15)
87
+ - [Example usage](#example-usage-17)
88
+ - [isMobileDataEnabled()](#ismobiledataenabled)
89
+ - [Parameters](#parameters-16)
90
+ - [Example usage](#example-usage-18)
91
+ - [isMobileDataAuthorized()](#ismobiledataauthorized)
92
+ - [Parameters](#parameters-17)
93
+ - [Example usage](#example-usage-19)
94
+ - [isAccessibilityModeEnabled()](#isaccessibilitymodeenabled)
95
+ - [Parameters](#parameters-18)
96
+ - [Example usage](#example-usage-20)
97
+ - [isTouchExplorationEnabled()](#istouchexplorationenabled)
98
+ - [Parameters](#parameters-19)
99
+ - [Example usage](#example-usage-21)
100
+ - [getDeviceOSVersion()](#getdeviceosversion)
101
+ - [Parameters](#parameters-20)
102
+ - [Example usage](#example-usage-22)
103
+ - [getBuildOSVersion()](#getbuildosversion)
104
+ - [Parameters](#parameters-21)
105
+ - [Example usage](#example-usage-23)
106
+ - [isDebugBuild()](#isdebugbuild)
107
+ - [Parameters](#parameters-22)
108
+ - [Example usage](#example-usage-24)
109
+ - [Location module](#location-module)
110
+ - [locationMode constants](#locationmode-constants)
111
+ - [Values](#values)
112
+ - [Example](#example-1)
113
+ - [locationAuthorizationMode constants](#locationauthorizationmode-constants)
114
+ - [Values](#values-1)
115
+ - [Example](#example-2)
116
+ - [locationAccuracyAuthorization constants](#locationaccuracyauthorization-constants)
117
+ - [Values](#values-2)
118
+ - [isLocationAvailable()](#islocationavailable)
119
+ - [Parameters](#parameters-23)
120
+ - [Example usage](#example-usage-25)
121
+ - [isLocationEnabled()](#islocationenabled)
122
+ - [Parameters](#parameters-24)
123
+ - [Example usage](#example-usage-26)
124
+ - [isGpsLocationAvailable()](#isgpslocationavailable)
125
+ - [Parameters](#parameters-25)
126
+ - [Example usage](#example-usage-27)
127
+ - [isGpsLocationEnabled()](#isgpslocationenabled)
128
+ - [Parameters](#parameters-26)
129
+ - [Example usage](#example-usage-28)
130
+ - [isCompassAvailable()](#iscompassavailable)
131
+ - [Parameters](#parameters-27)
132
+ - [Example usage](#example-usage-29)
133
+ - [isNetworkLocationAvailable()](#isnetworklocationavailable)
134
+ - [Parameters](#parameters-28)
135
+ - [Example usage](#example-usage-30)
136
+ - [isNetworkLocationEnabled()](#isnetworklocationenabled)
137
+ - [Parameters](#parameters-29)
138
+ - [Example usage](#example-usage-31)
139
+ - [getLocationMode()](#getlocationmode)
140
+ - [Parameters](#parameters-30)
141
+ - [Example usage](#example-usage-32)
142
+ - [isLocationAuthorized()](#islocationauthorized)
143
+ - [Parameters](#parameters-31)
144
+ - [Example usage](#example-usage-33)
145
+ - [getLocationAuthorizationStatus()](#getlocationauthorizationstatus)
146
+ - [Parameters](#parameters-32)
147
+ - [Example iOS usage](#example-ios-usage)
148
+ - [Example Android usage](#example-android-usage)
149
+ - [getLocationAuthorizationStatuses()](#getlocationauthorizationstatuses)
150
+ - [Parameters](#parameters-33)
151
+ - [requestLocationAuthorization()](#requestlocationauthorization)
152
+ - [Parameters](#parameters-34)
153
+ - [Example usage](#example-usage-34)
154
+ - [registerLocationStateChangeHandler()](#registerlocationstatechangehandler)
155
+ - [Parameters](#parameters-35)
156
+ - [Example usage](#example-usage-35)
157
+ - [getLocationAccuracyAuthorization()](#getlocationaccuracyauthorization)
158
+ - [Parameters](#parameters-36)
159
+ - [Example usage](#example-usage-36)
160
+ - [requestTemporaryFullAccuracyAuthorization()](#requesttemporaryfullaccuracyauthorization)
161
+ - [Parameters](#parameters-37)
162
+ - [Example usage](#example-usage-37)
163
+ - [registerLocationAccuracyAuthorizationChangeHandler()](#registerlocationaccuracyauthorizationchangehandler)
164
+ - [Parameters](#parameters-38)
165
+ - [Example usage](#example-usage-38)
166
+ - [switchToLocationSettings()](#switchtolocationsettings)
167
+ - [Bluetooth module](#bluetooth-module)
168
+ - [bluetoothState constants](#bluetoothstate-constants)
169
+ - [Android](#android-2)
170
+ - [iOS](#ios-2)
171
+ - [Example](#example-3)
172
+ - [isBluetoothAvailable()](#isbluetoothavailable)
173
+ - [Parameters](#parameters-39)
174
+ - [Example usage](#example-usage-39)
175
+ - [isBluetoothEnabled()](#isbluetoothenabled)
176
+ - [Parameters](#parameters-40)
177
+ - [Example usage](#example-usage-40)
178
+ - [hasBluetoothSupport()](#hasbluetoothsupport)
179
+ - [Parameters](#parameters-41)
180
+ - [Example usage](#example-usage-41)
181
+ - [hasBluetoothLESupport()](#hasbluetoothlesupport)
182
+ - [Parameters](#parameters-42)
183
+ - [Example usage](#example-usage-42)
184
+ - [hasBluetoothLEPeripheralSupport()](#hasbluetoothleperipheralsupport)
185
+ - [Parameters](#parameters-43)
186
+ - [Example usage](#example-usage-43)
187
+ - [getBluetoothState()](#getbluetoothstate)
188
+ - [Parameters](#parameters-44)
189
+ - [Example usage](#example-usage-44)
190
+ - [setBluetoothState()](#setbluetoothstate)
191
+ - [Parameters](#parameters-45)
192
+ - [Example usage](#example-usage-45)
193
+ - [getBluetoothAuthorizationStatus()](#getbluetoothauthorizationstatus)
194
+ - [Parameters](#parameters-46)
195
+ - [Example usage](#example-usage-46)
196
+ - [getBluetoothAuthorizationStatuses()](#getbluetoothauthorizationstatuses)
197
+ - [Parameters](#parameters-47)
198
+ - [Example usage](#example-usage-47)
199
+ - [requestBluetoothAuthorization()](#requestbluetoothauthorization)
200
+ - [Parameters](#parameters-48)
201
+ - [Example usage](#example-usage-48)
202
+ - [registerBluetoothStateChangeHandler()](#registerbluetoothstatechangehandler)
203
+ - [Parameters](#parameters-49)
204
+ - [Example usage](#example-usage-49)
205
+ - [switchToBluetoothSettings()](#switchtobluetoothsettings)
206
+ - [WiFi module](#wifi-module)
207
+ - [isWifiAvailable()](#iswifiavailable)
208
+ - [Parameters](#parameters-50)
209
+ - [Example usage](#example-usage-50)
210
+ - [isWifiEnabled()](#iswifienabled)
211
+ - [Parameters](#parameters-51)
212
+ - [Example usage](#example-usage-51)
213
+ - [isLocalNetworkAuthorized()](#islocalnetworkauthorized)
214
+ - [Parameters](#parameters-52)
215
+ - [Example usage](#example-usage-52)
216
+ - [getLocalNetworkAuthorizationStatus()](#getlocalnetworkauthorizationstatus)
217
+ - [Parameters](#parameters-53)
218
+ - [Example usage](#example-usage-53)
219
+ - [requestLocalNetworkAuthorization()](#requestlocalnetworkauthorization)
220
+ - [Parameters](#parameters-54)
221
+ - [Example usage](#example-usage-54)
222
+ - [setWifiState()](#setwifistate)
223
+ - [Parameters](#parameters-55)
224
+ - [Example usage](#example-usage-55)
225
+ - [switchToWifiSettings()](#switchtowifisettings)
226
+ - [Camera module](#camera-module)
227
+ - [isCameraPresent()](#iscamerapresent)
228
+ - [Parameters](#parameters-56)
229
+ - [Example usage](#example-usage-56)
230
+ - [isCameraAvailable()](#iscameraavailable)
231
+ - [Parameters](#parameters-57)
232
+ - [Example usage](#example-usage-57)
233
+ - [isCameraAuthorized()](#iscameraauthorized)
234
+ - [Parameters](#parameters-58)
235
+ - [Example usage](#example-usage-58)
236
+ - [getCameraAuthorizationStatus()](#getcameraauthorizationstatus)
237
+ - [Parameters](#parameters-59)
238
+ - [Example usage](#example-usage-59)
239
+ - [getCameraAuthorizationStatuses()](#getcameraauthorizationstatuses)
240
+ - [Parameters](#parameters-60)
241
+ - [Example usage](#example-usage-60)
242
+ - [requestCameraAuthorization()](#requestcameraauthorization)
243
+ - [Parameters](#parameters-61)
244
+ - [Example usage](#example-usage-61)
245
+ - [isCameraRollAuthorized()](#iscamerarollauthorized)
246
+ - [Parameters](#parameters-62)
247
+ - [Example usage](#example-usage-62)
248
+ - [getCameraRollAuthorizationStatus()](#getcamerarollauthorizationstatus)
249
+ - [Parameters](#parameters-63)
250
+ - [Example usage](#example-usage-63)
251
+ - [requestCameraRollAuthorization()](#requestcamerarollauthorization)
252
+ - [Parameters](#parameters-64)
253
+ - [Example usage](#example-usage-64)
254
+ - [presentLimitedLibraryPicker()](#presentlimitedlibrarypicker)
255
+ - [Parameters](#parameters-65)
256
+ - [Example usage](#example-usage-65)
257
+ - [Notifications module](#notifications-module)
258
+ - [remoteNotificationType constants](#remotenotificationtype-constants)
259
+ - [Example](#example-4)
260
+ - [isRemoteNotificationsEnabled()](#isremotenotificationsenabled)
261
+ - [Parameters](#parameters-66)
262
+ - [Example usage](#example-usage-66)
263
+ - [isRegisteredForRemoteNotifications()](#isregisteredforremotenotifications)
264
+ - [Parameters](#parameters-67)
265
+ - [Example usage](#example-usage-67)
266
+ - [getRemoteNotificationTypes()](#getremotenotificationtypes)
267
+ - [Parameters](#parameters-68)
268
+ - [Example usage](#example-usage-68)
269
+ - [getRemoteNotificationsAuthorizationStatus()](#getremotenotificationsauthorizationstatus)
270
+ - [Parameters](#parameters-69)
271
+ - [Example usage](#example-usage-69)
272
+ - [requestRemoteNotificationsAuthorization()](#requestremotenotificationsauthorization)
273
+ - [Parameters](#parameters-70)
274
+ - [Example usage](#example-usage-70)
275
+ - [switchToNotificationSettings()](#switchtonotificationsettings)
276
+ - [Microphone module](#microphone-module)
277
+ - [isMicrophoneAuthorized()](#ismicrophoneauthorized)
278
+ - [Parameters](#parameters-71)
279
+ - [Example usage](#example-usage-71)
280
+ - [getMicrophoneAuthorizationStatus()](#getmicrophoneauthorizationstatus)
281
+ - [Parameters](#parameters-72)
282
+ - [Example usage](#example-usage-72)
283
+ - [requestMicrophoneAuthorization()](#requestmicrophoneauthorization)
284
+ - [Parameters](#parameters-73)
285
+ - [Example usage](#example-usage-73)
286
+ - [Contacts module](#contacts-module)
287
+ - [isContactsAuthorized()](#iscontactsauthorized)
288
+ - [Parameters](#parameters-74)
289
+ - [Example usage](#example-usage-74)
290
+ - [getContactsAuthorizationStatus()](#getcontactsauthorizationstatus)
291
+ - [Parameters](#parameters-75)
292
+ - [Example usage](#example-usage-75)
293
+ - [requestContactsAuthorization()](#requestcontactsauthorization)
294
+ - [Parameters](#parameters-76)
295
+ - [Example usage](#example-usage-76)
296
+ - [Calendar module](#calendar-module)
297
+ - [isCalendarAuthorized()](#iscalendarauthorized)
298
+ - [Parameters](#parameters-77)
299
+ - [Example usage](#example-usage-77)
300
+ - [getCalendarAuthorizationStatus()](#getcalendarauthorizationstatus)
301
+ - [Parameters](#parameters-78)
302
+ - [Example usage](#example-usage-78)
303
+ - [requestCalendarAuthorization()](#requestcalendarauthorization)
304
+ - [Parameters](#parameters-79)
305
+ - [Example usage](#example-usage-79)
306
+ - [Reminders module](#reminders-module)
307
+ - [isRemindersAuthorized()](#isremindersauthorized)
308
+ - [Parameters](#parameters-80)
309
+ - [Example usage](#example-usage-80)
310
+ - [getRemindersAuthorizationStatus()](#getremindersauthorizationstatus)
311
+ - [Parameters](#parameters-81)
312
+ - [Example usage](#example-usage-81)
313
+ - [requestRemindersAuthorization()](#requestremindersauthorization)
314
+ - [Parameters](#parameters-82)
315
+ - [Example usage](#example-usage-82)
316
+ - [Motion module](#motion-module)
317
+ - [motionStatus constants](#motionstatus-constants)
318
+ - [Example](#example-5)
319
+ - [isMotionAvailable()](#ismotionavailable)
320
+ - [Parameters](#parameters-83)
321
+ - [Example usage](#example-usage-83)
322
+ - [isMotionRequestOutcomeAvailable()](#ismotionrequestoutcomeavailable)
323
+ - [Parameters](#parameters-84)
324
+ - [Example usage](#example-usage-84)
325
+ - [requestMotionAuthorization()](#requestmotionauthorization)
326
+ - [Parameters](#parameters-85)
327
+ - [Example usage](#example-usage-85)
328
+ - [getMotionAuthorizationStatus()](#getmotionauthorizationstatus)
329
+ - [Parameters](#parameters-86)
330
+ - [Example usage](#example-usage-86)
331
+ - [NFC module](#nfc-module)
332
+ - [NFCState constants](#nfcstate-constants)
333
+ - [Values](#values-3)
334
+ - [Example](#example-6)
335
+ - [isNFCPresent()](#isnfcpresent)
336
+ - [Parameters](#parameters-87)
337
+ - [Example usage](#example-usage-87)
338
+ - [isNFCEnabled()](#isnfcenabled)
339
+ - [Parameters](#parameters-88)
340
+ - [Example usage](#example-usage-88)
341
+ - [isNFCAvailable()](#isnfcavailable)
342
+ - [Parameters](#parameters-89)
343
+ - [Example usage](#example-usage-89)
344
+ - [registerNFCStateChangeHandler()](#registernfcstatechangehandler)
345
+ - [Parameters](#parameters-90)
346
+ - [Example usage](#example-usage-90)
347
+ - [switchToNFCSettings()](#switchtonfcsettings)
348
+ - [External storage module](#external-storage-module)
349
+ - [isExternalStorageAuthorized()](#isexternalstorageauthorized)
350
+ - [Parameters](#parameters-91)
351
+ - [Example usage](#example-usage-91)
352
+ - [getExternalStorageAuthorizationStatus()](#getexternalstorageauthorizationstatus)
353
+ - [Parameters](#parameters-92)
354
+ - [Example usage](#example-usage-92)
355
+ - [requestExternalStorageAuthorization()](#requestexternalstorageauthorization)
356
+ - [Parameters](#parameters-93)
357
+ - [Example usage](#example-usage-93)
358
+ - [getExternalSdCardDetails()](#getexternalsdcarddetails)
359
+ - [Parameters](#parameters-94)
360
+ - [Example usage](#example-usage-94)
361
+ - [Platform Notes](#platform-notes)
362
+ - [Android](#android-3)
363
+ - [Android permissions](#android-permissions)
364
+ - [Android runtime permissions](#android-runtime-permissions)
365
+ - ["Dangerous" runtime permissions](#dangerous-runtime-permissions)
366
+ - [Android 11+ runtime permissions](#android-11-runtime-permissions)
367
+ - [Runtime permissions example project](#runtime-permissions-example-project)
368
+ - [Android Camera permissions](#android-camera-permissions)
369
+ - [Android Auto Backup](#android-auto-backup)
370
+ - [iOS](#ios-3)
371
+ - [iOS usage description messages](#ios-usage-description-messages)
372
+ - [Example project](#example-project)
373
+ - [Screenshots](#screenshots)
374
+ - [Android](#android-4)
375
+ - [iOS](#ios-4)
376
+ - [Release notes](#release-notes)
377
+ - [Credits](#credits)
378
+ - [License](#license)
379
+
380
+ <!-- END doctoc generated TOC please keep comment here to allow auto update -->
377
381
 
378
382
 
379
383
  # Overview
@@ -1142,6 +1146,95 @@ The function is passed a single `string` parameter containing the error message.
1142
1146
  console.log(`Current battery level is ${level}%`);
1143
1147
  });
1144
1148
 
1149
+ ### isLowPowerModeEnabled()
1150
+
1151
+ Platforms: Android and iOS
1152
+
1153
+ Checks if low power mode is currently enabled on the device.
1154
+
1155
+ cordova.plugins.diagnostic.isLowPowerModeEnabled(successCallback, errorCallback);
1156
+
1157
+ #### Parameters
1158
+
1159
+ - {Function} successCallback - The callback which will be called when operation is successful.
1160
+ The function is passed a single boolean parameter which is TRUE if low power mode is enabled.
1161
+ - {Function} errorCallback - The callback which will be called when operation encounters an error.
1162
+ The function is passed a single string parameter containing the error message.
1163
+
1164
+ #### Example usage
1165
+
1166
+ cordova.plugins.diagnostic.isLowPowerModeEnabled(function(enabled){
1167
+ console.log(`Low power mode is currently ${enabled ? 'enabled' : 'disabled'}`);
1168
+ }, function(error){
1169
+ console.error("The following error occurred: "+error);
1170
+ });
1171
+
1172
+ ### onLowPowerModeChange()
1173
+
1174
+ Platforms: Android and iOS
1175
+
1176
+ Registers a callback function to be called whenever the device low power mode status changes.
1177
+
1178
+ cordova.plugins.diagnostic.onLowPowerModeChange(callback);
1179
+
1180
+ #### Parameters
1181
+
1182
+ - {Function} callback - The callback which will be called whenever low power mode changes.
1183
+ The function is passed a single boolean parameter which is TRUE if low power mode is enabled.
1184
+
1185
+ #### Example usage
1186
+
1187
+ cordova.plugins.diagnostic.onLowPowerModeChange(function(enabled){
1188
+ console.log(`Low power mode changed: ${enabled ? 'enabled' : 'disabled'}`);
1189
+ });
1190
+
1191
+ ### isIgnoringBatteryOptimizations()
1192
+
1193
+ Platforms: Android
1194
+
1195
+ Checks if the app is currently ignoring battery optimizations.
1196
+
1197
+ cordova.plugins.diagnostic.isIgnoringBatteryOptimizations(successCallback, errorCallback);
1198
+
1199
+ #### Parameters
1200
+
1201
+ - {Function} successCallback - The callback which will be called when operation is successful.
1202
+ The function is passed a single boolean parameter which is TRUE if the app is ignoring battery optimizations.
1203
+ - {Function} errorCallback - The callback which will be called when operation encounters an error.
1204
+ The function is passed a single string parameter containing the error message.
1205
+
1206
+ #### Example usage
1207
+
1208
+ cordova.plugins.diagnostic.isIgnoringBatteryOptimizations(function(enabled){
1209
+ console.log(`Ignoring battery optimizations: ${enabled ? 'yes' : 'no'}`);
1210
+ }, function(error){
1211
+ console.error("The following error occurred: "+error);
1212
+ });
1213
+
1214
+ ### requestIgnoreBatteryOptimizations()
1215
+
1216
+ Platforms: Android
1217
+
1218
+ Prompts the user to allow the app to ignore battery optimizations.
1219
+
1220
+ Requires permission `<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />`, which needs to be added to the app's Android manifest.
1221
+
1222
+ cordova.plugins.diagnostic.requestIgnoreBatteryOptimizations(successCallback, errorCallback);
1223
+
1224
+ #### Parameters
1225
+
1226
+ - {Function} successCallback - The callback which will be called when the system request UI is opened.
1227
+ - {Function} errorCallback - The callback which will be called when operation encounters an error.
1228
+ The function is passed a single string parameter containing the error message.
1229
+
1230
+ #### Example usage
1231
+
1232
+ cordova.plugins.diagnostic.requestIgnoreBatteryOptimizations(function(){
1233
+ console.log("Opened battery optimization exemption request");
1234
+ }, function(error){
1235
+ console.error("The following error occurred: "+error);
1236
+ });
1237
+
1145
1238
  ### isAirplaneModeEnabled()
1146
1239
 
1147
1240
  Platforms: Android