diff --git a/src/@ionic-native/plugins/diagnostic/index.ts b/src/@ionic-native/plugins/diagnostic/index.ts index 4937ff72..e4a44766 100644 --- a/src/@ionic-native/plugins/diagnostic/index.ts +++ b/src/@ionic-native/plugins/diagnostic/index.ts @@ -125,6 +125,16 @@ export class Diagnostic extends IonicNativePlugin { POWERING_OFF: string; }; + @CordovaProperty + motionStatus: { + NOT_REQUESTED: string; + GRANTED: string; + DENIED: string; + RESTRICTED: string; + NOT_AVAILABLE: string; + NOT_DETERMINED: string; + UNKNOWN: string; + }; /** * Checks if app is able to access device location. @@ -162,7 +172,7 @@ export class Diagnostic extends IonicNativePlugin { /** * Displays the device location settings to allow user to enable location services/change location mode. */ - @Cordova({ sync: true, platforms: ['Android', 'Windows 10'] }) + @Cordova({ sync: true, platforms: ['Android', 'Windows 10', 'iOS'] }) switchToLocationSettings(): void { } /** @@ -609,7 +619,26 @@ export class Diagnostic extends IonicNativePlugin { }) registerNFCStateChangeHandler(handler: Function): void { } + /** + * Checks if the device data roaming setting is enabled. + * @returns {Promise} + */ + @Cordova({ platforms: ['Android'] }) + isDataRoamingEnabled(): Promise { return; } + /** + * Checks if the device setting for ADB(debug) is switched on. + * @returns {Promise} + */ + @Cordova({ platforms: ['Android'] }) + isADBModeEnabled(): Promise { return; } + + /** + * Checks if the device is rooted. + * @returns {Promise} + */ + @Cordova({ platforms: ['Android'] }) + isDeviceRooted(): Promise { return; } // IOS ONLY @@ -640,7 +669,7 @@ export class Diagnostic extends IonicNativePlugin { * Checks if remote (push) notifications are enabled. * @returns {Promise} */ - @Cordova({ platforms: ['iOS'] }) + @Cordova({ platforms: ['iOS', 'Android'] }) isRemoteNotificationsEnabled(): Promise { return; } /** @@ -650,6 +679,14 @@ export class Diagnostic extends IonicNativePlugin { @Cordova({ platforms: ['iOS'] }) isRegisteredForRemoteNotifications(): Promise { return; } + /** + * Returns the authorization status for the application to use Remote Notifications. + * Note: Works on iOS 10+ only (iOS 9 and below will invoke the error callback). + * @returns {Promise} + */ + @Cordova({ platforms: ['iOS'] }) + getRemoteNotificationsAuthorizationStatus(): Promise { return; } + /** * Indicates the current setting of notification types for the app in the Settings app. * Note: on iOS 8+, if "Allow Notifications" switch is OFF, all types will be returned as disabled. @@ -720,13 +757,23 @@ export class Diagnostic extends IonicNativePlugin { isMotionRequestOutcomeAvailable(): Promise { return; } /** - * Requests and checks motion authorization for the application: there is no way to independently request only or check only, so both must be done in one operation. + * Requests motion tracking authorization for the application. * - * Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requestandcheckmotionauthorization) + * Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requestmotionauthorization) * - * @return {Promise} + * @return {Promise} */ @Cordova({ platforms: ['iOS'] }) - requestAndCheckMotionAuthorization(): Promise { return; } + requestMotionAuthorization(): Promise { return; } + + /** + * Checks motion authorization status for the application. + * + * Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#getmotionauthorizationstatus) + * + * @return {Promise} + */ + @Cordova({ platforms: ['iOS'] }) + getMotionAuthorizationStatus(): Promise { return; } }