Update for cordova.plugins.diagnostic@3.3.0

This commit is contained in:
Dave Alden 2016-11-06 14:16:13 +00:00
parent e7772769fa
commit 5483214f02
2 changed files with 69 additions and 1 deletions

View File

@ -507,4 +507,28 @@ cordova.plugins.diagnostic.getBackgroundRefreshStatus(function(status){
}
}, function(error){
console.error("The following error occurred: "+error);
});
cordova.plugins.diagnostic.requestBluetoothAuthorization(function(){
console.log("Bluetooth authorization requested");
}, function(error){
console.error(error);
});
cordova.plugins.diagnostic.isMotionAvailable(function(available){
console.log("Motion tracking is " + (available ? "available" : "not available") + " on this device");
}, function(error){
console.error("The following error occurred: "+error);
});
cordova.plugins.diagnostic.isMotionRequestOutcomeAvailable(function(available){
console.log("Motion tracking request outcome is " + (available ? "available" : "not available") + " on this device");
}, function(error){
console.error("The following error occurred: "+error);
});
cordova.plugins.diagnostic.requestAndCheckMotionAuthorization(function(status){
console.log("Motion authorization is " +status);
}, function(error){
console.error(error);
});

View File

@ -1,4 +1,4 @@
// Type definitions for cordova.plugins.diagnostic v3.2.2
// Type definitions for cordova.plugins.diagnostic v3.3.0
// Project: https://github.com/dpa99c/cordova-diagnostic-plugin
// Definitions by: Dave Alden <https://github.com/dpa99c/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@ -686,6 +686,50 @@ interface Diagnostic {
successCallback: (status: string) => void,
errorCallback: (error: string) => void
) => void;
/**
* iOS ONLY
* Requests Bluetooth authorization for the application.
* @param successCallback
* @param errorCallback
*/
requestBluetoothAuthorization?: (
successCallback: () => void,
errorCallback: (error: string) => void
) => void;
/**
* iOS ONLY
* Checks if motion tracking is available on the current device.
* @param successCallback
* @param errorCallback
*/
isMotionAvailable?: (
successCallback: (available: boolean) => void,
errorCallback: (error: string) => void
) => void;
/**
* iOS ONLY
* Checks if it's possible to determine the outcome of a motion authorization request on the current device.
* @param successCallback
* @param errorCallback
*/
isMotionRequestOutcomeAvailable?: (
successCallback: (available: boolean) => void,
errorCallback: (error: string) => void
) => void;
/**
* iOS ONLY
* Requests and checks motion authorization for the application.
* @param successCallback
* @param errorCallback
*/
requestAndCheckMotionAuthorization?: (
successCallback: (status: string) => void,
errorCallback: (error: string) => void
) => void;
}
interface CordovaPlugins {