mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 16:52:53 +08:00
refactor(): cleanup
This commit is contained in:
parent
17366a29da
commit
c3d23b0ee9
@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
/**
|
||||
@ -33,13 +33,13 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Keychain {
|
||||
export class Keychain extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Retrieves a value for a key
|
||||
*
|
||||
* @param {string} key the key to retrieve
|
||||
* @param {string} TouchIDMessage the message to show underneath the TouchID prompt (if any)
|
||||
* @param {string} [touchIDMessage] the message to show underneath the TouchID prompt (if any)
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
@ -51,7 +51,7 @@ export class Keychain {
|
||||
*
|
||||
* @param {string} key the key to set
|
||||
* @param {string|number|boolean} value the value to set
|
||||
* @param {boolean} useTouchID whether to store the value with security such that TouchID will be needed to grab it
|
||||
* @param {boolean} [useTouchID] whether to store the value with security such that TouchID will be needed to grab it
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
@ -62,7 +62,7 @@ export class Keychain {
|
||||
* Gets a JSON value for a key
|
||||
*
|
||||
* @param {string} key the key to retrieve
|
||||
* @param {string} TouchIDMessage the message to show underneath the TouchID prompt (if any)
|
||||
* @param {string} touchIDMessage the message to show underneath the TouchID prompt (if any)
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
@ -73,8 +73,8 @@ export class Keychain {
|
||||
* Sets a JSON value for a key
|
||||
*
|
||||
* @param {string} key the key to set
|
||||
* @param {any} value the value to set
|
||||
* @param {boolean} Wether to store the value with security such that TouchID will be needed to grab it
|
||||
* @param {any} obj value the value to set
|
||||
* @param {boolean} [useTouchId] Wether to store the value with security such that TouchID will be needed to grab it
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
|
@ -92,7 +92,6 @@ export class MediaObject {
|
||||
})
|
||||
startRecord(): void { }
|
||||
|
||||
|
||||
/**
|
||||
* Stops recording
|
||||
*/
|
||||
@ -124,6 +123,7 @@ export class MediaObject {
|
||||
sync: true
|
||||
})
|
||||
stop(): void { }
|
||||
|
||||
}
|
||||
|
||||
export type MediaStatusUpdateCallback = (statusCode: number) => void;
|
||||
@ -262,9 +262,9 @@ export class MediaPlugin extends IonicNativePlugin {
|
||||
/**
|
||||
* Open a media file
|
||||
* @param src {string} A URI containing the audio content.
|
||||
* @param onStatusUpdate {MediaStatusUpdateCallback} A callback function to be invoked when the status of the file changes
|
||||
* @param onSuccess {Function} A callback function to be invoked after the current play, record, or stop action is completed
|
||||
* @param onError {MediaErrorCallback} A callback function is be invoked if an error occurs.
|
||||
* @param [onStatusUpdate] {MediaStatusUpdateCallback} A callback function to be invoked when the status of the file changes
|
||||
* @param [onSuccess] {Function} A callback function to be invoked after the current play, record, or stop action is completed
|
||||
* @param [onError] {MediaErrorCallback} A callback function is be invoked if an error occurs.
|
||||
* @return {MediaObject}
|
||||
*/
|
||||
@CordovaCheck()
|
||||
|
Loading…
Reference in New Issue
Block a user